Repository navigation
feat(native): home lands on a draft, sidebar chrome, keybinding editing - #51
Merged
Merged
Conversation
- Home opens a draft in the most recent project like the web index route, and shows the no-projects hero (Add project, Start without a project) when the workspace is empty - Draft hero: project picker with Add project, scratch drafts ask what to work on, and an 'or start without a project' line; chat.newWithoutProject is bound - Sidebar: brand links home, New thread joins Filter and Add project with tooltips, list-filter icon or scoped favicons, and the footer row of Settings, Pull requests and Usage with the undo notice inline
- Rows record a shortcut in place, edit their when clause in a builder popover (expression field and visual tree), show conflicts, and save through server.upsertKeybinding - Add keybinding row with a command picker, row menu with Reset to default and Remove (server.removeKeybinding), and Open keybindings.json - The reply's keymap installs at once; drafts of replaced rows drop when the keymap changes - Ledger: KB-USER editing, SB-HEADER done, new TV-HOME row
- Keybinding replies apply only while no newer keymap streamed since the edit was sent - Recording keeps a layout's own glyph using GPUI's key equivalents, as the web's recorder does - Home and new-thread drafts are navigation entries, so Back returns to the thread before them; a launched draft gives way to its thread - Shortcut pills, shortcut fields and when triggers are tab stops; focusing a field arms it, and the builder takes focus and returns it on close
Owner
Author
|
Review fixes are in Fixed, all four:
Dismissed: none. Gates after the rebase: |
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
With no thread open, the native app showed "Select a thread" where the web lands on a draft. The sidebar was missing the web's header and footer controls. The Keybindings settings page was read-only.
Approach
Home (
_chat.index.tsx,NoProjectsHero): with nothing open, home opens a draft in the most recently updated project. An empty workspace shows the no-projects hero with Add project and Start without a project (projects.ensureScratch). The draft hero gained the project picker with Add project. Scratch drafts ask "What should we work on?", and drafts add an "or start without a project" line.chat.newWithoutProjectis now bound.HostedEmptyStateis n/a: the native connect screen covers that case.Sidebar chrome (
SidebarChrome.tsx,SidebarThreadHeader.tsx): the brand links home. New thread sits with Filter by project and Add project, each with a tooltip. The filter shows the list-filter icon, or the selected projects' favicons when filtered. The footer is a row of 32px buttons (Settings, Pull requests, Usage, now wired to the usage page from #47), with Back while the PR page is open and the undo notice inline.Keybindings editing (
KeybindingsSettings.tsx,KeybindingsSettings.logic.ts):server.upsertKeybinding/server.removeKeybinding. The reply's keymap is applied and installed at once (apply_keybindings_reply→sync_server_config). Drafts of rows the new keymap replaced are dropped.crates/core/src/settings/keybindings.rswith tests: rows, sources, defaults, conflicts, the when tree edits, payloads, and keystroke→keybinding.Ledger
KB-USER: editing added; stayspartial. Not ported yet: theKeybindingsConfigWarningtoast andsettings:writegating.SB-HEADER:done.TV-HOMErow:done.TV-DRAFT: now listsTriageDraftHero.tsx.Evidence
Offscreen snapshots against the read-only real-data server:
/private/tmp/claude-501/-Volumes-DevSSD-t3code/31a183a0-8354-4d43-b031-d9f81d50685d/scratchpad/w14-before-home.png/private/tmp/claude-501/-Volumes-DevSSD-t3code/31a183a0-8354-4d43-b031-d9f81d50685d/scratchpad/w14-after-home.png/private/tmp/claude-501/-Volumes-DevSSD-t3code/31a183a0-8354-4d43-b031-d9f81d50685d/scratchpad/w14-before-keybindings.png/private/tmp/claude-501/-Volumes-DevSSD-t3code/31a183a0-8354-4d43-b031-d9f81d50685d/scratchpad/w14-after-keybindings.png/private/tmp/claude-501/-Volumes-DevSSD-t3code/31a183a0-8354-4d43-b031-d9f81d50685d/scratchpad/w14-after-keybindings-edit.png/private/tmp/claude-501/-Volumes-DevSSD-t3code/31a183a0-8354-4d43-b031-d9f81d50685d/scratchpad/w14-after-keybindings-when.png/private/tmp/claude-501/-Volumes-DevSSD-t3code/31a183a0-8354-4d43-b031-d9f81d50685d/scratchpad/w14-after-keybindings-when-light.pngWire round trip on the smoke server, using the exact payloads Settings sends. It added, replaced and removed a
chat.newbinding, then restored the server (no custom bindings left):Gates:
cargo test --workspace(677 passed), clippy-D warnings,gen-theme --check,parity/sync.test.ts, conformance--check.Not verified in a live window: clicking, recording chords and editing the builder. Screen capture is unavailable, so the states above come from offscreen renders.
Built with Claude Opus 5.5 in Claude Code.