Skip to content

feat(ui): let note composer save be remapped - #962

Open
Ajay-Satish-01 wants to merge 3 commits into
modem-dev:mainfrom
Ajay-Satish-01:remappable_note_846
Open

feat(ui): let note composer save be remapped#962
Ajay-Satish-01 wants to merge 3 commits into
modem-dev:mainfrom
Ajay-Satish-01:remappable_note_846

Conversation

@Ajay-Satish-01

Copy link
Copy Markdown
Contributor

Summary

  • Adds hunk.review.saveNote (default ctrl+s) so the note composer save shortcut comes from [keybindings] instead of a hardcoded widget key.
  • Escape, Enter, and F10 stay widget-owned. While the composer is focused, only the resolved chords save; unbinding or remapping away from ctrl+s also stops CSI-u / raw Ctrl-S.
  • The composer footer and ? help show the live chord (Ctrl+S by default, e.g. Ctrl+Enter after a remap). Unbound omits the key and leaves a clickable Save.
  • This has to be a host change: focused text inputs sit above session extension keyboard modes, so an extension cannot claim the chord while the composer has focus.

Fixes #846

Test plan

  • c to start a draft; footer shows Ctrl+S save; Ctrl-S (including CSI-u \e[115;5u) saves
  • Config "hunk.review.saveNote" = "ctrl+enter": footer shows Ctrl+Enter save; Ctrl-S does not save; Ctrl+Enter does
  • Config "hunk.review.saveNote" = false: Ctrl-S and CSI-u leave the draft; ? drops the save-note row
  • Clicking Ctrl+S save still saves
  • command_executed fires with hunk.review.saveNote on a successful save

Verified: 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 live Ctrl+S save and click-to-save). format:check and lint on the changed files passed. bun run test had 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.saveNote label (default Ctrl+S save Esc cancel). After "hunk.review.saveNote" = "ctrl+enter", AppHost frames show Ctrl+Enter save. I can attach live TUI captures if useful.

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.
@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@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.
@Ajay-Satish-01

Copy link
Copy Markdown
Contributor Author

@benvinegar, would you be able to take a look at this? Thanks

@benvinegar

Copy link
Copy Markdown
Member

Good find. I'll probably queue up for the next minor release.

@Ajay-Satish-01

Copy link
Copy Markdown
Contributor Author

Good find. I'll probably queue up for the next minor release.

Sure. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow the note composer save note command (Ctrl-S) to be remapped

2 participants