refactor(ui): extract shell drawer/palette state to shell-store (W5.1) - #429
Merged
Conversation
Stage 1 of the App.tsx decomposition. Move the four app-shell UI flags (settings/help/history drawers + the ⌘K command palette) out of local useState in App.tsx into a dedicated Zustand shell-store, mirroring the existing profile-store pattern. Deliberately not persisted — these are ephemeral and must not survive reloads. Behavior-preserving: call sites keep identical names/semantics (the store actions are drop-in (open: boolean) => void setters, compatible with CommandPalette's onOpenChange). App.tsx useState count 30 → 26; connection/ auth/test state are extracted in later slices. tsc + biome clean; 183/183 unit tests pass; build green.
krisarmstrong
enabled auto-merge (squash)
June 15, 2026 14:31
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
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.
What
Stage 1 of the App.tsx decomposition (fleet UI plan W5). Moves the four app-shell UI flags — settings / help / history drawers and the ⌘K command palette — out of local
useStateinApp.tsxinto a dedicated Zustandshell-store, mirroring the existingprofile-store.Why this slice first
Lowest-risk: these four flags are self-contained (set in three
open*callbacks, consumed only by the drawer/palette JSX). Connection/auth/test state are deliberately left for later slices (they're tangled in websocket/auth effects).Notes
(open: boolean) => voidsetters (compatible withCommandPalette.onOpenChange); call sites keep identical names.App.tsxuseStatecount 30 → 26. Line count is ~flat this slice (selector hooks); the real shrink lands with the React Query / auth / test-config slices.Verification
tsc --noEmitclean ·biome checkclean · 183/183 unit tests ·npm run buildgreen. Full E2E runs on this PR.