fix(web): stop account nav session-check flicker#126
Merged
Conversation
Cache the session user in sessionStorage and paint the signed-in shell optimistically on subsequent /account and /admin navigations, then revalidate in the background so the chrome no longer flashes Checking… between sections.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-web | fb1db43 | Commit Preview URL Branch Preview URL |
Jul 13 2026, 03:26 PM |
Zach Dunn (zachdunn)
added a commit
that referenced
this pull request
Jul 13, 2026
Port the branch's work onto the #125/#126 restructure: - AccountLayout/AdminLayout adopt BaseHead (DS tokens/fonts/favicon); SITE_FAVICON removed from signed-in-page.ts - signed-in-shell.css drops its :root copy and the side-stripe .status; session-gate blocks render as ul-callout (data-state=error for denied) and each shell gets an sr-only h1 - workspaces.astro: file browsers mount via IntersectionObserver; invite copy buttons announce via aria-live - account-shell.ts taken from main wholesale (hash-panel focus fix is obsolete under path-based navigation)
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.
In plain terms
Moving between account sections (
/account→/account/workspaces, etc.) was flashing “Checking your session…” and collapsing the layout on every click. That was the client session gate re-running from a blank slate on each full page load.What it does
sessionStorageget-sessionin the background; if the session is gone, flip to signed-out and clear the cache/admin/*(admin role required for optimistic paint)What it is not
Why not View Transitions?
ClientRouterwould soft-navigate, but each account page still shipped with#apphidden and re-ran the gate, so the flicker would remain unless we also persisted or cached session state. Caching is the smaller, more direct fix; VT can still be layered later for content crossfades if we want polish.How to try it
/account(expect one “Checking…” on first load)./accountagain — should show signed-out (cache cleared).Test plan
pnpm --filter @uploads/web testpnpm --filter @uploads/web typecheck