Repository navigation
ui: unify command palette and workspace creation into one command panel - #105
Merged
Merged
Conversation
Phase 1 of the unified command panel: CommandPanelController owns all chrome (blur+tint material, search row, list, key routing, sizing, theming) while pages supply rows and semantics via CommandPanelPage. The old palette becomes RootSearchPage over the unchanged data source. Fixes shipped with the container: trailing type labels truncate with an ellipsis instead of clipping mid-glyph, the light-mode tint no longer mixes into muddy gray (alpha 0.85 light / 0.7 dark), and the selection pill is visible in light themes (accent 0.35 / 0.5 dark). Esc and Cmd-Return route through an NSPanel subclass so they keep working when focus sits on future accessory controls; Enter stays on the field-delegate path with the IME marked-text guard.
Extract the picker's state machine into MoriCore as WorkspacePickerModel (pure, tested: rows/selection/normalized-query/FetchGeneration) and wrap it in WorkspaceCreationPage. The panel container gains breadcrumb, footer slot, fixed-height policy, and query normalization; entry points follow the transition table (hidden→open, root visible→push, showing→no-op). WorktreeCreationController and its data source are deleted; the request types move to WorktreeCreationRequest.swift for WorkspaceManager.
Also restores the missing [0.6.2] section header in the Chinese changelog — the v0.6.2 cut (cc62781) only updated the English file, leaving released entries under [Unreleased].
Design iteration after V's review (B opacity + A density from the mockups): the blur+tint+mask chrome is replaced by a solid layer-backed surface — theme background lifted 4% toward the foreground, footer band on the raw background as a recessed strip. Search row 44pt/15pt, rows 30pt, quieter selection pill, breadcrumb as a chip. Fixes found along the way: - NSTableView's default .automatic style resolves to .inset on macOS 11+, offsetting row content ~10pt and hard-clipping trailing labels at the panel edge; now .fullWidth. - searchIconView's leading was constrained twice, so the breadcrumb constraint swap could never win and the chip never appeared. - The panel now dismisses on losing key focus (Spotlight behavior); before, it lingered floating where Esc could not reach it. - Workspace page height is row-aligned (264 = header 24 + 8×30) so no ninth-row sliver.
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
Command Palette and the New Workspace dialog were two unrelated panels with independent chrome, key handling, and theme plumbing — neither looked native and picking Create Worktree bounced you between windows. They are now one Command Panel: a single page-stack
NSPanelthat owns all chrome, with pages (CommandPanelPage) supplying rows and semantics.CommandPanelController(container: chrome, key routing, page stack, theming) +RootSearchPage(wrapsCommandPaletteDataSourceunchanged) +WorkspaceCreationPage. Pages returnConfirmResult(.dismiss(then:)/.push/.stay), so Create Worktree pushes the workspace picker in place with a "‹ New Workspace" breadcrumb chip; Esc pops.WorkspacePickerModel(pure, 12 new tests: create/exact/#PRdefault selection, unselectable hints, stale-generation drops, selection preserved by row id across refreshes).FetchGenerationguards async fetch races.CommandPaletteController,WorktreeCreationController,WorktreeCreationDataSource(net −1300 lines against +1150, most of it now testable).Bugs fixed along the way
NSTableView.styledefaulted to.inset(macOS 11+), offsetting row content ~10pt and hard-clipping trailing labels at the panel edge (the real cause of the "Projec" truncation). Now.fullWidth.Out of scope
Agent Dashboard and the Remote Connect wizard keep their own windows (different interaction shapes); restyling them is a separate task.
Verification
mise run testgreen across all packages (core 753 assertions incl. the 12 new picker tests)CI=1 bash scripts/bundle.sh+ app launch verified