Skip to content

Clarify server sync IO fix cards and messages - #99677

Open
aurorascharff wants to merge 7 commits into
codex/docs-hydration-lintfrom
codex/suggest-browser-for-sync-io
Open

aurorascharff wants to merge 7 commits into
codex/docs-hydration-lintfrom
codex/suggest-browser-for-sync-io

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The server sync IO error now shows how to move a time, randomness, or crypto read into a Client Component: wrap the component in a parent Suspense boundary so the surrounding UI can prerender. The “Render on the client” cards show that boundary. The client error keeps a separate fix for a value read after mount or in response to an interaction. Neither client fix requires io().

The request-time cards and terminal message lead with await io(), matching the recipes merged in #102245. The crypto cards show how to render a fresh ID and how to use a cached ID as a query key. Each fix has an inline example, with links to the detailed recipes and the date fallback in #101798.

The five integration snapshot files reflect the terminal wording. The DevTools shortcut test also waits for the outgoing menu to unmount before recording.

Verification

  • All 171 overlay and guidance unit tests passed. All 17 cards match the titles, groups, snippets, and links in the six error pages.
  • The clock and draft-key examples render their expected initial HTML on the server. The earlier hosted hydration check covers the interaction examples and the localized-date fallback.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 4881b63
View workflow run

@aurorascharff
aurorascharff force-pushed the codex/suggest-browser-for-sync-io branch 2 times, most recently from bee0141 to c69754b Compare October 5, 2026 10:53
@aurorascharff
aurorascharff marked this pull request as ready for review October 5, 2026 11:50
Copilot AI balanced review requested due to automatic review settings October 5, 2026 11:50

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@aurorascharff aurorascharff changed the title Improve browser-only guidance for sync I/O errors Improve Client Component guidance for sync I/O errors Oct 5, 2026
@aurorascharff
aurorascharff marked this pull request as draft October 6, 2026 10:39
@aurorascharff
aurorascharff marked this pull request as ready for review October 6, 2026 11:01
@aurorascharff
aurorascharff requested a review from gnoff October 6, 2026 13:55
@aurorascharff
aurorascharff marked this pull request as draft October 13, 2026 21:54
@aurorascharff
aurorascharff marked this pull request as ready for review October 14, 2026 08:46
@aurorascharff
aurorascharff marked this pull request as draft October 14, 2026 09:50
@github-actions github-actions Bot added Documentation Related to Next.js' official documentation. tests type: next labels Oct 14, 2026
@aurorascharff
aurorascharff marked this pull request as ready for review October 14, 2026 13:05
@aurorascharff
aurorascharff enabled stacked auto-merge (squash) October 14, 2026 14:46
@aurorascharff
aurorascharff disabled stacked auto-merge October 14, 2026 14:50
@aurorascharff
aurorascharff marked this pull request as draft October 14, 2026 15:47
colinhacks added a commit to amikofalvy/frizz that referenced this pull request Oct 15, 2026
The paragraph under a merge-path exit always explained the merge queue: the
PR was tested merged onto its base in a separate `gh-readonly-queue/…`
commit, "so those failures do not show on the PR head". That is the point
of a queue bounce, but the same paragraph went out when auto-merge was
switched off in a repository with no queue at all. There it names a commit
and failures that do not exist (microsoft/vscode#339642, cli/cli#13665 and
vercel/next.js#99677 all carry such an exit today, none of them queued).

The report now carries which road the PR left. A queue exit keeps the
paragraph as it was; auto-merge alone says to find out why it went off and
gives the command that turns it back on. A re-minted report that folds
both keeps the queue wording, since it says everything the other does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
colinhacks added a commit to colinhacks/frizz that referenced this pull request Oct 15, 2026
…61)

* fix(pr-watch): wake when a PR leaves the merge queue without merging

A thread parked on a queued PR slept through the PR bouncing out of the
merge queue: GitHub removed it for failed_checks, and a human noticed
2h25m later. The queue tests a separate merge-group commit, so the PR
head's checks stayed green and its merge state CLEAN: nothing the
watcher read had moved.

The batched PR query now also reads isDraft, mergeQueueEntry and the
last RemovedFromMergeQueue / AutoMergeDisabled timeline events, with the
merge group's own check rollup off each removal's beforeCommit (still 1
GraphQL point per PR). A fresh exit wakes the worker with GitHub's
reason, the failing merge-group checks, and, when the PR is not back in
the queue, what to do next. A PR turned back into a draft wakes it too.

Same class: a watched PR or issue GitHub stops resolving (deleted,
transferred, access lost) logged NOT_FOUND forever while the thread
waited out a for: of up to a year. After 30 minutes of NOT_FOUND the
watcher now settles and tells its worker.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(pr-watch): only consecutive NOT_FOUND answers settle a watcher

The not-found clock kept running through polls that never reached GitHub: a rate-limit deferral or
a network error left it alone, so one NOT_FOUND blip followed by half an hour of backoff settled the
watcher. Any outcome other than another NOT_FOUND now restarts the run.

The gone wake also pointed at `mcp__frizz__watch_pr`, which the worker prompt never teaches; it now
names `frizzctl watch-pr add` / `frizzctl watch-issue add`, as the expiry wake does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(pr-watch): tell auto-merge going off apart from a queue bounce

The paragraph under a merge-path exit always explained the merge queue: the
PR was tested merged onto its base in a separate `gh-readonly-queue/…`
commit, "so those failures do not show on the PR head". That is the point
of a queue bounce, but the same paragraph went out when auto-merge was
switched off in a repository with no queue at all. There it names a commit
and failures that do not exist (microsoft/vscode#339642, cli/cli#13665 and
vercel/next.js#99677 all carry such an exit today, none of them queued).

The report now carries which road the PR left. A queue exit keeps the
paragraph as it was; auto-merge alone says to find out why it went off and
gives the command that turns it back on. A re-minted report that folds
both keeps the queue wording, since it says everything the other does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(pr-watch): name the merge group's failed job before the ones it cancelled

A merge group fails fast: one job goes red and the queue cancels the rest.
`failedCheckNames` counts a cancellation as a failure and keeps rollup
order, so the eight names the clause has room for were cancellations and
the job that actually failed was folded into "+N more".

Measured on bytecodealliance/wasmtime#14375, dropped for `failed_checks` on
2026-09-22: 26 cancelled, 1 failed (Test MSVC x86_64 (1/8)), listed 14th.
The wake named eight ASAN and MPK jobs that never ran to the end, which is
exactly where a worker would go looking. The exit clause now lists the
non-cancelled failures first; the head's own CI wake is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* test(pr-watch): pin the not-found settle for an issue watcher too

The settle after 30 minutes of NOT_FOUND runs for issue watchers as well
(the issue branch of the poll feeds the same clock, and the check comes
before the issue is evaluated), but only the PR case was tested. This pins
the issue one: no wake inside the grace period, then one wake that names
`frizzctl watch-issue add`, and the watcher settles. Disabling the issue
branch's tracking fails it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(pr-watch): explain the merge group's commit only when it failed the PR

The previous commit kept the merge-queue sentence for every queue exit.
It still read wrong for a queue that dropped the PR without failing it:
bytecodealliance/wasmtime#14647, removed today over a merge conflict, was
told that "those failures do not show on the PR head" when nothing had
failed.

Three next steps now, most specific first: a queue that failed the PR
(GitHub's `failed_checks`, or a failed check in the merge group, as when
someone removes a red PR by hand) explains the `gh-readonly-queue/…`
commit; any other queue exit says to find out why it left and re-queue;
auto-merge going off says to find out why and turn it back on. A
re-minted report keeps the most specific of the reports it folds.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Colin McDonnell <[email protected]>
@aurorascharff
aurorascharff marked this pull request as ready for review October 16, 2026 11:56
@aurorascharff
aurorascharff force-pushed the codex/suggest-browser-for-sync-io branch from 434cef4 to 6dfdd9b Compare November 25, 2026 21:39
@aurorascharff
aurorascharff force-pushed the codex/suggest-browser-for-sync-io branch 9 times, most recently from 8f56246 to eb00474 Compare November 27, 2026 13:43
Base automatically changed from codex/docs-clock-reads-during-migration to canary November 27, 2026 13:51
@aurorascharff
aurorascharff force-pushed the codex/suggest-browser-for-sync-io branch from eb00474 to 7b2d46a Compare November 27, 2026 13:51
@aurorascharff
aurorascharff removed this pull request from stack #102384 November 27, 2026 14:07
@aurorascharff
aurorascharff force-pushed the codex/suggest-browser-for-sync-io branch from 86c6910 to 52e4297 Compare November 27, 2026 14:08
@aurorascharff
aurorascharff changed the base branch from canary to codex/docs-hydration-lint November 27, 2026 14:08
@aurorascharff
aurorascharff marked this pull request as ready for review November 27, 2026 14:37

#### Move the component to the client

Add [`use client`](/docs/app/api-reference/directives/use-client) and compute the timestamp inside the component.

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.

Note

Unverified · Minor — Leftover prose still says to compute the value inside the Client Component

The change deletes the useEffect code examples under "Move the component to the client" and keeps the sentence above them: "Add use client and compute the timestamp inside the component" (or "call the crypto API inside the component"). That is the advice the PR sets out to correct, and the same pages' Gotchas (lines 248 and 226) say it still trips this error during SSR. The next sentence only links to the effect recipe, so a reader who follows the pattern text gets the error again. Under no-stale-docs this is comment level, because the linked recipe right below is correct.

Needs your judgment: the review traced this through the code but couldn’t run anything to prove it.

@vercel
vercel Bot dismissed their stale review November 27, 2026 14:40

Vercel Agent Verified Review reviewed a newer commit and didn’t approve it: dismissing its approval of an earlier commit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. tests type: next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants