Repository navigation
test(terminal): pin Option-composed currency on a punctuation key - #22608
Conversation
#21082 widened the kitty composed-text check from ASCII to every printable codepoint, which is what restored French Option+$ -> €. Nothing pinned a composed character on a punctuation code: the Polish cases all sit on `Key*` codes, whose unmodified character the US fallback table also answers, so they pass even when the layout map is the only source of `characterWithoutOption`. Reverting the widening fails this case at kitty flags 1, 3, 5 and 7. Co-authored-by: rasata <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAdds a parameterized test for French Mac Option+$ composition. The test checks that resolving Option+BracketRight sends € across kitty flags 1, 3, 5, and 7, with Option-as-Alt disabled or configured on either side. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The new test protects euro composition across the listed kitty flags and Option settings. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — one inaccurate comment worth correcting.
Reviewed changes
- New currency composition case — adds
Option+$→€on a French Mac layout (key: '€',code: 'BracketRight') across kitty flags 1/3/5/7 and the three compose modes interminal-shortcut-option-compose.test.ts:154. Test-only; no production code changes.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| // #22447: Option+$ composes € on a French Mac layout. The Polish cases above all | ||
| // sit on `Key*` codes whose unmodified character the US fallback table also knows; | ||
| // a punctuation code resolves `characterWithoutOption` through the layout map alone. |
There was a problem hiding this comment.
Two claims here do not hold, and they are the stated reason this test exists. pc101CharacterForCode('BracketRight') returns ']' from the US fallback table, so characterWithoutOption resolves even when layoutCharacterForCode is not supplied — the layout map is not the only source — and the Polish cases sit below this test, not above.
Reverting the widening to codePoint > 0x20 && codePoint <= 0x7e fails #20171, both Polish cases, and the supplementary-plane case as well (8 failures, only 4 of them this new test), so it does not close a gap the existing cases left open. The test is still worth keeping for the punctuation-code variant and flags 3/7; just correct the rationale.
| // #22447: Option+$ composes € on a French Mac layout. The Polish cases above all | |
| // sit on `Key*` codes whose unmodified character the US fallback table also knows; | |
| // a punctuation code resolves `characterWithoutOption` through the layout map alone. | |
| // #22447: Option+$ composes € on a French Mac layout. Unlike the `Key*` cases | |
| // above, this covers a non-ASCII character composed over a punctuation code, | |
| // across kitty flags 1, 3, 5, and 7. |

ELI5
On a French Apple keyboard, ⌥+$ types
€. In an Orca terminal it typed nothing. That was fixed in v1.4.209 — this adds the test that keeps it fixed, because the tests we had would all still have passed while€was broken.What Changed
One test case.
terminal-shortcut-option-compose.test.tsgains French ⌥+$ →€across kitty flags 1, 3, 5 and 7 and all three Option-as-Alt compose modes.No product code changes.
Why
isLayoutComposedCharacterused to accept only0x21–0x7e, so every Option-composed character outside ASCII —€at U+20AC, and every accented letter — was re-encoded as an Alt chord and the character never reached the TUI. #21082 widened it to every printable codepoint and landed in v1.4.209, which is what makes #22447 pass today.What #21082 pinned was the Polish letters. Those all sit on
Key*codes, andpc101CharacterForCodeanswersKey*from the US fallback table, socharacterWithoutOptionresolves even when the layout map does not.€sits on a punctuation code where the layout map is the only source. Reverting the widening fails this new case at every flag value and leaves the Polish cases green — which is the gap.Verified by reverting
isLayoutComposedCharacterto the old ASCII bound: 8 failures, all of them the new case.Linked Issue
Fixes #22447
Visual Proof
N/A — test-only change; no product behavior moves.
Testing
I also confirmed end to end, on a real PTY under the macOS renderer policy, that ⌥+$ delivers
€as a single write at kitty flags 0 (Claude Code negotiates none) and 7 (Codex negotiatesCSI > 7 u). The reporter filed against a build predating v1.4.209; asking them to confirm on current before closing.AI Disclosure
Claude Opus 5 was used to reproduce the reported case against the current build, locate which commit already fixed it, and find the coverage gap.
Review
Whether pinning one punctuation-code case is the right size, or whether the layout-map path deserves a table across several non-US layouts.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Test-only. No security, platform, SSH, mobile, performance or compatibility surface.
Checklist