Conversation
…SI < u CLIs like "claude setup-token" send CSI < u (Kitty keyboard protocol "pop keyboard mode") on exit. BossTerm's pushBackReordered() was splitting this into '<' (written as visible char) + bare CSI u (cursor restore to stale position). The restored cursor landed near the top of the screen, and zsh's subsequent ESC[J erased all visible content including the token. Fix: CSI sequences with unrecognized private parameter prefixes (like '<', '=') are now silently ignored instead of being split by pushBackReordered. Also hardens synchronized output mode (?2026) rendering: - Redraw channel consumer re-checks sync flag after debounce delay - requestImmediateRedraw re-checks sync flag at execution time - Prevents rendering intermediate states during rapid ?2026l/?2026h toggles Generated with [Claude Code](https://claude.com/claude-code)
Code Review - PR #244SummaryThis PR fixes a critical bug where terminal output was being wiped after CLI tools exit. The root cause was that CSI < u (Kitty keyboard protocol pop) was being misinterpreted as CSI u (cursor restore), causing the cursor to move to a stale position and subsequent ESC[J sequences to clear visible content. Positive Findings1. Root Cause Analysis ✅Excellent diagnosis - the issue was correctly identified as a parsing problem where the < character in CSI < u was being treated as an unhandled char and pushed back, resulting in < being written to screen + bare CSI u being processed as cursor restore. 2. Elegant Solution ✅The fix in BossEmulator1.kt:159-167 is clean and surgical with minimal code changes and maximum impact. 3. Race Condition Hardening ✅The synchronized update mode improvements are well-thought-out with triple-check pattern to prevent TOCTOU issues. Issues & Concerns1. Missing Test Coverage
|
Summary
claude setup-tokenexitCSI < u(Kitty keyboard pop) was misinterpreted asCSI u(cursor restore), moving cursor to stale position near top of screen, then zsh'sESC[Jerased all visible content?2026) to prevent rendering intermediate states during rapid toggleTest plan
claude setup-tokenin BossTerm — token output should remain visible after command completesclaude access-token— same behavior, output stays on screenCSI s/CSI u(cursor save/restore) still works for zsh-autosuggestions🤖 Generated with Claude Code