Skip to content

fix(ink-win): strip synchronized-update escapes instead of exact-matching them - #900

Open
ozymandiashh wants to merge 1 commit into
getagentseal:mainfrom
ozymandiashh:fix/ink-win-strip-sync-escapes
Open

fix(ink-win): strip synchronized-update escapes instead of exact-matching them#900
ozymandiashh wants to merge 1 commit into
getagentseal:mainfrom
ozymandiashh:fix/ink-win-strip-sync-escapes

Conversation

@ozymandiashh

Copy link
Copy Markdown
Collaborator

Hardening for the bug class that recurred in #863: the ConPTY guard from #195 compares chunks with exact equality, so BSU + payload in one write bypasses it entirely and hangs Windows. This makes the guard structural instead of conventional:

  • string chunks get every BSU/ESU occurrence stripped (includes gate first, so the hot path pays one scan);
  • a fully-swallowed write now invokes its callback asynchronously, closing a latent wedge the old filter had for callback-style writers;
  • non-string chunks pass through untouched;
  • BSU/ESU are exported, so surfaces that emit them (the Stabilize TUI refresh, scrolling, responsive layout, and dashboard data density #863 resize path once it lands) share one definition.

7 new tests in tests/ink-win.test.ts, including the exact #863 regression shape (BSU + clear + home). tsc --noEmit clean.

Merge-order note: #863 also touches ink-win.ts (adds the same exports). Whichever lands second has a one-hunk conflict; I will resolve it on the spot.

…hing them

The ConPTY guard swallowed a chunk only when it exactly equaled BSU or
ESU, so any write concatenating them with other output reached Windows
raw and hung ConPTY, which buffers the unimplemented 2026 sequence
indefinitely (getagentseal#195; the class recurred in getagentseal#863's resize path). Strip
every occurrence from string chunks instead: standalone escapes are
swallowed, concatenated ones lose only the escapes, and a swallowed
write now also honors its callback so callback-style writers cannot
wedge. Non-string chunks pass through untouched.
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