Repository navigation
fix: prepare the server router before document hydration - #350
Merged
Merged
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final GREEN verification (2026-11-06 11:08 UTC)
Exact head
118741e8db9baa574ca2c797e2bf2b3b98cd0fa5, base290196672ec908485b65a0354ab930492e0a2eb5, test-merge779018c280edfbccf3012ef1537ed3f6f7eead12/ tree3119634af3b7ec27cae8448e2f56b3dd35aebc67.Merge remains subject to the coordinator's fresh base/head, protection and review checks; no formal PR approval is claimed. #315 remains separate, and no denied #347 changes are included.
Current stage: minimal startup fix, runtime verification pending (118741e)
Source-unchanged unit RED completed at a723a8a after successful format/lint/type checks:384files/12043tests passed and all three new startup contracts failed. The first observed hydrateStart call0; the other two stopped because the old entry has no hydration Promise export, so their later success/rejection assertions were not reached. Raw results are retained separately from the earlier controlled browser RED2 and no-JS selector correction.
This commit changes only app/client.tsx relative to a723a8a: one public hydrateStart invocation completes before hydrateRoot receives the same RouterProvider and prepared router. The reviewed tests, corrected no-JS selector, all existing322 cases and guards are unchanged. Expected final385files/12046unit and328browser checks are now running; this PR is not ready to merge until they all succeed and the exact final tree is verified.
Current stage: source-unchanged RED unit (a723a8a)
Browser RED at3c94ba61 completed: all existing322 cases passed, native early input/keyboard/SPA2 passed, and the controlled phase at both widths reached React345 plus missing SQL (functional RED2). Two additional no-JS cases stopped at an incorrect exact accessible-heading selector because CSS adds '$ ' and '█'. Their later input checks were not reached, so they are not counted as product failures. Source, CSS and the actual visible SSR content were unchanged.
This commit corrects only that selector to a visible level1 heading with exact DOM text and adds the same three reviewed unit contracts intended for GREEN. Production source is still unchanged. A unit format/type/setup stop will not count as runtime RED. The corrected full six browser cases must pass in final GREEN; no expectations or guards are removed.
Current stage: source-unchanged RED browser regression
This ordinary PR is deliberately not merge-ready. It isolates a document-startup defect found while validating navigation PR315, without mixing a global startup fix into that PR. Application source, package/lock, existing322 browser cases and all their expectations are unchanged at this stage.
The identical controlled synthetic focus/input phase already reproduced React error345 and missing SQL output on both exact main29019667 and PR6df7 at1280/390. Native CSV input remained present. ReactDOM hydrateRoot stack and visible/editable SSR textarea establish the phase. This is controlled baseline evidence, not proof of the cause of the earlier natural failure or a navigation regression. Earlier invalid selectionchange probes and format stops remain recorded separately.
Staged validation
Actual locked React startup/export modules are preserved from official CI. Matching version-tagged core1.167.9/router1.168.9 source shows SSR data preparation and the existing window.$_TSR.h order. Exact installed core dist has not yet been independently captured, and API availability is not described as an official recommendation of this initialization order. On preparation rejection, the proposed Promise rejects without retry/root creation, leaving the SSR document static rather than entering React recovery; this difference is explicitly tested/disclosed.
Preserved constraints