OpenTui fix - #10
Conversation
The OpenTUI renderer emits private CSI sequences such as kitty keyboard push flags (CSI >...u) whose leading '>' crashed the screen probe's int() parse, failing resize-repaint.pty.py under the parity suite. The CSI regex already admitted ?<>; strip all of them, not just ?. Co-authored-by: Aniket Pandey <ak802135@gmail.com>
fix(pty-probe): strip < and > private CSI markers before numeric parse
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 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.
🟢 Approval recommended
The change is small, aligns with the existing CSI regex contract, and prevents a concrete parsing failure without altering unrelated behavior.
Pull request overview
This PR updates the PTY “smoke” probe’s CSI parsing logic so it correctly handles additional CSI private marker prefixes, preventing numeric parameter parsing errors for sequences like kitty keyboard CSI >...u and device attribute replies.
Changes:
- Treat
?,<, and>as valid CSI private markers and strip them before parsing numeric parameters. - Add an explanatory comment aligning the parsing logic with the existing
CSI_REregex.
File summaries
| File | Description |
|---|---|
| scripts/pty-smoke.py | Expands CSI private-marker handling to avoid int() parse failures for CSI <... / CSI >... sequences. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
Related Issue
Closes #
Type of Change
How Has This Been Tested?
npm run typecheckpassesnpm testpassesTest Details
Screenshots / Recordings
Checklist