Repository navigation
web: token / sign-in (chrome polish) - #110
Merged
Merged
Conversation
Avoid a render-time ref write (react-hooks/refs). cancelLogin is idempotent, so dismiss can call it whether a flow was started or not. Co-authored-by: Vel <Code4me2@users.noreply.github.com>
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.
Chrome polish leftover: token persistence, the App gate, NoToken copy, and SignInDialog’s device-code poll/cancel. Branched from current
main(e84dc7b, squash of #108). Web-only.A sibling agent owns keyboard/a11y (#102 #65 #91 #64 #68 #82 #84 #67 #87). This PR does not touch TreeRow, ProjectTree, Viewport tabindex/skip links, Popover’s focus trap, Button min-width/resting chrome, or Inspector tab ARIA.
Closes
#47, #80, #73, #76.
Verified against current main + INTERFACE.md
Issue bodies are 2026-09-01 field notes. Rechecked on
e84dc7b:#t=workspace token #47 still open.claimToken()already moved#t=intosessionStorageand rewrote the hash, but there was no reload coverage, no paste recovery, and a 401’s only remedy was “restart the server.” §2.2 forbids putting the token in the query string; persistence stays origin-keyedsessionStorage.apiFetch401 calleddropToken()and did not remount App. The gate only readworkspaceToken()on its own render. QueryClient lived under that gate, so the shell stayed up as a zombie.copy.noToken.bodysaid the page was opened without a token. That is a lie when the operator opened with#t=and the app dropped it.loginStatusandcancelLoginhad zero call sites.beginLogin("device_code")painted the code and stopped.Not restacked: quiet rail (#107 / #55 compact chip), well leftovers (#108), pin honesty (#106).
What changed
sessionStorage.workspaceToken()re-reads storage when the in-memory hold is empty. A?r=cache-buster and a workspace route (explodet=) do not eat it.data-token-absence="unauthorized") instead of leaving a live-looking shell. A fresh QueryClient is created per hold.unauthorized.#t=workspace token #47): paste a#t=address or the token itself. Not a settings app, not a credential prompt.loginStatusuntil complete or a named failure, thenonSignedIn/onClose. Dismiss (Escape, overlay) callscancelLogin. Paste-pathcompleteLoginis unchanged. Popover’s focus trap is unused except as the existing dialog host.Locked decisions (not reopened)
data-chrome-export/data-chrome-bom/[data-testid="artifact-pin"]stay.#t=workspace token #47’s field on the unauthorized / no-token-held path. NoToken panel copy blames the operator for a token the app dropped (#47 follow-up) #73 is copy. 401 dropToken() leaves a zombie shell instead of remounting NoToken #80 is remount.Out of this PR
TreeRowderives the roving tabindex fromaria-selected, so a tree with nothing selected cannot be entered from the keyboard #102 Rail is two trees; arrows cannot reach Analyses from Parts #65 Part rows report selection asaria-expanded: the chevron cannot collapse a part, and ArrowRight is a navigation #91 Viewport canvas is not keyboard-reachable; no skip link past the rail #64 Well, composer, and session tabs fail the §3.13 ARIA contract #68 Inspector tabs lack aria-controls and aria-labelledby wiring #82 Dialogs (SignIn, Export) focus trap can be escaped #84 Fit, Cancel, and disclose have no resting control chrome #67 Overlay icon buttons lack explicit 24px min-width for hit targets #87.part) from JSON payload #69. No reopen of beyond Smith: laser CAM, scan-to-part, process packs — engine first #14 or web: rail Sign-in stays in the 280px box; viewport is a CAD modeling well #32.Tests
Local
web/:pnpm typecheck,pnpm lint, andpnpm testall pass (41 files, 661 tests). Coverage for token surviving reload, 401 remounting NoToken in-tab, NoToken copy not blaming open-without, device-code poll-to-complete, dismiss callingcancelLogin. Existing e2e selectors ([data-testid="no-token"],data-signin-*) not weakened.Built
web/and opened the preview at 1280×800 without a liveheph serve. The absence panel states no token held and offers the single paste field. Holding a pasted#t=remounts the shell in this tab (502s are expected with no API). Live 401 remount and device-code poll are pinned in unit tests.NoToken panel: no token held, single paste field
After paste, the gate remounts the workspace shell
To show artifacts inline, enable in settings.