feat(ui): let note composer save be remapped - #962
Conversation
Zellij and similar multiplexers swallow Ctrl-S before Hunk sees it, so the composer save shortcut is now hunk.review.saveNote (default ctrl+s) instead of a hardcoded widget key.
|
PR author is not in the allowed authors list. |
|
@Ajay-Satish-01 is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
The merge left a duplicate command_executed bullet and quote-style churn that failed oxfmt on CI.
|
@benvinegar, would you be able to take a look at this? Thanks |
|
Good find. I'll probably queue up for the next minor release. |
Sure. Thanks |
|
Still works after the recent repo move, but this command should only be enabled while a draft exists. Right now its key is consumed globally and emits |
Format the moved command catalog so oxfmt passes on CI, and keep the save chord from dispatching or emitting command_executed when there is no draft.
I worked on the change. Please check and let me know if this approach works. |
Summary
hunk.review.saveNote(defaultctrl+s) so the note composer save shortcut comes from[keybindings]instead of a hardcoded widget key.ctrl+salso stops CSI-u / raw Ctrl-S.?help show the live chord (Ctrl+Sby default, e.g.Ctrl+Enterafter a remap). Unbound omits the key and leaves a clickable Save.Fixes #846
Test plan
cto start a draft; footer showsCtrl+S save; Ctrl-S (including CSI-u\e[115;5u) saves"hunk.review.saveNote" = "ctrl+enter": footer showsCtrl+Enter save; Ctrl-S does not save; Ctrl+Enter does"hunk.review.saveNote" = false: Ctrl-S and CSI-u leave the draft;?drops the save-note rowCtrl+S savestill savescommand_executedfires withhunk.review.saveNoteon a successful saveVerified: unit tests for catalog, chord matching (including Ctrl+Shift+S no longer saving), execute-by-id ownership, help remap/unbind; AppHost remap to
ctrl+enter, unbind, and CSI-u after remap-away;bun test ./test/pty/notes.test.ts(19 pass, including liveCtrl+S saveand click-to-save).format:checkand lint on the changed files passed.bun run testhad four failures already present on this machine (Jujutsu source logging, two Shiki catalog checks, install VM symlink contract); none of those files are in this diff.Screenshots
Composer footer is driven by the resolved
hunk.review.saveNotelabel (defaultCtrl+S save Esc cancel). After"hunk.review.saveNote" = "ctrl+enter", AppHost frames showCtrl+Enter save. I can attach live TUI captures if useful.