Skip to content

Semantic keymap: validated remapping, conflicts and host notes (#335) - #378

Closed
raiseCatError wants to merge 5 commits into
feature/workspace-foundationfrom
feature/semantic-keymap
Closed

raiseCatError wants to merge 5 commits into
feature/workspace-foundationfrom
feature/semantic-keymap

Conversation

@raiseCatError

@raiseCatError raiseCatError commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

#335, stacked on the workspace foundation (#375). Standalone; independent of the sidebar (#376) and panel PRs.

A keymap is declarative data (bind/unbind by key name, context and action), validated before use, never executed:

  • Only keys NMSh's input parser tells apart are bindable; Ctrl+B, Cmd+K, Alt+Left and the like are refused with the reason (the terminal may send them as something else or not at all).
  • Job control (Ctrl+C/D/Z), paste, pointer and focus events are never bindable; in the composer neither are typing and Enter.
  • Every bindable key already means something in an empty composer (Left opens Sessions — TerminalApp.ts:2052 —, Right accepts the inline suggestion, Up recalls history, Tab completes, Shift+Tab moves through blocks…); a composer binding needs "replaces": true, and an active draft still wins.
  • Conflicts keep the first binding; invalid entries are skipped and reported while the defaults stand; an action left with no key and no command, or a sidebar with no way back, is reported.
  • hostNotes: Terminal.app's own Page Up/Down and Home/End scrolling, F1 on macOS, a tmux root-table (bind -n) binding, tmux's escape-time. Notes, never delivery guarantees; slash commands remain the reliable path.
  • describeKeymap: the bindings in effect plus the commands that always work.

Integration (later, with the frontend): keymap.json in the config directory, /keys and /keys reload.

Tests: tests/workspaceKeymap.test.ts. Design: docs/design/workspace-keymap.md. Physical checks of host delivery (Ghostty, Terminal.app, tmux) are listed, not performed.

Update (55bf55c, 1dc8a24), quality pass: merges the foundation fixes. "unknown field" echoed the keymap file's JSON key raw into /keys, so a field name carrying an OSC/CSI sequence reached the terminal; it is shown through resourceText now (regression added). The doc records that the background task bar (#384) shares Up from an idle composer, so COMPOSER_MEANINGS.up must name it at integration. CI green on 1dc8a24 after one rerun: the first run failed only tests/configuredCompletion.test.ts ("startup timeout and cancellation…", a timing test outside this branch; passes locally).

#335, stacked on the workspace foundation. A keymap is declarative data
(bind/unbind entries by key name, context and action), validated before use
and never executed.

- Only keys the input parser tells apart are bindable; others (Ctrl+B,
  Cmd+K, Alt+Left) are refused with the reason.
- Job control, paste and pointer events are never bindable; in the
  composer neither are typing and Enter.
- Every bindable key already means something in an empty composer (Left
  opens Sessions, Right accepts the inline suggestion...), recorded from the
  composer's dispatch; a composer binding needs "replaces": true, and an
  active draft still wins.
- Conflicts keep the first binding; invalid entries are skipped and
  reported while the defaults stand; an action left with no key and no
  command, or a sidebar with no way back, is reported.
- hostNotes: Terminal.app's own Page Up/Down and Home/End scrolling, F1 on
  macOS, a tmux root-table binding, tmux's escape-time.
- describeKeymap lists the bindings in effect and the commands that always
  work.
…Up key's shared meaning is noted

- "unknown field" echoed the JSON key raw into /keys, so a field name with an OSC or CSI sequence reached the
  terminal. It goes through the workspace's resourceText now.
- The keymap document records that the background task bar shares Up from an idle composer, for integration.
raiseCatError added a commit that referenced this pull request Oct 11, 2026
…sk quality and security pass

New heads for #375-#378, #383 and #384; a prioritized findings table with the fixes and their commits; the
investigated locations that are not vulnerabilities (the demo renderer, configAssist.ts:164, the session socket, Git
in untrusted repositories, dependencies); what cannot be validated before integration; and the contract changes
Codex needs at integration, including one precedence for Up from an idle composer.
@raiseCatError

Copy link
Copy Markdown
Owner Author

Integrated, not merged here: this head (1dc8a241) is part of the release line that shipped in v0.20.0 through the authoritative release PR #392 (merge commit 65e4de55). Closing because its changes reached master by that route; the branch is kept for history.

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.

1 participant