fix(tui): strip fragmented wheel reports and make friction approvals macOS-usable - #115
Merged
Conversation
A fast wheel burst (Logitech) splits SGR mouse reports mid-sequence; the tails that reach the model are bare report fragments like ';1;1M' or '64;5;13M', plain or carrying the Alt bit from the consumed ESC head. The previous filter refused Alt messages and required the leading button digits, so those shapes spliced into the composer as repeating codes. The strip now drops bracketed reports wherever they appear, accepts an empty button field, honors the Alt bit, and clears any remainder that is entirely bare report tails — typed text coexisting with a stripped fragment is preserved.
The approval fatigue gate required Alt+A / Alt+D, which macOS Option-as-UTF-8 terminals cannot deliver. The friction handler now routes plain keys through the empty-draft guard of the normal approval path: a bare 'a' opens the confirmation editor (never approves — the typed word still decides), a bare 'd' denies. Alt chords unchanged, paste still inert, trust stays withdrawn under friction. Hint strings and README document the plain keys.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bodek | 04e36e9 | Commit Preview URL Branch Preview URL |
Sep 12 2026, 02:01 PM |
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.
Summary
Two user-reported defects, one consolidated fix PR:
1. Mouse wheel codes repeating in the composer (Logitech)
A fast wheel burst splits SGR mouse reports mid-sequence; leftover tails (
;1;1M,64;5;13M— plain or carrying the Alt bit from the consumed ESC head) reached the model as text and spliced into the draft.stripLeakedMouseReportsnow strips bracketed reports wherever they appear, accepts an empty button field, honors the Alt bit, and clears any remainder that is entirely bare report tails. Typed text coexisting with a fragment is preserved; paste remains exempt.2. Friction approvals required Alt+A / Alt+D — untypeable on macOS
The approval-fatigue gate now routes plain keys through the same empty-draft guard as normal approvals: bare
aopens the confirmation editor (never approves — the typed wordapprove+ ⏎ still decides, so friction keeps its teeth), bareddenies. Alt chords unchanged, paste inert, trust stays withdrawn under friction. Hints and README updated.Validation
wheel_leak_test.go,friction_plainkeys_test.go); three pre-existing tests encoding the old Alt-only contract updated deliberately.