Destination
Rearrangeable UI (a), hideable/collapsible panels via settings (b), and user-defined keybindings including a squash-selected-commits action (c) implemented on this fork and offered to noahbclarkson/rgitui as PoC PRs — each paired with an upstream feature-request issue that links its PR.
Notes
- Outside contributor: READ-only on upstream. Standing rule: never create an upstream issue without a branch + PR ready to link at the same time.
- Test harness prerequisite: done — upstream PR #59 enables gpui
test-support and adds a headless TestApp view test driven by simulate_keystroke/simulate_input (passes on Windows, no xvfb). Feature PRs from this map should ship keystroke tests using it. Gotcha: every gpui test must end drop(window); app.update(|cx| cx.shutdown()); or leak detection panics.
- Branch stacking: the standalone mac-modifier bug fix (bug f) ships first and the keybinding work branches off that branch, not
main, to avoid conflicts.
- rgitui pins gpui to Zed rev f3fb4e04aa85; Zed's own workspace/dock/keymap crates at that rev are the reference implementation — reuse patterns where possible. NB: no local Zed checkout by default;
cargo fetch lands it under the cargo git checkouts dir.
- Skills to consult when resolving: grill-me for grilling tickets, tdd for prototypes.
- Bugs (stale staged-state in old-commit diffs, text overflow, mac cmd-vs-ctrl, missing image previews) are handled outside this map as paired upstream issue+PR fixes.
Decisions so far
-
Research: Zed dock/panel system at pinned rev — don't depend on or port Zed's Dock (GPL + whole-editor dep fan-out); gpui has all drag primitives and rgitui already uses them 6×; smallest path = visibility flags in LayoutSettings → enum-keyed PanelSpec registry → context-menu repositioning before any drag (Zed itself never shipped drag-to-dock). Port two traps: clamp-panel-size-on-window-resize (latent rgitui bug), drag-move dedup.
-
Research: Zed keybinding system at pinned rev — adopt Zed's keymap.json format but reimplement the ~150-LOC loader on gpui directly; gpui-native secondary- modifier = Cmd on mac / Ctrl elsewhere; rgitui's CommandId (57 variants) is a ready-made action namespace and 10 views already set (inert) key_contexts; squash git plumbing exists (rebase_interactive, contiguous first-parent range only) — missing piece is GraphView multi-select. Located bug f's root cause: key_handler.rs ORs (control || platform) for some commands but plain control for stage/commit/stash/tab/close.
-
Grilling: custom keybinding scheme + squash semantics — JSONC keymap.json beside settings.json; a commands! macro is the single source of truth generating CommandId + Action + keymap name + availability + default keystroke (no bare strings, no parallel lists); all ~35 on_key_down sites migrate in one PR, dissolving any_overlay_active into context predicates; shortcuts view becomes keymap-derived, calling out user bindings and conflicts; conflicts = overlapping-context duplicates + chord-prefix shadowing only (a user overriding a default is not a conflict), resolved later-wins with the ignored entry reported, prefix dropped for chords, rest of file still loads; mac = secondary- clean break; squash = arbitrary-set selection validated at action time, pre-filling the existing InteractiveRebase dialog.
-
Grilling: how do view-local, non-command keys get expressed? — view-local keys join the same commands! macro, grouped into per-view blocks (view GraphView in graph { CopySha "y" if selection; }); user file is a Zed-shaped array of {context, bindings} sections with namespace::Action names (dot notation rejected — gpui's derive panics on :: in names and the UI would disagree with the file), with the default keymap generated one section per view block so grouping survives where users read it; macro also emits golden-tested docs/KEYBINDINGS.md and a JSON Schema for editor completion; DetailPanel file-search and InteractiveRebase reword mode refactor onto the shared TextInput instead of context flags; shared menu::Cancel/Confirm resolved by context depth with every overlay gaining a key_context (14 have none), Blame/FileHistory keeping a distinct SwitchToDiff; global d/b/h/y duplicates and the !panel_has_focus hack deleted (accepted user-visible change).
Not yet specified
- Layout persistence details beyond visibility flags:
Vec<PanelSpec> schema in settings.json, per-repo vs global, serde-default migration from today's scalar width/height fields.
- Visual design of the shortcuts view's user-override and conflict callouts (badge vs colour vs grouping) — sharpens once the keymap loader exists and there are real conflicts to render.
- How to pitch upstream: issue template/tone for feature-request-plus-PoC-PR pairs.
Out of scope
Destination
Rearrangeable UI (a), hideable/collapsible panels via settings (b), and user-defined keybindings including a squash-selected-commits action (c) implemented on this fork and offered to noahbclarkson/rgitui as PoC PRs — each paired with an upstream feature-request issue that links its PR.
Notes
test-supportand adds a headlessTestAppview test driven bysimulate_keystroke/simulate_input(passes on Windows, no xvfb). Feature PRs from this map should ship keystroke tests using it. Gotcha: every gpui test must enddrop(window); app.update(|cx| cx.shutdown());or leak detection panics.main, to avoid conflicts.cargo fetchlands it under the cargo git checkouts dir.Decisions so far
Research: Zed dock/panel system at pinned rev — don't depend on or port Zed's Dock (GPL + whole-editor dep fan-out); gpui has all drag primitives and rgitui already uses them 6×; smallest path = visibility flags in LayoutSettings → enum-keyed PanelSpec registry → context-menu repositioning before any drag (Zed itself never shipped drag-to-dock). Port two traps: clamp-panel-size-on-window-resize (latent rgitui bug), drag-move dedup.
Research: Zed keybinding system at pinned rev — adopt Zed's keymap.json format but reimplement the ~150-LOC loader on gpui directly; gpui-native
secondary-modifier = Cmd on mac / Ctrl elsewhere; rgitui'sCommandId(57 variants) is a ready-made action namespace and 10 views already set (inert) key_contexts; squash git plumbing exists (rebase_interactive, contiguous first-parent range only) — missing piece is GraphView multi-select. Located bug f's root cause:key_handler.rsORs(control || platform)for some commands but plaincontrolfor stage/commit/stash/tab/close.Grilling: custom keybinding scheme + squash semantics — JSONC
keymap.jsonbeside settings.json; acommands!macro is the single source of truth generating CommandId + Action + keymap name + availability + default keystroke (no bare strings, no parallel lists); all ~35on_key_downsites migrate in one PR, dissolvingany_overlay_activeinto context predicates; shortcuts view becomes keymap-derived, calling out user bindings and conflicts; conflicts = overlapping-context duplicates + chord-prefix shadowing only (a user overriding a default is not a conflict), resolved later-wins with the ignored entry reported, prefix dropped for chords, rest of file still loads; mac =secondary-clean break; squash = arbitrary-set selection validated at action time, pre-filling the existing InteractiveRebase dialog.Grilling: how do view-local, non-command keys get expressed? — view-local keys join the same
commands!macro, grouped into per-view blocks (view GraphView in graph { CopySha "y" if selection; }); user file is a Zed-shaped array of{context, bindings}sections withnamespace::Actionnames (dot notation rejected — gpui's derive panics on::in names and the UI would disagree with the file), with the default keymap generated one section per view block so grouping survives where users read it; macro also emits golden-testeddocs/KEYBINDINGS.mdand a JSON Schema for editor completion; DetailPanel file-search and InteractiveRebase reword mode refactor onto the sharedTextInputinstead of context flags; sharedmenu::Cancel/Confirmresolved by context depth with every overlay gaining a key_context (14 have none), Blame/FileHistory keeping a distinctSwitchToDiff; globald/b/h/yduplicates and the!panel_has_focushack deleted (accepted user-visible change).Not yet specified
Vec<PanelSpec>schema in settings.json, per-repo vs global, serde-default migration from today's scalar width/height fields.Out of scope