You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 652a6ca
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(web): command palette state lives in a store, git and branch pickers drop timer and sync effects
The command palette held its open state in a component reducer, so every way
in (sidebar buttons, Cmd+N, PR links) went through a window CustomEvent that
an effect relayed into the reducer, its shortcuts were one window listener
re-attached whenever the theme, keybindings, terminal or preview state
changed, and an open intent ("Add project", "New thread in...") was applied
by a layout effect that cleared it again in the parent. GitActionsControl
ran its own focus/visibility listener, interval and timeout effects, and
BranchPicker measured its fades two frames after opening and scrolled to top
from a previous-value effect.
- Palette state is a zustand store driven by the same reducer. openCommandPalette
dispatches to it directly. Palette, theme and usage shortcuts are one
dispatcher scope installed at app start, live only while a palette is
mounted, and read the route, panels and theme at key time.
- An intent bumps a session; the palette view is keyed by it and starts in the
intent's submenu on its first render. "Add project" and "New thread in..."
submenus resolve their items while rendering, so they follow projects and
environments as they load.
- GitActionsControl: elapsed time reads the shared second clock, the inline
success hides at a deadline, and focus/visibility status refresh is one
shared atom per checkout (vcsStatusRevalidation, wake option restored in
client-runtime with this consumer).
- BranchPicker: fades follow a ResizeObserver from the list's ref callback;
typing scrolls the list to top in the input handler.
- AddProjectToMachineDialog: no effect closes it when its project goes away;
the dialog's open state follows the project and the request ends when the
close finishes. Each request remounts the dialog.
Effects kept: the palette's browse-navigation cleanup, GitActionsControl's
live-branch draft sync, BranchToolbarBranchSelector's default-branch write
(both feed the send path, which still reads the stored branch).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
0 commit comments