-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
The session mirror produces word-merged text like I'llreadthecodebase because the Ink TUI renders adjacent characters without column gaps. The cursor-tracking parser in mirror_strip_ansi() correctly sees no gap but the result is unreadable prose.
Issue #29 accepts this limitation for the initial fix (plan B+D+F). This issue tracks the harder problem of splitting merged words in the live mirror.
Approach: Hybrid strip + selective wordninja
- Replace
mirror_strip_ansi()with the simplerstrip_ansi()(regex replace with space + collapse) for mirror output - For lines that look like prose (>40 chars, no code indicators like
/,\,::,{,}), runwordninja.split()and rejoin - Leave code-like lines (paths, commands, SQL) untouched
Performance
wordninja.split()is ~2ms per call on typical lines- With rate-limited mirror writes (200-500ms buffer from Session mirror: garbage not filtered + word-merging/letter drops #29), the number of lines processed is already reduced
- Only prose lines get split — code/paths are skipped
- Acceptable for a log file that's consumed by
tail -f
Depends on
- Session mirror: garbage not filtered + word-merging/letter drops #29 — shared filter module + rate-limited writes (implement first, then evaluate if word-merging is still a problem after rate-limiting reduces mid-repaint artifacts)
Alternative
If wordninja is too aggressive (splits identifiers, URLs), consider a lighter approach: insert spaces before capital letters in runs of 30+ lowercase chars. Catches readthecodebase → read the codebase but won't help with Doyouwanttoproceed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels