Commit Graph
19 Commits
Author SHA1 Message Date
can1357 7ebaa3e4c5 fix(tui): switched stress subprocess IPC to temp files
- Replaced stdio pipes with temp-file transport since bun test's spawned-child pipes deliver no data on this runtime.
- Passed scenario via input/output file argv instead of stdin/stdout.
- Kept stderr inherited so hard crashes still surface diagnostics.
2026-06-05 16:13:50 +02:00
can1357 307d0ca226 fix(tui): added parent cleanup for TUI stress subprocesses
- Added a process-wide registry for stress test subprocesses and moved spawn tracking there.
- Installed parent process exit and signal handlers that SIGKILL all tracked children before shutdown.
- Updated failure and timeout cleanup paths to hard-kill children, preventing orphaned busy-loop stress workers.
2026-06-04 06:09:13 +02:00
can1357 2b50e06e0c fix(tui): made VirtualTerminal WASM init synchronous to fix parallel test TDZ 2026-06-04 05:58:00 +02:00
can1357 efd66d9e98 perf(tui): cached scrollback history text to avoid O(n²) re-reads
- Memoized committed row text keyed by offset, invalidated on resize/recreate.
- Replaced subprocess stdin pipe with Blob input in stress harness.
- Rejected stress batch on first error so killed siblings cannot mask it.
2026-06-04 05:02:07 +02:00
can1357 a5a983c26b test(tui): migrated VirtualTerminal to ghostty-web VT engine
- Replaced @xterm/headless backing with libghostty-vt WASM for grapheme-aware widths.
- Removed legacy/modern width-model split now that the terminal matches the renderer.
- Reframed width-disagreement regressions around Ghostty row containment.
- Added non-destructive in-band resize handling and regression coverage.
2026-06-04 04:03:20 +02:00
can1357 bb01f1420f feat(tui): added injectable TUI render scheduler for deterministic tests
- Added render scheduling interfaces and optional TUI options for injectable timing.
- Replaced direct timeout/scheduling calls with scheduler-based render timing and timestamps.
- Updated stress harness logic to use deterministic scheduler and column-based expected backgrounds for rendering checks.
- Tightened positive-integer parsing in render-stress tests to throw on malformed or non-positive values.
- Expanded render-stress oracle coverage for scrollback, probe caps, and frame/overlay helpers.
2026-06-03 22:26:57 +02:00
can1357 4399e4b822 fix(tui): deferred ED3 scrollback erases on risky terminals
- Moved `eagerEraseScrollbackRisk` detection into `TerminalInfo` and `terminal-capabilities.ts`, removing the duplicate from `terminal.ts`.
- Added iTerm2 and Apple Terminal to risk detection; required double at-bottom probe before trusting live rebuilds.
- Fixed overlay hide in multiplexer sessions triggering a viewport repaint instead of a stale diff.
- Fixed width-shrink rebuilds leaving old-width fragments in native history before subsequent appends.
2026-06-03 00:02:06 +02:00
can1357 93838c98c6 test(tui): parallelized render stress tests with worker pool
- Extracted harness logic into render-stress-harness.ts with exported APIs for worker use.
- Added render-stress-worker.ts to run scenarios in parallel Bun workers.
- Added Apple Terminal and iTerm2 env modes and eagerStreamingMutation operation.
- Reduced per-scenario iteration counts and timeouts to fit parallel batch budget.
2026-06-02 23:31:05 +02:00
can1357 84cf063b0e fix(coding-agent): fixed streaming edit preview to keep a full trailing diff window
- Replaced the streaming edit diff rendering strategy with a fixed-height trailing window so partial re-diff streams stayed anchored and stopped oscillating.
- Updated streaming preview tests to assert the window remained saturated without trailing blank padding across chunked updates and still produced a real diff after finalization.
- Tuned TUI viewport repaint heuristics for pure appends and multiplexer sessions, and adjusted render-stress handling for preserved tmux scrollback.
2026-05-31 10:53:05 +02:00
can1357 39c4762b74 fix(tui): corrected tmux overlay rendering to preserve native scrollback
- Preserved hidden tmux overlays in live viewport while keeping native scrollback intact during forced renders.
- Adjusted forced-render handling so pure appends preserve full scrollback and return viewport repaint on equal-size diffs.
- Capped streaming edit diff previews to a fixed trailing window and reported hidden hunk counts.
- Updated tmux and regression tests to validate hidden overlays, nativeText frame sources, and scrollback retention.
- Removed stream preview height tracking and simplified tool call rendering to always invalidate the content box.
2026-05-31 10:16:26 +02:00
can1357 21259aac5e fix(tui): repainted overfull height growth to preserve scrolled-up anchors
- Changed the render planner so height increases with new overflow now trigger a viewport repaint in non-Termux and non-multiplexer sessions.
- The new path marks native scrollback dirty and defers full rebuild, preventing anchor-loss while streaming inserts are offscreen.
- Added a POSIX unknown-viewport regression test that verifies scrolled-up readers stay on their rows during streaming and recover after an explicit native refresh.
2026-05-31 09:52:48 +02:00
can1357 a6c5d3fb82 fix(tui): resolved rebuild prep to preserve forced state and clear scrollback
- Added overlayRebuild intent, refactored forced-frame prep around base lines, and added frame dump support.
- Updated forced-render prep to preserve forced flags, allow unknown viewport mutation, and clear scrollback on resize.
- Introduced #syncChildOrder for child attach/reorder and skipped duplicate checks when after.atBottom was false.
- Added streaming-preview test scaffolding with VirtualTerminal, settleTerminal draining, and normalized row helpers.
2026-05-31 09:47:24 +02:00
can1357 730e598786 fix(tui): corrected TUI scrollback preservation during rerenders
- Preserved preexisting terminal scrollback during forced and structural rerenders in TUI.#prepareForcedRender.
- Gated historyRebuild triggers on #scrollbackHighWater in TUI.#canReplayNativeScrollbackAtCheckpoint.
- Expanded render-stress coverage with child mutations, viewport variants, and replay-mode scenario parsing.
2026-05-31 08:45:12 +02:00
can1357 aa7bbe32f9 fix(tui): fixed scrollback replay on forced renders and overflow growth
- Tracked forced-render line drops with a dedicated flag and used it to force viewport repaints without treating valid empty frames as non-diffable.
- Refined render-kind selection to skip viewport repaints when appended content increases overflow and to rebuild history when line counts change while native scrollback replay is possible.
- Added a high-water preview-collapse stress operation and tightened native scrollback replay checks across geometry-mutation transitions.
2026-05-31 08:19:29 +02:00
can1357 43027c6493 fix(tui): updated shrink-path logic in tui.ts to choose
- Updated shrink-path logic in `tui.ts` to choose checkpoint-based history rebuilds when bottom-anchored content changes and the viewport is not scrolled into history.
- Added a regression test ensuring a high-water preview collapse fully rebuilds native scrollback and clears stale preview rows from the buffer.
- Expanded strict scrollback stress tests with collapse operations and replay-fidelity assertions for both full-buffer and viewport matching at sampled scroll positions.
2026-05-31 08:13:01 +02:00
can1357 957b6b7533 fix(tui): expanded offscreen edit handling in TUI to
- Expanded offscreen edit handling in `TUI` to rebuild native scrollback when replay is safe and the terminal is not multiplexed.
- Marked native scrollback dirty and returned to viewport-only repainting when replay was not safe.
- Adjusted stress assertions to skip clean-buffer checks during geometry-changing operations.
2026-05-31 08:03:55 +02:00
can1357 ac7b8ac144 test(tui): added scrollback growth assertion to stress driver
- Asserts scrollback buffer growth does not exceed logical frame growth during dirty live rendering.
- Validates that newly appended scrollback lines match the tail of the logical frame.
2026-05-31 07:55:07 +02:00
can1357 59c8749ad7 fix(tui): resolved tui status footer truncation using VT stripping
- Replaced ad-hoc ANSI/VT stripping regexes with `stripVTControlCharacters` in status text handling and related tests.
- Updated status footer rendering to truncate using `truncateToWidth` and visible width after VT stripping.
- Extended tui cursor handling and rendering to strip markers from all lines and fit repaint/append-tail lines to width.
- Expanded deterministic render tests with overlay-aware assertions and recorded the truncation/cursor-marker behavior in changelogs.
2026-05-31 07:54:23 +02:00
can1357 05ed865567 test(tui): added randomized render stress test suite
- Added 1384-line property-based stress harness covering viewport fidelity, cursor positioning, scrolled deferral, row accounting, and history prefix stability.
- Supported configurable geometry, platform, terminal mode, and env mode scenarios with seeded RNG.
- Extended VirtualTerminal constructor to accept optional scrollback limit.
2026-05-31 07:27:22 +02:00