Skip to content

fix(terminal): restore keyboard reporting on detach - #2395

Merged
ogulcancelik merged 1 commit into
masterfrom
akbash/2393-restore-keyboard-reporting
Aug 6, 2026
Merged

fix(terminal): restore keyboard reporting on detach#2395
ogulcancelik merged 1 commit into
masterfrom
akbash/2393-restore-keyboard-reporting

Conversation

@akbash-bot

Copy link
Copy Markdown
Collaborator

Summary

  • replace Herdr's Kitty keyboard stack entry with POP+PUSH instead of SET
  • preserve pre-Herdr keyboard reporting state on affected iTerm2 releases
  • cover both report-all transitions with exact protocol bytes

Checks

  • cargo test terminal_modes
  • cargo test client::tests::attach_escape_detaches_on_prefix_q -- --exact
  • cargo fmt --check
  • cargo clippy --all-targets --locked -- -D warnings
  • cargo nextest run --locked -E "all()" --no-fail-fast: 3233 passed, 1 harness-only failure because Kennel's isolated CARGO_TARGET_DIR is outside the checkout and live_server_holds_one_pty_master_fd_per_pane filters replacement PIDs by checkout-root executable path; server logs confirmed successful replacement startup

refs #2393

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b9f93219-54be-4c0a-9801-f1649881d6f4

📥 Commits

Reviewing files that changed from the base of the PR and between fc824b9 and 083b3d5.

📒 Files selected for processing (1)
  • src/terminal_modes.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/terminal_modes.rs

📝 Walkthrough

Walkthrough

On non-Windows systems, keyboard enhancement updates now replace the current keyboard stack entry with updated flags through pop and push commands. The test verifies the resulting escape sequences.

Changes

Keyboard enhancement handling

Layer / File(s) Summary
Replace keyboard enhancement stack entry
src/terminal_modes.rs
Crossterm stack commands replace the direct Kitty SET sequence. The test verifies the pop and push escape sequences.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • herdrdev/herdr#2347: Related keyboard enhancement stack handling and tests in src/terminal_modes.rs.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the terminal fix that restores keyboard reporting when Herdr detaches.
Description check ✅ Passed The description directly explains the POP+PUSH keyboard handling change, compatibility goal, tests, and validation results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch akbash/2393-restore-keyboard-reporting

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

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 6, 2026
@akbash-bot
akbash-bot force-pushed the akbash/2393-restore-keyboard-reporting branch from ac3c9c6 to 083b3d5 Compare August 6, 2026 01:47
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown

Greptile Summary

This PR changes host Kitty keyboard report-all transitions from SET to POP+PUSH so Herdr replaces only its own stack entry and preserves the terminal's prior reporting state on detach.

  • Emits exact crossterm POP and PUSH commands for both report-all states.
  • Updates the unit test to verify both protocol-byte transitions.

Confidence Score: 5/5

The PR appears safe to merge.

The changed transitions replace the Herdr-owned keyboard-stack entry without changing stack depth, while existing attach and teardown paths retain balanced initial push and final pop behavior.

Important Files Changed

Filename Overview
src/terminal_modes.rs Replaces destructive Kitty SET transitions with stack-preserving POP+PUSH transitions and updates exact-byte coverage; no actionable defect found.

Reviews (1): Last reviewed commit: "fix(terminal): restore keyboard reportin..." | Re-trigger Greptile

@ogulcancelik
ogulcancelik merged commit e9222d1 into master Aug 6, 2026
7 checks passed
@kangal-bot kangal-bot removed the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 6, 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.

3 participants