Skip to content

fix(website,stream-adapter): the streaming examples render nothing in dev - #463

Merged
blove merged 1 commit into
mainfrom
blove/streaming-docs-claims-pass
Aug 17, 2026
Merged

fix(website,stream-adapter): the streaming examples render nothing in dev#463
blove merged 1 commit into
mainfrom
blove/streaming-docs-claims-pass

Conversation

@blove

@blove blove commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

A claims-verification pass over docs/streaming/ — the least-verified section in the corpus (zero entries in the docs-guard roster, against 42 for grid). It turned up a live rendering bug and five false or misleading claims.

The bug: both streaming examples are blank in dev

ChatGrid and PartialRowGrid each held their row model in useMemo and disposed it from a useEffect cleanup. StrictMode rehearses an unmount in dev, the memo hands the same instance back to the remount, and the grid throws and renders nothing:

RowLayoutControllerError: A disposed row-layout controller cannot change its columns.

That is the #382 blank-grid failure, shipped on three docs pageselement-streams, parsers and api-reference embed the chat grid; index and partial-streams embed the partial-row grid. useDisposeOnUnmount exists for exactly this, and five other files in the repo already use it. These two were missed.

Why nothing caught it

  • The dev-mode Playwright gate loads the homepage and /docs/grid/grouping only. It never reaches a streaming page.
  • Each example's existing demo.test.tsx renders without StrictMode. A production build does not rehearse effects, so the bug is invisible there.

Added a StrictMode twin for each example. Both were mutation-tested: reverting the fix makes each fail with the exact disposed-controller error, and I restored the fix afterward.

Claims corrected, each checked against the source

Page Claim Reality
index.mdx a partial stream "never adds a row at all" It adds exactly one, when given createRow — as the same page described ten lines later
partial-streams.mdx createRow snippet targets rowId: "msg-1" while claiming to show msg-2 msg-1 is the seeded row; the snippet demonstrated a path that can never fire
partial-streams.mdx onIssue framed as the without-createRow case It fires either way — the connector reports, then builds
api-reference.mdx TransactionBatcher row lists its methods Omitted subscribeError, a public member
parse-partial-stream.ts JSDoc fills out "each top-level array element" The implementation throws unless the root is an object

That TransactionBatcher table leads with a Type header — precisely the shape the docs guard's member-table detector cannot see, which is how the omission survived.

Also documented two load-bearing but unstated behaviors: batched calls are appended, not merged (two updates for one row become two entries in one transaction), and createRow receives the changes accumulated across the frame.

Not changed

index.mdx teaches createLocalRowModel({ rows: [], columns }) while both examples pass getRowId. I probed it — the taught form compiles, getRowId is genuinely optional under the id convention. No defect.

Verification

Rebased onto origin/main after #462 merged. pnpm typecheck, pnpm lint (1 pre-existing unrelated warning) and api:check clean; website 556 tests + stream-adapter 48 tests pass.

Note for reviewers: a bare npx vitest run --root packages/stream-adapter shows 2 failures — that is the known stale-dist trap. The package's own pnpm test, which builds deps first, is green.

🤖 Generated with Claude Code

… dev

Both streaming examples held their row model in `useMemo` and disposed it
from a `useEffect` cleanup. StrictMode rehearses an unmount in dev, the
memo hands the same instance back to the remount, and the grid throws
`A disposed row-layout controller cannot change its columns` and renders
nothing. That is the #382 blank-grid failure, shipped on three docs
pages — element-streams, parsers and api-reference all embed the chat
grid, and index and partial-streams embed the partial-row grid.

`useDisposeOnUnmount` exists for exactly this and five other files in the
repo already use it; these two were missed.

The repo's dev-mode Playwright gate loads the homepage and
`/docs/grid/grouping` only, so it never reached a streaming page. Each
example's existing `demo.test.tsx` renders without StrictMode, which is
the blind spot — a production build does not rehearse effects. Added a
StrictMode twin for each, both mutation-tested: reverting the fix makes
each fail with the exact disposed-controller error.

Claims corrected in the same pass, each checked against the source:

- streaming/index.mdx said a partial stream "never adds a row at all",
  then described `createRow` adding one ten lines later. It adds exactly
  one, and only when given a factory.
- partial-streams.mdx's `createRow` snippet targeted `rowId: "msg-1"`
  while claiming to show what `msg-2` does. msg-1 is the seeded row, so
  the snippet demonstrated a path that can never fire.
- The same page framed `onIssue` as the without-`createRow` case.
  `onIssue` fires either way; the connector reports, then builds.
- api-reference.mdx's `TransactionBatcher` row omitted `subscribeError`,
  a public member. That table leads with a `Type` header, which is
  exactly the shape the docs guard's member-table detector cannot see.
- `parsePartialStream`'s JSDoc claimed it fills out "each top-level array
  element". Its implementation throws unless the root is an object.

Documented two behaviors that were load-bearing but unstated: batched
calls are appended rather than merged, and `createRow` receives the
changes accumulated across the frame.

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

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pretable Ignored Ignored Aug 17, 2026 3:50am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

Vercel preview ready

Preview: https://pretable-hu86wbmkr-cacheplane.vercel.app
Commit: 5c1297aa10596b026bd14ea341376a7ad9d8bf96

Updated automatically by the deploy-preview job.

@blove
blove merged commit 7f3f736 into main Aug 17, 2026
20 checks passed
@blove
blove deleted the blove/streaming-docs-claims-pass branch August 17, 2026 04:06
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