Skip to content

fix: run prefix bindings for plain text from kitty terminals - #5277

Merged
ogulcancelik merged 1 commit into
masterfrom
issue/5255-prefix-plain-text
Oct 14, 2026
Merged

ogulcancelik merged 1 commit into
masterfrom
issue/5255-prefix-plain-text

Conversation

@ogulcancelik

Copy link
Copy Markdown
Collaborator

Since 0.9.4, the key after the prefix is silently dropped when the terminal sends it as plain text instead of a key code. That breaks every prefix shortcut in Tern, Ghostty text: keybinds that send the prefix plus a key, and macOS CJK input methods (reports also mention iTerm2). Plain typing in Ghostty, kitty and WezTerm sends key codes and was unaffected. Workspace navigation had the same hole.

Cause: #5017 treats plain text from a host in Kitty report-all mode as an IME/compose commit. Herdr also switches the host to report-all in prefix and navigate mode, where a committed text has nowhere to go, so the key never reached binding resolution.

Fix: plain text is only a commit when it is bound for the focused pane (terminal mode, no overlay). Everywhere else it stays a key, as in 0.9.3. Pane text commits from #5017 are unchanged.

refs #5255

Validation:

  • new tests fail on 0.9.4 and pass with the fix: plain key after the prefix (reported prefix + plain key, and one-write ^B + key), plain key in navigate mode
  • preservation tests: CJK and ASCII commits still reach a report-all pane as text; all ten Herdr text fields accept plain and CJK bytes on a report-all host
  • end-to-end PTY harness driving release binaries as a fake Kitty/legacy terminal with the reporters' exact bytes: 0.9.3 8/8, 0.9.4 5/8, fix 8/8
  • tested live in Tern 0.8.3
  • independent review: no findings
  • just check

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 85fb52ef-6fa1-4ecf-914a-017b5609a83f
📥 Commits

Reviewing files that changed from the base of the PR and between 00584a2 and b18c779.

📒 Files selected for processing: 3
  • src/client/shell/input.rs
  • src/client/shell/tests/input.rs
  • src/client/shell/tests/text_editing.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📝 Walkthrough

Generated text becomes a pane text commit only when all-key reporting is enabled, the event is a press, the shell is in Terminal mode, and no overlay is active. In other contexts, the key remains available for shell key handling. Tests cover prefix and navigate bindings, terminal text commits, and UTF-8 input in ten text-editing fields.

Suggested reviewers: jjliebig

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to b18c7

No actionable issue is identified. The change appears ready to merge after normal checks.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main fix: restoring prefix bindings for plain-text input from Kitty terminals.
Description check Passed The description directly explains the regression, cause, fix, affected input contexts, tests, and validation results.
Docstring Coverage Passed Docstring coverage is 88.89% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kangal-bot

Copy link
Copy Markdown
Collaborator

@coderabbitai review
@greptileai

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Keeps plain host text on the key path when Herdr owns the input, restoring prefix shortcuts and workspace navigation.

  • Plain keys still run bindings when Herdr owns input.

Reviews (1) · Last reviewed commit: "fix: run prefix bindings for plain text ..." · Reviewed by Greptile

@ogulcancelik
ogulcancelik merged commit f53f92d into master Oct 14, 2026
12 of 13 checks passed
@ogulcancelik
ogulcancelik deleted the issue/5255-prefix-plain-text branch October 14, 2026 16:09
dyurk-lila pushed a commit to dyurk-lila/herdr that referenced this pull request Oct 14, 2026
aceitw added a commit to aceitw/herdr that referenced this pull request Oct 18, 2026
Keep our fork features (federation, gram, api-bridge, guest, push,
notifications, agent archive/forget/transfer, accounts, staged updates)
alongside upstream's v0.9.4, v0.9.5 and unreleased fixes. Most source
conflicts keep our fork's Method enum (upstream's define_operations!
macro cannot express our cfg-gated and serde-skipped variants). Detection
manifests keep our extra rules; Codex integration scripts switch to
upstream's canonical version.

Upstream highlights:
- Persistent macOS/Linux server (SIGHUP no longer stops it)
- Session saves on system shutdown/restart
- Plugin update command
- Keyboard/IME fixes (non-Latin layouts, Ctrl+Shift, accents)
- Windows improvements (PowerShell 7 default, clipboard, notifications)
- SSH compression and bandwidth improvements
- Performance fixes (CPU, memory, hidden pane improvements)
- Codex, Claude Code, Pi, Antigravity, Grok detection updates
- New platform modules (launchd spawn, power/shutdown)
- Vendor patches (libghostty-vt cursor hyperlink, portable-pty Windows dir)

refs herdrdev#5310, herdrdev#5278, herdrdev#5236, herdrdev#5303, herdrdev#5308, herdrdev#5275, herdrdev#5280, herdrdev#5282,
     herdrdev#5277, herdrdev#5276, herdrdev#5270, herdrdev#5269, herdrdev#5252, herdrdev#5249, herdrdev#5247, herdrdev#5241,
     herdrdev#5242, herdrdev#5192, herdrdev#5232, herdrdev#5212, herdrdev#5174, herdrdev#5173, herdrdev#5171, herdrdev#5092
maciejul pushed a commit to maciejul/herdr-supercharged that referenced this pull request Oct 28, 2026
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.

2 participants