Skip to content

fix(tui): align Ctrl+L and /model default scope with classic CLI#16657

Merged
OutThisLife merged 4 commits into
mainfrom
bb/tui-keybinding-model-parity
Apr 27, 2026
Merged

fix(tui): align Ctrl+L and /model default scope with classic CLI#16657
OutThisLife merged 4 commits into
mainfrom
bb/tui-keybinding-model-parity

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

  • remap Ctrl+L in TUI input handling to non-destructive redraw/repaint behavior instead of starting a new session
  • align typed /model behavior with classic CLI by keeping session scope as the default (no implicit --global)
  • update hotkey docs and slash tests to lock the new semantics

Test plan

  • npm run type-check (in ui-tui/)
  • npm run build --prefix packages/hermes-ink && npm test -- --run src/__tests__/createSlashHandler.test.ts src/__tests__/constants.test.ts (in ui-tui/)

Make Ctrl+L non-destructive by redrawing the current screen state instead of starting a new session, and stop auto-appending --global for typed /model commands so session scope remains the default unless explicitly requested.
Run ui-tui lint autofix + prettier and commit the resulting formatting-only changes for the keybinding/model parity branch.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts TUI UX and slash-command semantics to match classic CLI expectations by remapping Ctrl/Cmd+L to a non-destructive repaint and by keeping typed /model changes session-scoped by default.

Changes:

  • Remap Ctrl/Cmd+L from “new session” to a redraw/repaint behavior in input handling and hotkey docs.
  • Change /model argument handling so typed switches no longer implicitly append --global (session scope remains default).
  • Update/extend tests to reflect the new hotkey and /model semantics.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui-tui/src/content/hotkeys.ts Updates the documented meaning of Ctrl/Cmd+L to “redraw / repaint”.
ui-tui/src/app/useInputHandlers.ts Implements the new Ctrl/Cmd+L behavior (no session reset).
ui-tui/src/app/slash/commands/session.ts Removes implicit --global appending for typed /model values while still stripping the internal --tui-session flag.
ui-tui/src/tests/createSlashHandler.test.ts Updates /model expectations to remain session-scoped by default.
ui-tui/src/tests/constants.test.ts Adds a test asserting the hotkey documentation change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/app/useInputHandlers.ts Outdated
Comment thread ui-tui/src/__tests__/constants.test.ts Outdated
Use explicit repaint patch semantics for Ctrl/Cmd+L and narrow the hotkey assertion to the actual +L entry so unrelated descriptions do not cause false failures.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Apr 27, 2026
@OutThisLife

Copy link
Copy Markdown
Collaborator Author

Addressed Copilot review feedback in da6f844:\n- switched Ctrl/Cmd+L repaint handler to explicit \n- narrowed hotkey assertion to the specific +L entry to avoid brittle global phrase matching

@OutThisLife

Copy link
Copy Markdown
Collaborator Author

Correction on the first bullet above: switched Ctrl/Cmd+L repaint handler to explicit patchUiState({}).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/app/useInputHandlers.ts
Expose a small forceRedraw API from @hermes/ink and use it for Ctrl/Cmd+L so the hotkey performs a real terminal clear + full repaint instead of a no-op state patch.
@OutThisLife

Copy link
Copy Markdown
Collaborator Author

Addressed the latest Copilot redraw note in b3e7a41:\n- exported from \n- wired Ctrl/Cmd+L to call after clearing selection\n- keeps hotkey behavior as actual clear + full repaint parity with classic Ctrl+L

@OutThisLife

Copy link
Copy Markdown
Collaborator Author

Correction on the previous comment:

Addressed the latest Copilot redraw note in b3e7a41:

  • exported forceRedraw from @hermes/ink
  • wired Ctrl/Cmd+L to call forceRedraw(terminal.stdout ?? process.stdout) after clearing selection
  • keeps hotkey behavior as actual clear + full repaint parity with classic Ctrl+L

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@OutThisLife OutThisLife merged commit 6d24880 into main Apr 27, 2026
12 of 14 checks passed
@OutThisLife OutThisLife deleted the bb/tui-keybinding-model-parity branch April 27, 2026 17:49
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
…ding-model-parity

fix(tui): align Ctrl+L and /model default scope with classic CLI
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…ding-model-parity

fix(tui): align Ctrl+L and /model default scope with classic CLI
dannyJ848 pushed a commit to dannyJ848/hermes-agent that referenced this pull request May 17, 2026
…ding-model-parity

fix(tui): align Ctrl+L and /model default scope with classic CLI
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…ding-model-parity

fix(tui): align Ctrl+L and /model default scope with classic CLI
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…ding-model-parity

fix(tui): align Ctrl+L and /model default scope with classic CLI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants