- Added `TUI#setEagerNativeScrollbackRebuild` to opt into native scrollback rebuilds during unknown-viewport rendering.
- Hooked the new flag into render mutation handling so offscreen and structural updates rebuild immediately when enabled.
- Documented the behavior and added a regression test validating clean, non-duplicated scrollback after streaming layout edits on POSIX.
- Adjusted TUI render logic to force a native history rebuild when terminal width changes, so POSIX sessions rewrap committed history even when viewport position is unknown.
- Preserved the existing defer path for known scrolled-away viewports, avoiding unnecessary destructive rebuilds outside explicit resize events.
- Added a regression test that resizes an unknown-viewport terminal from 20 to 40 columns and verifies old wrapped rows are replaced by rewrapped lines.
- 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.
- 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.
- Fixed scrolled-up readers being yanked to the tail on POSIX terminals when streaming content arrived; unknown native viewport position was treated as "at bottom", triggering destructive history rebuilds.
- Fixed appended rows slipping down by the height delta when a resize and new content coalesced into one frame; height-grow repaint now only fires when content fits within the new viewport.
- Added regression test covering the height-grow-with-new-content case.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Added fuzzy token matching in agent-dashboard, state-manager, and tree-selector, replacing lowercased checks.
- Added search-query state and fuzzy-filter helpers to hook, oauth, and user-message selectors for query filtering.
- Updated filtered selectors to render match results, status lines, no-match text, and move selection within results.
- Added `overflowSearch` and filter state to `SelectList`, switching overflowing list matching to fuzzy checks.
- Configured `SelectList` input flow and fixed cancel so Escape/Ctrl+C closes lists when no matches exist.
- Updated changelogs and added tests for fuzzy-filter behavior in hook, oauth, user-message, and list selectors.
- Detects appended tail vs. offscreen row edits within a single render frame.
- Ambiguous appended tails now trigger a history rebuild instead of splicing stale rows into the scrollback buffer.
- Pure viewport-suffix changes above the viewport top bypass replay with a direct repaint.
- Changed `addedCount > tailAppendCount` to `addedCount !== tailAppendCount` to also catch over-counted tails that scroll an extra row and duplicate the viewport-top line into scrollback.
- Restricted `appendFrom` in the offscreen-edit path to clean tail boundaries only; marks scrollback dirty otherwise.
- Added regression test covering the duplicate-line scenario with an offscreen edit plus mis-located tail append.
- Updated each package's test script to run `bun test` with the `--parallel` flag.
- Updated the tui package test command to preserve its `test/*.test.ts` file filter while enabling parallel execution.
Reverted the per-row scope check so an explicit allowUnknownViewportMutation render still bypasses the unknown-viewport deferral when diff.firstChanged sits in background scrollback. Caller contract is now documented and the existing focused-input regression covers the no-bypass default.
Allowed live input renders to bypass unknown Windows viewport deferral while preserving the default scrollback protection for background mutations.
Fixes#1550
- Introduced a shared missingSnapshotTagMessage helper and reused it from both hashline patcher and preview validation.
- Required snapshot tags in preview hashline sections for all edits, including head/tail inserts, so preview failures now match apply-time rejections.
- Updated TUI width calculation to strip ANSI escapes before grapheme splitting, preserving styled ZWJ emoji width behavior.
- Introduced `@oh-my-pi/pi-mnemosyne` workspace package with BeamMemory, recall/retain, FTS, and optional fastembed ONNX embeddings.
- Wired `memory.backend = "mnemosyne"` into the coding-agent settings schema and backend resolver.
- Added `MnemosyneSessionState` for per-session auto-recall on first turn and auto-retain after completed turns.
- Documented configuration, environment variables, and operational notes in `docs/mnemosyne-memory-backend.md`.
`requiresNativeViewportProofForReplay` flagged WSL+Windows-Terminal
unknown viewport state as "scrolled into history", but
`ProcessTerminal.isNativeViewportAtBottom` can only answer through
`kernel32.dll` FFI — unreachable from a Linux user-space process inside
WSL — so the probe was permanently `undefined`. Every structural
mutation (each row inserted above the bottom-anchored prompt during
streaming) became `deferredMutation` and emitted zero bytes; only a
geometry change re-routed through a different intent, which is why
minimize+restore made the output appear.
Drop the WSL clause: when the probe cannot answer, treat unknown as
at-bottom (pre-15.5.14 behaviour) so the live render path runs again.
Native Win32 keeps the conservative "assume scrolled when unknown"
heuristic since `kernel32` FFI does succeed there.
Tests:
- new `renders streaming row inserts on WSL Windows Terminal even when
viewport probe is unavailable` regression in `render-regressions.test.ts`
- delete the two tests added in fd346358c that pinned the buggy
WSL-as-scrolled contract
Fixes#1534
- Updated structural diff handling to detect offscreen content growth before the viewport.
- Triggered a `historyRebuild` when a pure tail repaint would miss expanded offscreen rows.
- Added regressions to confirm expanded rows appear in scrollback and collapsed `ctrl+o` markers are removed.
- Extended assistant-replay helpers to append a paired tool-result message after stale assistant turns.
- Updated OpenAI responses replay tests to use the new stale-turn helper and to track branch leaves by the tool-result entry.
- Adjusted the Hangul filler width test to use platform-specific expected cells on Darwin versus non-Darwin.
- Enhanced markdown rendering to insert a painted theme swatch before matching inline hex colors in prose and code spans.
- Skipped short numeric-only 3- and 4-digit values in plain text so issue-like references do not get swatches.
- Added `colorSwatch` to symbol themes and added tests for swatch rendering and surrounding-style preservation.
- Removed Ghostty-specific hardware-cursor forcing from TUI preference resolution and dropped the redundant terminal-cursor marker flag.
- Updated interactive mode editors to use `ui.getShowHardwareCursor()` so cursor mode now follows actual hardware-cursor visibility.
- Reworked terminal regressions tests to assert Ghostty respects the requested cursor preference and only emits cursor-show output when enabled.