Repository navigation
feat(native): web-parity sidebar, thread actions, keybindings and command palette - #19
Merged
Merged
Conversation
This was referenced Nov 2, 2026
Open
Ports the web's sidebar partition (pinned, active, working, snoozed, settled), inbox return tracking, thread sort and pin order keys, snooze rules and presets, project grouping, the older-settled helpers, and the thread action commands, menu model and undo store, with tests ported from the TypeScript suites.
…in core Ports DEFAULT_KEYBINDINGS, shortcut and when-expression parsing, rule resolution, labels, thread jump helpers and the server keybindings decoder, plus GPUI keystroke and context-predicate translation.
…its in core Ports paletteSearch (folding, token matching, thread scoring with recency and opens, ranked passes) and the command palette's grouping and ordering, ranks sidebar search with it, and adds the open thread's visit watermark from threadVisits.ts.
… and menus The sidebar renders the web's sections with card and slim rows in a variable-height list that splices only changed rows, a thread search header, shelf toggles, Show more, and the Undo notice. Thread rows get the context menu (pin, settle, snooze presets, wake, rename, mark unread, regenerate title, auto-settle, copy path/branch/thread/id, archive, delete with confirmation), hover actions, inline rename and visit tracking. Default keybindings register as GPUI bindings with their when clauses, cmd-k opens the command palette, and the menu bar gains Edit, View and Window. Lucide icons are vendored with the web's stroke.
…r the sidebar slice
Palette rows own the jump and pin keys and keyboard highlight scrolls into view; connection changes re-place the Working shelf; undo steps go through their actions' claim invalidation; the sidebar clock ticks per second only while a live duration is drawn and the sidebar shows; streaming-only shell ticks skip the sidebar rebuild; id ties use W4's localeCompare; menus, dialogs, the palette and toasts paint backdrop blur under their glass; Escape and arrows yield to IME composition; and menu capabilities come from one ThreadCapabilities seam.
…fig drives overrides chat.new, modelPicker.toggle, composer.effort and composer.mode bind through the keymap to W2's actions, so their when clauses live in one place, and W2's direct bindings are removed. The server config's keybindings install as user overrides (dropped bindings are shadowed by a propagating no-op), and its threadAutoSettleOptOut capability shows the Auto-settle menu.
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.
Problem
The native sidebar was a first-cut list: one row height, a few hard-coded statuses, no sections or shelves, no thread actions, no keybindings beyond quit/hide, and no command palette. Issues #2, #3 and #10 ask for the web's sidebar, thread actions and keys.
Approach
Core (pure, tested; cases ported from the TypeScript suites as the oracle)
core/src/sidebar/: the web's partition and list builder (partitionSidebarThreadsand the list items inSidebar.tsx): Pinned, Active, the Working shelf with the inbox return tracker and its 2s exit grace, Snoozed, Settled with the 10 + 25 "Show more" tail, collapsed shelves that still show the open thread. Thread presentation mirrorspresentThreadShell/shellRuntime, including subagent approval roll-up. PortsthreadSort.ts(settled/active/pinned/inbox/working sorts, pin order keys),threadSettled.ts(snooze rules, wake, presets with local calendar boundaries through an injected time zone),resolveSidebarThreadStatus, the row's top status,shouldRecedeSidebarThread, status pills, project grouping (projectGrouping.ts: repository / repository_path / separate, overrides, labels, project sort), the older-settled helpers, and the visit watermark (threadVisits.ts).splice_rangelets the view splice only rows that changed.core/src/thread_actions.rs: command builders matchingoperations/commands.ts,buildThreadActionMenuItems,planThreadUndo, and an undo store with the notice's grouping and 5s expiry.core/src/keybindings/:DEFAULT_KEYBINDINGS, shortcut andwhenparsing, resolution, labels, jump helpers, the server keybindings decoder, and translation to GPUI keystrokes and predicates. GPUI matches a bare identifier against the innermost context only, so eachwhenidentifierxbecomes!(!x), which reads "set anywhere on the focus path" — the web's flat semantics.core/src/search/andcore/src/palette/:paletteSearch.ts(folding, token matching, thread scoring with recency and opens, ranked passes) and the palette's grouping and ordering fromCommandPalette.logic.ts.App
app/src/sidebar/): card rows (78px; project name, pin, status with icon and live duration or relative time, title, branch line) for pinned/active/working, 36px slim rows for snoozed/settled, shelf headers with count and chevron, Show more, hover actions (Snooze presets, Settle; Wake; Un-settle), Woke dismissal, inline rename (double-click or menu; Enter/blur commits, Escape cancels), jump hints after holding the modifier 200ms, and the Undo notice in the footer. Variable heights use GPUIlistwith incremental splices, so streaming never resets scroll; the pane stays.cached(). Search header: local ranking via the ported scorer plus debouncedorchestration.searchThreadsmessage matches, keyboard navigation.context_menu.rs, §6.3) and confirm dialog (dialog.rs, §6.4); delete uses the web's copy and stops a live runtime first. Every one-way action has its reverse in the menu and row (pin/unpin, settle/un-settle, snooze/wake, archive → Undo).keymap.rs): all defaults registered; implemented:sidebar.toggle(cmd-b, plus the titlebar toggle at x=91 and a collapsed layout),thread.previous/next,thread.jump.1..9,thread.settle(settles and moves on, or un-settles),thread.pin,thread.undo,thread.copyReference,commandPalette.toggle. The rest bind toUnimplemented, which propagates.keymap::install(server_keybindings)is the seam for user overrides once the server-config subscription lands.palette.rs): 576 × ≤420, radius 16, 10vh; actions, recent threads, and ranked threads/projects on a query.icons.rsfrom feat(native): transcript rows and streaming markdown at web fidelity #17/feat(native): drive agents from the composer: new threads, pickers, approvals #20 (plussized, which keeps the inherited hover color, andfrom_namefor menu models).scripts/vendor-icons.tsregenerates anyicons/lucide/path thaticons.rsnames, at stroke 1.75 or 2 understroke-2/;--checkverifies.ClientHandle::request(method: &'static str, …), now innativefrom feat(native): drive agents from the composer: new threads, pickers, approvals #20 (same signature as feat(native): right panel with tabs and the diff panel #18).snooze_dialog.rs): "Date and time" or "Duration" (minutes/hours/days), validated by a port ofresolveCustomSnoozeincluding the DST-gap rejection; the web's calendar popover is a typedYYYY-MM-DDfield.Review fixes (Sol 6.1) and integration with #16/#17/#20
pinThread, including the top-of-pins key).sameApartFromStreaming) skip the sidebar rebuild and the sidebar redraw; only real changes rebuild.locale_compare(a_bbeforea-b).paint_backdrop_blurunder their translucent fill (glass.rs).ThreadCapabilitiesseam:threadAutoSettleOptOutnow comes from the server config;can_operatestays assumed true (the native client has no session-scope read yet).chat.new,modelPicker.toggle,composer.effortandcomposer.modebind through the keymap tonew_thread::NewThread,composer::ToggleModelPickerandcomposer::OpenPermissions; W2's direct Cmd+N/Cmd+Shift+M/E/A bindings are removed (Shift+Tab stays, it is not a keybinding command). The server config's keybindings install as user overrides; bindings a new set drops are shadowed by a propagating no-op.Ledger rows
SB-LISTdone,SB-UNDOdone;KB-USER(new),SB-SECTIONS,SB-GROUPING,SB-ROW,SB-HEADER,SB-SEARCH,SB-MENU,SB-SNOOZE,KB-DEFAULTS,KB-PALETTE,KB-MENUSpartial (gaps below).Verification
cargo test --workspace: 220 core tests plus the conformance replay pass. The shell fields this PR adds toThreadShell(andolderSettledon the snapshot) are set in the rich shell scenario (conformance/shellCases.ts), regenerated, and compared against TypeScript;generate.ts --checkpasses.cargo clippy --workspace --all-targets -- -D warnings: clean.node scripts/gen-theme.ts --check,node --test parity/sync.test.ts(42 pass),node scripts/vendor-icons.ts --check: pass.cargo run -p t3-client --example thread_actions, against the isolated dev server:Gaps (why the issues stay open)
omitOlderSettled(needsshellOlderSettled/shellThreadFamiliesfrom the config before the shell subscribes, plusomitIdleSubagents, which changes what the transcript's subagent rows can read), so Show more pages through local rows only.SB-DRAG,SB-SELECT).can_operateis assumed until the client reads session scopes.Refs #2, #3, #10
Model: Claude Opus 5.5 (Claude Code, autonomous worker W3)