fix(debug): Alt+Shift+D binding + surface capture feedback in the hint row - #552
Open
fentas wants to merge 2 commits into
Open
fix(debug): Alt+Shift+D binding + surface capture feedback in the hint row#552fentas wants to merge 2 commits into
fentas wants to merge 2 commits into
Conversation
The kitty keyboard protocol reports a letter key by its UNSHIFTED codepoint plus
a shift modifier bit — so Alt+Shift+D is `\x1b[100;4u` (100='d', mod 4=alt+shift),
not `\x1b[68;4u` ('D'=68). The debug_capture binding (and the pre-existing
security_guard_show_warnings / Alt+Shift+W binding, 87='W') used the uppercase
code, so on Ghostty/kitty/foot/WezTerm the CSI-u never matched: the Action never
fired and the meta-bytes were dropped by the CSI-u interceptor — pressing
Alt+Shift+D produced no feedback at all. (Ctrl+Shift+I at defaults.zig:69 already
uses the correct lowercase 105='i'.)
Bind the lowercase forms (`\x1b[100;4u`, `\x1b[119;4u`); keep the uppercase ones
as a fallback for any terminal that reports the shifted code.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The capture outcome ("report saved → …" / "recording off …" / "save failed")
now shows in the status-bar hint row (above the footer, TTL-cleared) instead of
being written inline to stdout — where it stacked up across presses and collided
with the shell prompt. Falls back to an inline toast only when no status bar is
configured. captureDebugReport returns the message; the proxy sets it via
sb.setHint + repaints so it appears immediately. The debug_capture e2e now runs
with the status bar on to exercise this path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes so the debug capture (Alt+Shift+D) actually works + gives clean feedback.
1. The binding never matched (no feedback at all)
The kitty keyboard protocol reports a letter by its unshifted codepoint + a shift-modifier bit. Alt+Shift+D is
\x1b[100;4u(d=100), but the binding used\x1b[68;4u(D=68). On kitty-kbd terminals (Ghostty/kitty/foot/WezTerm) it never matched → thedebug_captureAction never fired → the bytes were swallowed → nothing happened.Ctrl+Shift+Iatdefaults.zig:69already used the correct lowercase (105); theAlt+Shift+*bindings had diverged. Bind the lowercase forms (keep the uppercase as a fallback). Same latent bug fixed for Alt+Shift+W (security_guard warnings).2. Feedback now shows in the hint row (not inline scrollback)
The capture outcome (
report saved → …/recording off …/save failed) is now shown via the status-bar hint row above the footer (TTL-cleared) instead of an inline stdout write that stacked up across presses and collided with the prompt. Falls back to an inline toast only when no status bar is configured. Thedebug_capturee2e now runs with the status bar on to exercise this path.zig build test+zig build e2e(debug_capture) green;zig buildgreen.