Skip to content

fix(js): preserve states before leading repaint - #177

Merged
konard merged 9 commits into
mainfrom
fix-175-leading-repaint
Jul 24, 2026
Merged

fix(js): preserve states before leading repaint#177
konard merged 9 commits into
mainfrom
fix-175-leading-repaint

Conversation

@konard

@konard konard commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • snapshot the current emulator state before a later full-screen repaint
  • parse repaint control sequences incrementally when PTY delivery splits them across output chunks
  • retain fast intermediate TUI states inside the settle window in both JavaScript and Rust
  • add deterministic cross-language PTY regressions reproducing the Windows CI loss observed after feat: capture PTY terminal sessions #176

Reproduction

The fixtures paint first-state, wait 20 ms, split the next ANSI clear sequence across two writes, then paint second-state, while capture settling is configured for 100 ms. Before this fix, both implementations produced a transcript containing only second-state.

Verification

  • bun test js/tests/terminal-capture.test.mjs --timeout 10000 — 7 passed
  • PATH=/tmp/formal-ai-841-bin:$PATH bun test js/tests/ --timeout 10000 — 781 passed, 5 skipped, 0 failed (complete-sequence revision)
  • targeted ESLint and Prettier checks — passed
  • cargo test --manifest-path rust/Cargo.toml --test terminal_capture — 5 passed
  • cargo fmt --manifest-path rust/Cargo.toml --all -- --check
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features
  • cargo test --manifest-path rust/Cargo.toml --doc --all-features

Follow-up to #176 and part of #175.

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