hermes - 💡(How to fix) Fix feat(tui): terminal capability platform — probe, /doctor, capability-aware hotkeys (splits PR #20421) [2 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Problem

hermes --tui has no programmatic picture of what terminal/multiplexer/SSH stack it's running inside. Clipboard routing, keyboard encoding, paste shortcut shapes, and help text are all guessed from a few env-var heuristics sprinkled across the codebase. When a user hits a weird issue ("paste silently drops chars", "Cmd+V doesn't work over SSH"), we have no doctor surface to inspect reality.

PR #20421 drafted the machinery for this — signal collection, a 21-profile registry, an async probe (xtversion / DA2 / DECRQM / kitty / OSC52-read), a capability deriver, a doctor formatter, capability-aware help hints — but shipped none of it wired in. See OutThisLife's review on #20421.

The minimum user-visible fix is being split out as #21372. This issue tracks the platform follow-up.

Scope (PR B)

Wire the capability platform end-to-end, with real integration tests, no mocks.

  1. Call probeTerminalCapabilities() from ui-tui/src/entry.tsx with a real ink querier. Write the result into $terminalEnvironment via updateTerminalProbe(). Gate behind HERMES_TERMINAL_PROBE=1 for one release.
  2. Add a /doctor slash command in ui-tui/src/app/slash/commands/core.ts that renders formatTerminalDoctor($terminalEnvironment.get()). Include in /help listing.
  3. Swap ui-tui/src/components/helpHint.tsx from the static HOTKEYS constant to buildHelpHintHotkeys({signals, capabilities}) pulled from $terminalEnvironment. Same swap in the /help hotkeys panel.
  4. Precedence fix in terminalCapabilities.ts:233 — lift const kitty = probe.kittyKeyboard ?? (probe.kittyKeyboardFlags ?? 0) > 0 to a local before the ternary.
  5. Collapse the signalsEnv + double-findMultiplexer block in deriveTerminalCapabilities to the ~4-line form OutThisLife sketched in the review.
  6. Rewrite findProfile() docstring to match the actual semantics ("any positive signal matches; a set-but-mismatched termProgram/termPattern short-circuits").
  7. Sort TERMINAL_REGISTRY once at module load instead of on every findProfile() call.
  8. Replace the custom redactIp in terminalDoctor.ts with isIP() from node:net for IPv6 safety. (Author claims done in 8dbfb5b; re-verify on rebase.)
  9. shellSignals.startupRiskHints: either probe the actual rc file on demand from /doctor, or drop the field. Shipping unconditional "bashrc can reset TERM" hints as if they were evidence is noise.

Tests

  • ui-tui/src/__tests__/terminal-integration.test.ts: spin up a real ink instance under each TERMINAL_REGISTRY profile via env injection (no mocks) and assert end-to-end copy/paste/interrupt routing. OutThisLife's spec.
  • Keep the unit tests for terminalCapabilities, terminalProbe, terminalDoctor, hotkeys::buildHelpHintHotkeys that #20421 already ships.

Dependencies

  • #21372 must merge first. PR B branches off #21372's merge commit on origin/main.

Non-scope

  • No change to the basic Cmd+C / Ctrl+C / Option+C classification rules (PR A / #21372 scope).
  • No new terminal profiles beyond what #20421 already enumerates. Expand later as real reports come in.

Acceptance

  • HERMES_TERMINAL_PROBE=1 hermes --tui then /doctor prints a correct transport/layers/terminal/shell/keyboard/clipboard summary on a test matrix covering: iTerm2 local, tmux, iTerm2 → SSH, iTerm2 → SSH → tmux, kitty local, ghostty local, wezterm local.
  • helpHint.tsx shows Cmd+V on darwin, Ctrl+Shift+V on modern Linux terminals, Alt+V on fallback, and a tmux hint when appropriate.
  • Integration test green.
  • OSC52 read path (caps.copy.readPath === 'osc52-query') actually reachable when the outer terminal supports OSC 52 reads.

Context

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix feat(tui): terminal capability platform — probe, /doctor, capability-aware hotkeys (splits PR #20421) [2 pull requests]