Skip to content

fix(website): render grouped API entries on middleware helpers page - #815

Merged
blove merged 1 commit into
mainfrom
blove/website-docs-nav-and-hydration
Aug 14, 2026
Merged

fix(website): render grouped API entries on middleware helpers page#815
blove merged 1 commit into
mainfrom
blove/website-docs-nav-and-hydration

Conversation

@blove

@blove blove commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Picks up the first of the two flagged tasks. The second turned out to be a non-issue — details below.

The middleware API page rendered nothing

docs/middleware/api/client-tool-helpers.mdx carries the Auto-rendered from api-docs.json marker, but the docs route only ever matched one entry, by the page's H1. The H1 is "LangGraph.js client-tool helpers", which matches no export — so the page rendered zero generated entries.

Since that page is the entirety of middleware's API Reference section, every middleware export — bindClientTools, routeAfterAgent, the Postgres execution store, all of it — was missing from the site's API reference. docs.spec.ts > auto-rendered API pages resolve generated entries has been failing on exactly this.

Fix: an optional apiEntries on DocsPage for pages that document a group of exports. The route renders each named entry in order; pages without it keep the existing match-by-title behavior. The spec now asserts every declared entry actually exists, rather than skipping group pages — a stronger check than before.

Verified in a browser: all nine helpers now render with signatures below the page prose.

The blog hydration error is dev-only

Investigated and could not find a real defect, so nothing is changed for it here.

  • It is not blog-specific: docs pages and the home page throw it too, so it's the root layout, not the blog wrappers.
  • Diffing the SSR HTML against the hydrated DOM shows no difference — same structure, same attributes, same text. The only extra client node is the Next.js dev overlay portal.
  • Production has no console errors at all. Checked threadplane.ai on a real production build.

Conclusion: Turbopack dev-server noise, not a user-facing bug. Shipping a speculative fix for it would be worse than leaving it, so I've closed that task rather than guessing.

Checks

  • docs.spec.ts: 15/16 → 16/16
  • apps/website suite: 12 failures → 11, none new (baseline confirmed by stashing)
  • nx lint website: 0 errors

🤖 Generated with Claude Code

The middleware API Reference is a single page covering nine exported
helpers. It carried the "Auto-rendered from api-docs.json" marker, but
the renderer only ever matched one entry by the page's H1 — and
"LangGraph.js client-tool helpers" matches no export. So the page
rendered zero generated entries, and every middleware export was absent
from the site's API reference.

That mismatch is what `docs.spec.ts > auto-rendered API pages resolve
generated entries` has been failing on.

Add an optional `apiEntries` to DocsPage for pages documenting a group
of exports. The docs route renders each named entry in order; pages
without it keep the existing match-by-title behavior. The spec now
asserts every declared entry exists rather than skipping group pages.

Verified all nine helpers render on /docs/middleware/api/client-tool-helpers.
docs.spec.ts goes 15/16 -> 16/16; website suite 12 failures -> 11, none new.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@blove
blove enabled auto-merge (squash) August 14, 2026 04:49
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 14, 2026 4:51am

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 61d3fdd into main Aug 14, 2026
24 checks passed
@blove
blove deleted the blove/website-docs-nav-and-hydration branch August 14, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant