Skip to content

refactor(ui): extract shell drawer/palette state to shell-store (W5.1) - #429

Merged
krisarmstrong merged 1 commit into
mainfrom
refactor/stem-shell-store
Jun 15, 2026
Merged

refactor(ui): extract shell drawer/palette state to shell-store (W5.1)#429
krisarmstrong merged 1 commit into
mainfrom
refactor/stem-shell-store

Conversation

@krisarmstrong

Copy link
Copy Markdown
Collaborator

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 useState in App.tsx into a dedicated Zustand shell-store, mirroring the existing profile-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

  • Not persisted — drawers/palette must never reopen across reloads.
  • Behavior-preserving: store actions are drop-in (open: boolean) => void setters (compatible with CommandPalette.onOpenChange); call sites keep identical names.
  • App.tsx useState count 30 → 26. Line count is ~flat this slice (selector hooks); the real shrink lands with the React Query / auth / test-config slices.

Verification

tsc --noEmit clean · biome check clean · 183/183 unit tests · npm run build green. Full E2E runs on this PR.

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
krisarmstrong enabled auto-merge (squash) June 15, 2026 14:31
@github-actions

Copy link
Copy Markdown
Contributor

License Compliance Report

All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 31 package(s)
  • MIT: 26 package(s)
  • BSD-3-Clause: 16 package(s)
  • Apache-2.0: 11 package(s)
  • BSD-2-Clause: 1 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

@krisarmstrong
krisarmstrong merged commit 45f05d9 into main Jun 15, 2026
29 checks passed
@krisarmstrong
krisarmstrong deleted the refactor/stem-shell-store branch June 15, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant