Repository navigation
fix: hide the object panel while a route change renders - #81
Merged
Merged
Conversation
React Router 7 applies each accepted navigation inside React.startTransition. The router updates history and router.state synchronously, but the committed tree, useLocation() included, keeps the previous route until the transition commits. On a slow CPU that render spans several painted frames. During those frames the details panel (and the versions navigator) stayed visible and actionable for the object the URL had just left: after Back from alpha.txt to the bucket root, or after clicking beta.txt while alpha.txt was open. Publish the router's accepted location key from router.subscribe through a useSyncExternalStore hook, which always renders synchronously. While the key differs from the committed location, the object browser keeps its object-scoped content mounted but makes it inert, aria-busy and hidden in the same commit, before the browser can paint. Disabling transitions for the whole router would also close the gap, but it would change Suspense behaviour for every lazy route. The new browser regression throttles the CPU 6x and samples the panel at the end of each URL-changing task and on the following frames, for an object switch, Back, Back and Forward. Without this change it fails on every run, and its end-of-task sample fails even without throttling. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Feng Ruohang <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Feng Ruohang <[email protected]>
5 tasks done
Vonng
added a commit
that referenced
this pull request
Nov 4, 2026
Merge the validated 2.6.0 draft-release candidate, including PR #81, Go security updates, embedded HTTP/2 keep-alive and release metadata. Formal publication remains pending maintainer approval. Signed-off-by: Feng Ruohang <[email protected]>
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.
Contribution Licensing (no CLA, inbound=outbound, DCO required)
This pull request contributes to PGSTY SILO Console (
pgsty/silo-console).Code contributions are accepted under
GNU AGPL v3.0 or later
(
AGPL-3.0-or-later), the same license as SILO Console.By submitting this pull request I represent that I have the right to contribute
the changes under that license and retain copyright in my original work.
No CLA, copyright assignment, or separate Apache-2.0 license grant is required.
Existing copyright and license notices remain intact; separately licensed
material keeps its applicable terms. Every commit must carry a DCO
Signed-off-bytrailer (git commit -s); seeCONTRIBUTING.md.
Description and motivation
object-detail-stale.spec.ts› "history navigation never shows an actionable panel for another route" flaked on CI's Linux runners. It was reported as flaky on both runs of #80, and the same race exists on 5175e5c. After Back fromalpha.txtto the bucket root, a sampled frame still showed a visible, non-inert details panel readingalpha.txtunder the bucket-root URL. With a 6x CDP CPU throttle it reproduces on every run.Root cause. React Router 7's
RouterProviderapplies every router state update insideReact.startTransition. The router moves synchronously:history.pushState, or the browser's URL on popstate, thenrouter.state.location, then its subscribers. React then renders the new location as an interruptible, time-sliced transition. Until that commits, the committed tree, includinguseLocation()inListObjects, still describes the previous route. On a slow CPU that takes several painted frames, so the details panel stays actionable for the object the URL just left. The existingdetailsIdentityMatchesgate cannot see this, because both of its inputs come from the same stale commit. The same gap affects an object switch (click B while A is open: URLB, panel stillA) and the versions-mode navigator.Diagnosis: with
<RouterProvider useTransitions={false}>the throttled repro passes 10/10. I did not ship that, because it changes Suspense behaviour for every lazy route in the app.Fix.
common/routeRenderPending.tsis a small external store fed byrouter.subscribe, wired inMainRouter.tsxnext tocreateBrowserRouter. Its hook,useRouteRenderPending(), usesuseSyncExternalStore, which always renders synchronously. It reports when the router's accepted location key differs from the committeduseLocation().key. Blocked navigations, fetchers and revalidations keep the same key, so they never mark a route as pending.RouteBoundContentkeeps object-scoped content mounted, so its state survives, but setsinert,aria-busyandvisibility: hiddenin the same commit, before the browser can paint. It wraps the details panel content (desktop inline and mobile sheet) and the versions-modeVersionsNavigator. The panel frame keeps its width, so switching objects does not shift the layout.Regression. A new chromium test, "on a slow CPU no route change leaves another object's panel actionable", throttles the CPU 6x. For an object switch (push), Back, Back and Forward, it samples which object names the panel shows as actionable at two points: at the end of the task that changed the URL (popstate microtask, or Navigation API
currententrychangefor push), and on the next 30 animation frames. It also checks that the panel is actionable again once the navigation has rendered. The existing history test is unchanged. Theobject-identity-guardssource guard now also requires the route-pending wrapper.Validation
All runs were local against a 4-drive SILO fixture built from
pgsty/silomain (69fcf50c), withMINIO_CI_CD=1, thecommon.shusers and policies, the usage worker on a disposable Postgres, Console on :9090, Node 24.22.1 and Yarn 4.13.0.--repeat-each=40: failed onmain(as reported); 40/40 passed with this change.alpha.txtactionable under thebeta.txtURL). It also failed 10/10 with no throttling, because the end-of-task sample does not depend on CPU speed.--repeat-each=15together with the old test).--project=unit --project=chromium --workers=3: 850 passed.yarn typecheck,./check-prettier.sh(prettier--check .),./check-deadcode.sh,./check-warnings.sh,yarn check:bundle: pass.make verifiers(fmt, golangci-lint 2.15.0: 0 issues, replacements, deps-release, credits) andgo test ./...: pass.web-app/buildwas rebuilt withmake build-static, and a second build is byte-identical.Compatibility and documentation impact
Frontend only, with no API, permission or SILO integration changes. While a route change is rendering, which is usually under a frame, the details panel content and versions navigator are blank and inert instead of showing the previous object. No documentation update is needed.
Checklist
git commit -s) per the DCO🤖 Generated with Claude Code