Skip to content

fix(windows): caret, wide-char drift, pane sizing, and resize recovery#42

Merged
artyomsv merged 7 commits into
masterfrom
fix/windows-ui-rendering
Jun 8, 2026
Merged

fix(windows): caret, wide-char drift, pane sizing, and resize recovery#42
artyomsv merged 7 commits into
masterfrom
fix/windows-ui-rendering

Conversation

@artyomsv

@artyomsv artyomsv commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Windows-focused TUI rendering and ConPTY robustness fixes surfaced while running quil in legacy conhost.

Fixes

  • Caret — interactive panes (claude-code, opencode) had no visible input caret, then a one-column desync after the hardware-cursor attempt. Now every pane type gets a software reverse-video caret drawn into the frame; the Bubble Tea hardware cursor is never used (its per-frame repositioning desynced the diff writer on Windows and dropped the first typed char a column right).
  • Wide-char column driftWidth==0 continuation cells of emoji/CJK glyphs no longer emit a phantom space that pushed following columns one cell right.
  • Pane boot size (ConPTY) — Windows ConPTY drops resize events fired before the child reads console input and never replays them, leaving claude/node at 80x24. resizeKick re-applies the size with a 1-column jiggle on first
    output, and pane cols/rows are persisted so restored panes respawn at the real size.
  • Window-size recovery + force-redraw — new redraw keybinding (default Alt+Shift+L: ClearScreen + re-query size) and a 1s size poll with a legacy-conhost grid fixup (CONOUT$ active screen buffer; grow-only; no-op in Windows Terminal). Recovers from conhost never growing its screen buffer on maximize.
  • Deps — bump Bubble Tea v2 to v2.0.7 (+ matched ultraviolet / x/ansi / colorprofile / go-runewidth).

Docs / site

  • docs/keybindings.md, docs/configuration.md, .claude/CLAUDE.md updated.
  • site/src/pages/install.astro: corrected vertical-split key to Alt+Shift+V (only site/** change → triggers Pages redeploy).

Known non-fix (documented, not a quil bug)

The "Test" → "T est" space after the first typed char in claude panes was traced byte-for-byte to claude-code v2.1.168's incremental keystroke renderer — reproducible on released v1.15.1, absent when running claude directly in Windows Terminal (quil sends identical bytes). Recommended: run quil in Windows Terminal.

Testing

  • go test ./... green; go vet ./... clean on Linux.
  • New tests: caret/cursor, wide-char, redraw, size poll, settle repaint, resize kick, persisted-size round-trip, conhost grid-target.

artyomsv and others added 7 commits June 8, 2026 16:31
Pulls in renderer/cursor patches plus matched ultraviolet, x/ansi,
colorprofile, and go-runewidth updates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Windows ConPTY drops resize events fired before the child reads console
input (claude/node mid-boot) and never replays them, leaving the child
at the spawn-time 80x24. Two fixes:

- resizeKick: re-apply the pane size with a 1-column jiggle on the
  pane's first output, when the child's console is provably wired up.
- Persist cols/rows in workspace.json and respawn restored panes via
  NewWithSize so they start at the real dimensions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Draw the reverse-video caret for every pane type (claude-code,
  opencode, ...) instead of the Bubble Tea hardware cursor. Per-frame
  repositioning of the real cursor desynced the diff writer on Windows
  and dropped the first typed character a column to the right.
- Skip Width==0 wide-char continuation cells in the cell renderers so
  emoji/CJK glyphs no longer drift following columns one cell right.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- redraw keybinding (default alt+shift+l): ClearScreen + re-query size,
  a recovery hatch for cell-diff drift and missed WindowSizeMsg.
- 1s size poll plus a legacy-conhost grid fixup (CONOUT$ active buffer):
  conhost shrinks its screen buffer with the window but never grows it
  back on maximize, leaving the grid stuck small. Grow-only, no-op in
  Windows Terminal.
- Settle repaints after a pane's first live output to clear boot-frame
  artifacts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Splits moved to Alt+Shift+H/V so Alt+V stays free for Claude Code's
image paste; the install HowTo step still showed the old Alt+V.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ering

# Conflicts:
#	docs/configuration.md
#	internal/config/config.go
#	internal/daemon/daemon.go
#	internal/tui/dialog.go
#	internal/tui/pane.go
@artyomsv artyomsv merged commit a1b8b01 into master Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant