Repository navigation
refactor(ui): named layers and one side-panel shell (#512) - #1398
Merged
Merged
Conversation
…e modals, unwired dismiss stack (#512) - ui/layers.ts: every magic stacking band (pane overlay/takeover, pane dialog, in-surface popover, dialog, menu, toast, debug) is a named literal class; PANE_DIALOG_LAYERS is a view of it. Stale z-50 comments corrected. - components/ui/side-panel.tsx: the docked panel shell for Git, Worktrees, Agent Status and the six debug panels; DebugPanelHeader gives the debug closes an accessible name. - RemotePanel renders a Dialog, so it is registered with the modals. - ui/dismissStack.ts: topmost-only Escape + anySurfaceOpen(), shipped unwired; useKeybinds.ts is untouched until #1394 merges (q95). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, pin shell and layer values (#1398 review) The dismiss stack's wiring contract was wrong (a capture-phase Escape pre-empts two-phase inner handlers; effect order is not stacking order for nested mounts). It returns with the useKeybinds wiring after #1394. Stacking between dialogs is by open order, not registry order; the comments now say so. The SidePanel test pins children and layout, and the layer test pins exact values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Review disposition (head Fixed
Declined (c, minors: coverage gaps, not defects)
Residuals (why this PR says 🤖 Generated with Claude Code |
This was referenced Sep 27, 2026
Unify the floating-surface UI layer: one dismiss/focus/layer system + shared surface primitives
#512
Closed
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.
Refs #512.
Plan:
docs/plans/2026-09-27-floating-surface-layers.md.Problem
#512's modal and toast halves landed earlier (shared Radix
dialog.tsx, shareddropdown-menu.tsx, one toast). What was left:No named layer scale. The stacking bands were real but written as magic numbers in about ten files, each with its own "why above X" comment:
Registry and App comments still described an old "everything z-50, DOM order breaks ties" model.
No side-panel shell. Nine docked panels copied one class string, and it had drifted. The five debug headers drew a bare "×" with no accessible name.
RemotePanel was registered as a side panel while rendering a centred Dialog.
What merges
ui/layers.ts: one table of named layers, as literal Tailwind classes. Every banded z value moves onto it, andPANE_DIALOG_LAYERSbecomes a view of it. The class strings are unchanged, so there is no visual change. The stale layering comments inregistry.tsx,App.tsxandsurfaces/types.tsare corrected to what actually decides stacking: the named layer, then OPEN order within the dialog layer (each Radix Dialog portals into<body>when it opens), with registry and render order breaking only same-commit ties (review b).components/ui/side-panel.tsx<SidePanel>: a namedasidelandmark. Each panel keeps its own width.DebugPanelHeader: the debug panels share one red header and gain named closes.modalSurfaces, appended per the registry contract.Sequencing (steering q95)
W1's #1394 edits
useKeybinds.ts, and owner keyboard work is in flight. This PR does not touchuseKeybinds.tsor its tests.The dismiss stack moved out (review b). A first version shipped an unwired
ui/dismissStack.ts, and review showed its wiring contract could not work:It returns, redesigned, with the
useKeybinds.tswiring on a fresh origin/main after #1394 merges.Not in this PR (why
Refs, notFixes)Tests
ui/layers.test.ts: every layer is a literal z class; the bands are strictly ordered (pane layers < dialog < menu < toast < debug); and each keeps the exact class the sites used before (review a).components/ui/side-panel.renderer.test.tsx:npx tsc -bis clean on42798c67, and the affected renderer areas pass (82 files, 512 tests). An earlier full-renderer run on77734732passed 467 of 469 files; the 2 failures were the known local-onlyapp-state/storetests, which also fail on origin/main and pass in CI.🤖 Generated with Claude Code