Commit Graph
1138 Commits
Author SHA1 Message Date
can1357 6cee7a666d test(tests): added deterministic yield tests and viewport mutation regression coverage
- Replaced real-time yield assertions with a mocked clock and scheduler wait spy to validate gate timing deterministically.
- Updated fact consolidation conflict tests to capture console warnings and verify duplicate-resolution messaging.
- Added TUI offscreen-expansion regressions for unknown-viewports, covering deferred rebuild and user-driven rebuild behavior.
2026-05-31 13:02:32 +02:00
can1357 a043826723 chore: bump version to 15.7.3 2026-05-31 12:30:20 +02:00
can1357 5f543b9577 feat(tui): enabled eager native scrollback rebuild for unknown POSIX viewports
- 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.
2026-05-31 11:32:37 +02:00
can1357 47b7c27eda fix(tui): adjusted TUI render logic to force a native
- 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.
2026-05-31 11:13:55 +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 d7a5fe1ce5 fix(tui): fixed viewport snap and height-grow displacement bugs
- 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.
2026-05-31 09:57:39 +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 8175a1b8e1 refactor(packages/tui): reorganized native scrollback live rebuild checks
- Replaced render-time rebuild guards with #canRebuildNativeScrollbackLive, preventing destructive scrollback rewinds.
- Added #canRebuildNativeScrollbackLive to gate live history/overlay rebuilds on safe viewport state.
2026-05-31 09:47:43 +02:00
can1357 3edd46f67b fix(packages/tui): resolved PI_DUMP_OP frame dump to append JSONL cursor
- Logged render trace entries to /tmp/renderTrace.jsonl with optional terminal.getBufferPosition().
- Switched PI_DUMP_OP frame dump output from writeFileSync overwrite to append-only JSONL logging.
2026-05-31 09:47:35 +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 42b79bc696 feat(coding-agent): added fuzzy token matching in coding-agent components
- 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.
2026-05-31 07:45:22 +02:00
can1357 0bb04ba529 fix(tui): fixed native scrollback corruption on same-frame offscreen edits
- 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.
2026-05-31 07:27:31 +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
can1357 a243f74f01 fix(tui): tightened append-tail guard to reject mis-located tail scrolls
- 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.
2026-05-31 06:13:58 +02:00
can1357 570b439b31 chore: enabled parallel Bun test runs across package scripts
- 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.
2026-05-31 05:24:51 +02:00
can1357 f9f213e53e chore: bump version to 15.7.2 2026-05-31 03:46:17 +02:00
can1357 73de3bf926 chore: bump version to 15.7.1 2026-05-31 02:50:54 +02:00
can1357 e72fe367e5 chore: bump version to 15.7.0 2026-05-31 02:17:33 +02:00
roboomp e8fadfe5fb fix(tui): kept autocomplete bypass when coalesced with offscreen mutations
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.
2026-05-30 17:58:31 +00:00
roboomp 7786f1e9ce fix(tui): scoped viewport bypass to live rows
Removed the broad post-input bypass and limited unknown-viewport mutation allowance to frames whose changed rows are in the tracked live viewport.
2026-05-30 17:52:20 +00:00
roboomp 119bb0009c fix(tui): kept slash autocomplete repainting
Allowed live input renders to bypass unknown Windows viewport deferral while preserving the default scrollback protection for background mutations.

Fixes #1550
2026-05-30 17:46:04 +00:00
can1357 474eb92047 chore: bump version to 15.6.0 2026-05-30 19:01:54 +02:00
can1357 ccc727d1bb feat(coding-agent): added internal URL completion with async handlers
- Added internal URL completion types and router support for async scheme completion handlers.
- Implemented `complete()` for local, memory, agent, artifact, omp, rule, and skill handlers with robust completion fallbacks.
- Added internal URL autocomplete flow with context extraction, fuzzy matching, ranking, and a 25-item suggestion cap.
- Integrated internal URL completion into prompt and editor autocomplete behaviors and added completion tests.
2026-05-30 18:43:00 +02:00
can1357 55e146fa3c fix: synchronized snapshot-tag checks and fixed ANSI width emoji handling
- 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.
2026-05-30 15:59:58 +02:00
can1357 6d410fcc80 Merge pull request #1521 from can1357/farm/05952468/fix-wsl-streaming-refresh
fix(tui): rendered WSL streaming output without resize trigger
2026-05-30 14:49:02 +02:00
can1357 3ecc48fdf6 feat(memory): added Mnemosyne local SQLite memory backend
- 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`.
2026-05-30 14:47:45 +02:00
roboomp d0e3a4c366 style: bun run fix 2026-05-30 08:35:06 +00:00
roboomp ac0cf1bfbb test(tui): restored mocked platform after WSL regression 2026-05-30 08:34:57 +00:00
roboomp a1e2054b98 style: bun run fix 2026-05-30 08:32:11 +00:00
roboomp 191c844986 fix(tui): rendered WSL streaming output without resize trigger
`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
2026-05-30 08:31:26 +00:00
can1357 304a9346e9 fix(tui): updated structural diff handling to detect
- 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.
2026-05-30 06:17:49 +02:00
can1357 138b784367 test(coding-agent): added paired stale assistant and tool-result turns in replay tests
- 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.
2026-05-30 05:07:24 +02:00
can1357 5f3856ee7c chore: bump version to 15.5.15 2026-05-30 04:49:01 +02:00
can1357 e004585f39 chore: bump version to 15.5.14 2026-05-30 01:25:28 +02:00
can1357 9eea27619c feat(tui): added inline color swatches for markdown hex color mentions
- 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.
2026-05-30 01:04:46 +02:00
can1357 0c0cd7de46 fix(tui): fixed Ghostty caret fallback by honoring requested hardware cursor
- 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.
2026-05-30 00:39:48 +02:00
Britandcan1357 06fc0aa8ce fix(tui): deferred scrolled preview height changes 2026-05-30 00:27:04 +02:00
Britandcan1357 779ac06ac2 fix(tui): deferred scrolled output expansion 2026-05-30 00:27:04 +02:00
Britandcan1357 f755a8aa1b perf(tui): deferred Windows viewport probe 2026-05-30 00:27:04 +02:00
Britandcan1357 7a3d027276 fix(tui): replayed scrollback on prompt submit 2026-05-30 00:27:04 +02:00
Britandcan1357 fd346358c9 fix(tui): treated WSL scrollback replay as unsafe 2026-05-30 00:27:04 +02:00
Britandcan1357 03000423ca fix(tui): guarded Windows scrollback replay 2026-05-30 00:27:03 +02:00
Can BölükandGitHub 923dafcf62 Merge pull request #1502 from ZergRocks/fix-tui-native-visible-width
Fix TUI width, editor inserts, and Ghostty cursor trails
2026-05-30 01:21:55 +03:00