Skip to content

Fix Windows Codex terminal cursor rendering - #4669

Merged
Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/blinking-cursor
Jun 5, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/blinking-cursor

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • enable xterm ConPTY compatibility only for local native Windows PTYs
  • coalesce split DEC synchronized-output chunks until the real post-?2026l cursor restore arrives, instead of treating Codex's transient cursor show as final
  • tighten the headed Codex repro with timestamped PTY/frame diagnostics and an exact cursor-color raster probe

Validation

  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler.test.ts src/renderer/src/lib/pane-manager/windows-pty-compatibility.test.ts src/renderer/src/components/terminal-pane/terminal-conpty-device-attributes.test.ts
  • pnpm exec oxlint src/renderer/src/lib/pane-manager/pane-terminal-foreground-render-settle.ts src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler.ts src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler.test.ts src/renderer/src/components/terminal-pane/pty-connection.ts tests/e2e/terminal-codex-cursor-jitter-repro.spec.ts tests/e2e/terminal-cursor-raster-probe.ts --quiet
  • pnpm run typecheck:web
  • pnpm exec playwright test -c tests/playwright.config.ts tests/e2e/terminal-codex-cursor-jitter-repro.spec.ts --project=electron-headful --grep queued-message
  • repro artifact check: logicalVisible=0, rasterWorkingCursor=0

@Jinwoo-H
Jinwoo-H force-pushed the Jinwoo-H/blinking-cursor branch from 5cb68e0 to c33d410 Compare June 5, 2026 00:37
@Jinwoo-H
Jinwoo-H merged commit edac541 into main Jun 5, 2026
1 check passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/blinking-cursor branch June 5, 2026 00:54
LesleyMurfin added a commit to LesleyMurfin/orca that referenced this pull request Jun 25, 2026
…PTYs

The cursor hide/show protection added for native-Windows ConPTY (stablyai#4669/stablyai#4907)
is gated to isNativeWindowsConpty and is never applied to remote-runtime PTYs.
Remote serve-hosted PTYs split the \e[?25l ... \e[?25h burst across separate
output frames identically, leaving the text cursor hidden while typing in
repainting TUIs (claude, vim, htop) over the serve->client transport.

- Extract the protection gate into a pure shouldProtectSplitCursorBursts()
  predicate and broaden it to remote-runtime PTYs (native-Windows ConPTY
  behaviour unchanged).
- Add a persistent hold-until-show so an intermediate cursor-free redraw
  frame extends the hold instead of draining cursor-hidden (>=3-frame split).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
nwparker added a commit to STiFLeR7/orca that referenced this pull request Nov 30, 2026
On native Windows ConPTY panes, a DEC 2026 frame end always took the
cursor-restore coalesce wait (up to 1 s, or the 250 ms hold safety for
split frames), so a ~20 fps synchronized animation froze and then jumped.
That wait exists for frames that toggle cursor visibility and send the
restore later (stablyai#4669, stablyai#4708). A frame with no ?25h/?25l owes no restore.

Track whether an open frame has toggled cursor visibility across every
chunk it spans, using the carried marker tail to catch a ?25h/?25l split
at a chunk boundary. Cursor-free frames, whole or split by ConPTY's
8 KiB reads, now present at their end marker. Frames that toggle the
cursor, and frames whose start the pane did not see, keep the existing
restore wait.

Refs stablyai#52839

Co-authored-by: STiFLeR7 <[email protected]>
nwparker added a commit to STiFLeR7/orca that referenced this pull request Nov 30, 2026
On native Windows ConPTY panes, every DEC 2026 frame end took the
cursor-restore coalesce wait (up to 1 s, or the 250 ms hold safety for
split frames), so a ~20 fps synchronized animation froze and then
jumped. That wait exists for frames that toggle cursor visibility and
send the restore later (stablyai#4669, stablyai#4708). A frame with no ?25h/?25l is
treated as owing no restore.

Track whether the open frame has toggled cursor visibility across every
chunk it spans, using the carried marker tail to catch a ?25h/?25l split
at a chunk boundary. Scope that flag to frame boundaries, so a chunk
that closes one frame and opens the next starts the new frame clean.
Cursor-free frames, whole or split by ConPTY reads, now present at their
end marker. Frames that toggle the cursor, frames whose start the pane
did not see, and unmatched end markers keep the existing restore wait.

Partial: frames that toggle the cursor (Codex, Claude Code native
cursor) still wait for the restore fallback.

Refs stablyai#52839

Co-authored-by: STiFLeR7 <[email protected]>
nwparker added a commit that referenced this pull request Nov 30, 2026
#52969)

On native Windows ConPTY panes, every DEC 2026 frame end took the
cursor-restore coalesce wait (up to 1 s, or the 250 ms hold safety for
split frames), so a ~20 fps synchronized animation froze and then
jumped. That wait exists for frames that toggle cursor visibility and
send the restore later (#4669, #4708). A frame with no ?25h/?25l is
treated as owing no restore.

Track whether the open frame has toggled cursor visibility across every
chunk it spans, using the carried marker tail to catch a ?25h/?25l split
at a chunk boundary. Scope that flag to frame boundaries, so a chunk
that closes one frame and opens the next starts the new frame clean.
Cursor-free frames, whole or split by ConPTY reads, now present at their
end marker. Frames that toggle the cursor, frames whose start the pane
did not see, and unmatched end markers keep the existing restore wait.

Partial: frames that toggle the cursor (Codex, Claude Code native
cursor) still wait for the restore fallback.

Refs #52839

Co-authored-by: Neil <[email protected]>
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