Commit Graph
501 Commits
Author SHA1 Message Date
can1357 efd6703580 fix: fixed native scrollback behavior for append-only assistant streams
- Fixed assistant transcript blocks to expose append-only commit-safe boundaries.
- Updated TUI live-region commit and pinned-paint logic to clamp commit-safe ends.
- Fixed long streamed assistant replies to remain in native scrollback on overflow.
2026-06-06 00:43:16 +02:00
can1357 23be7bad0b fix(tui): forced history rebuild on resize ED3 erase
- Treated terminal resize as explicit reconcile to erase mis-wrapped scrollback.
- Prevented viewport-repaint capping from leaving corrupt history on screen.
2026-06-06 00:32:59 +02:00
can1357 3f757f9d58 refactor(tui): unified resize handling into clean reset + redraw
- Replaced conditional viewport-repaint/history-rebuild branches with an unconditional reset on any geometry change.
- Multiplexer panes still repaint in place since pane scrollback cannot be erased.
- Dropped no-overflow and confirmed-scrolled guards: scrolled readers snap to bottom and shell scrollback is cleared.
- Updated and removed tests reflecting the new reset behavior.
2026-06-05 23:18:25 +02:00
can1357 51b7d77623 fix(tui): kept mutable live-region rows out of native scrollback
- Prevented foreground streams from committing live rows, which left a stale pending tool box above the running box.
- Added initial live-region pinned paint for ED3-risk hosts with unknown viewport.
- Reconciled stale cached DEC 2048 geometry against live OS dims on resize so content reflows.
2026-06-05 20:42:41 +02:00
can1357 61f11a6ce0 fix(tui): blocked destructive scrollback replay on unknown terminal viewports
- Blocked checkpoint scrollback replay unless native viewport-at-bottom proof succeeded.
- Expanded ED3-risk terminal detection to include SSH, multiplexer, WT-like, and unknown profiles.
- Added sync-output defaults with PI_TUI_SYNC_OUTPUT and PI_FORCE_SYNC_OUTPUT overrides.
- Deferred transcript thawing until native scrollback refresh returned true.
- Adjusted non-escape parsing to emit one Unicode scalar and raised timeout to 75ms.
2026-06-05 17:47:47 +02:00
can1357 f75cb3d416 fix(tui): dropped eager rebuild mode immediately when stream settled
- Disabled eager native-scrollback rebuild at once when no render is pending, so later content mutations don't inherit foreground-stream privileges.
- Deferred ED3-risk unknown-viewport shrinks completely instead of padded-repainting over scrolled history.
- Skipped suffix-suppression and offscreen-mutation branches on resize so geometry reflow repaints at the new size.
2026-06-05 16:27:26 +02:00
can1357 5e369d4fc6 fix(tui): prevented hidden overlays leaving transient rows in scrollback
- Routed overlay visibility reductions through the explicit reconcile path so they bypass streaming deferral and rebuild once.
- Skipped the deferral when the terminal reports its viewport is at the tail, preventing dropped rows above the viewport top.
2026-06-05 16:07:26 +02:00
can1357 9f895141f4 fix(tui): prevented live-region collapse from duplicating scrollback
- Separated commit geometry from repaint geometry in the pinned repaint.
- Clamped repaint to the committed sealed boundary so a mid-turn collapse no longer re-exposes already-committed rows.
- Deferred stale mutable live-region lines to the next checkpoint.
2026-06-05 15:51:53 +02:00
can1357 689431f17b fix(tui): committed live-block head above viewport to scrollback
- Removed clamp to sealed-prefix boundary so off-screen rows above the viewport top enter native scrollback.
- Prevents erasing the head of a tall live block (long stream, big tool result) that alone overflows the viewport.
2026-06-05 15:28:27 +02:00
can1357 409452735e Merge remote-tracking branch 'origin/farm/326dc1c2/fix-image-render-artifacts' 2026-06-05 11:45:47 +02:00
can1357 1e3a8d5cdf fix(tui): pinned native scrollback to commit sealed live-region rows
- Added `NativeScrollbackLiveRegion` seam so components report the live suffix start.
- Stopped ED3-risk streaming from dropping sealed transcript rows above the live block.
- Appended newly sealed rows once while keeping the active tail deferred to checkpoint.
2026-06-05 11:29:18 +02:00
can1357 d719e07915 fix(tui): scope #1895 streaming defer to ED3-risk; keep scrollback dirty for checkpoint 2026-06-05 06:58:58 +02:00
can1357 4e54836f94 chore(tui): adopt #1895 streaming-scrollback-defer; drop live-region pin 2026-06-05 06:42:05 +02:00
can1357 a1da2a8f01 fix(tui): skipped live-region pin on resize to avoid stale rows
- Threaded a geometry-changed flag into the pinned emitter.
- Deferred width/height changes to the reflow rebuild path, since relative cursor moves from pre-resize geometry landed on wrong rows.
2026-06-05 02:35:33 +02:00
can1357 f863d98f58 fix(tui): pinned live region repaint without screen-wide erase
- Replaced full-screen clear (ED2) and absolute home with relative cursor moves and per-line `\x1b[2K`.
- Threaded prior viewport top and hardware cursor row to compute the relative move.
- Stopped Ghostty from snapping a scrolled-back reader to the bottom on every live-tail frame.
2026-06-05 01:21:04 +02:00
can1357 7447086186 fix(tui): pinned live region to stop scrollback dup on ED3 streams
- Added NativeScrollbackLiveRegion seam reporting where a component's transient suffix begins.
- Pinned the live block and chrome below it out of native history during foreground streams on ED3-risk terminals.
- Consumed pending forced scrollback wipes while pinned to avoid yanking a scrolled-up reader (#1682).
2026-06-05 00:53:39 +02:00
roboomp ced288676f style: bun run fix 2026-06-04 18:25:08 +00:00
roboomp 3827c9ce2b fix(tui): gated kitty unicode placeholders to terminals that honor U=1
The 15.9 placeholder rollout enabled the U=1/U+10EEEE grid by default for
every terminal advertising the Kitty image protocol. Only kitty and
ghostty actually ship a working implementation; WezTerm advertises Kitty
graphics but has not implemented placeholder support (upstream
wezterm/wezterm#986 has it unchecked), and the tmux/screen fallback can
force Kitty mode on any outer terminal (Terminal.app, etc.).

On those paths every placeholder cell rendered as a literal PUA box
glyph - the screenshot in #1877 - and each repaint re-emitted the full
columns x rows grid (~4.8KB per frame for a typical 80x20 image vs ~22
bytes for the direct a=p APC), which produced the laggy scrolling.

Add detectKittyUnicodePlaceholdersSupport(terminalId, env) and seed the
feature flag from terminal-capabilities after TERMINAL_ID resolves.
Defaults on only for kitty and ghostty; everything else falls back to
direct a=p,i=...,p=... placement, which those paths already render
correctly. PI_NO_KITTY_PLACEHOLDERS=1 remains a hard opt-out, and a new
PI_KITTY_PLACEHOLDERS=1 opts in on otherwise-unsupported terminals (for
e.g. wezterm nightlies that have merged placeholder support).

Fixes #1877
2026-06-04 18:25:02 +00:00
can1357 c8b4bf09c7 prompts: undo experiment, update system 2026-06-04 17:41:10 +02:00
can1357 888b11657f fix(tui): adjusted unstable overflow handling for streamed boxes
- Updated the TUI commit-path guard so unstable overflow falls back to normal commits unless rewrites reach above the viewport top.
- Added a regression test that streams a growing box while scrollback risk is enabled and checks all logical rows stay reachable in history or view.
2026-06-04 16:53:38 +02:00
can1357 8709f7a7e6 fix(coding-agent): fixed terminal UIs to resize with rows and avoid extra OSC11 polling
- Adjusted session and dashboard renderers to derive heights from live terminal rows.
- Propagated terminal-row callbacks through picker/controller wiring and session selectors.
- Reworked list visibility and page navigation to honor row-based budgets and footer lines.
- Added DECRQM 2031 startup probing and stopped OSC11 polling once support was confirmed.
2026-06-04 16:29:37 +02:00
can1357 cbdff129b6 feat(tui): enabled stable-prefix scrollback commits for streaming assistant output
- Added assistant-message completion state and stable-line count reporting.
- Added transcript stable-row aggregation and snapshot replay to keep unstable rows out of scrollback.
- Added TUI stable scrollback boundary APIs and stable-prefix commit path.
- Added regression tests proving unstable rows stay out of scrollback until stabilized.
2026-06-04 16:00:50 +02:00
can1357 f6fca1f5cd undo(tui): preserved bottom-anchored viewport during offscreen shrink" 2026-06-04 06:15:40 +02:00
can1357 7490967f0e fix: fixed tool-call compatibility and tiny runtime resolver behavior
- Updated tool-call handling to accept string and object arguments.
- Stored object tool-call args directly into block.partialArgs and block.arguments.
- Added compiled runtime module resolution honoring exports, main, and index fallbacks.
- Patched tiny runtime loading to install resolver stubs and load the resolved entry file.
2026-06-04 05:41:09 +02:00
can1357 40ba8c19cf fix(tui): preserved bottom-anchored viewport during offscreen shrink
- Added cursor remapping support to deferredMutation intents and emitted cursor positions when deferring offscreen mutations.
- Introduced planDeferredShrink to defer bottom-anchored offscreen deletions only when displayed rows were byte-identical, otherwise repainted the viewport.
- Added regression tests covering unknown-win32 offscreen middle-shrink behavior, including cursor-only moves and tail-content-change cases.
2026-06-04 05:41:08 +02:00
can1357 db0f396601 feat(tui): added terminal cursor mode synced to hardware cursor pref
- Added Input setUseTerminalCursor to render terminal or software cursor.
- Synced focused component cursor mode on focus and preference changes.
- Fixed wrapTextWithAnsi infinite loop on BEL-terminated string escapes.
2026-06-04 05:21:35 +02:00
Can BölükandGitHub 9f7c36c36b Merge pull request #1702 from basedcorp99/feat/cmux-terminal-id
Add cmux terminal surface detection to getTerminalId
2026-06-04 06:13:25 +03:00
can1357 46b6de2dda fix(tui): repainted shrunk eager viewport even when it now fits
- Painted bottom-anchored tail on collapse, not just on overflow.
- Prevented UI freeze on stale rows during eager streaming (#1682).
2026-06-04 04:12:27 +02:00
can1357 b0cf24ca0d feat(coding-agent): froze offscreen transcript blocks on ED3-risk terms
- Added TranscriptContainer that snapshots non-live blocks to avoid stale scrollback duplicates.
- Thawed snapshots at prompt-submit checkpoints for reconciliation.
- Repainted eager streaming tail on overflowing shrink to unfreeze UI (issue #1682).
2026-06-04 03:48:12 +02:00
can1357 7530832b42 fix(tui): always repaint viewport on eager ED3-risk shrink
- Removed deferredMutation no-op that drifted the live tail upward.
- Repaint emits no ED3 and keeps tail-followers off stale tool previews.
- Preserved scrollback cleanup via nativeScrollbackDirty checkpoint.
2026-06-04 03:41:44 +02:00
can1357 dc4aeb7b88 refactor(coding-agent): renamed todo_write tool to todo
- Renamed `TodoWriteTool` to `TodoTool` and its source/prompt files.
- Updated tool registration, schema, renderers, and gating to `todo`.
- Adjusted cursor provider native tool names and tests to match.
- Renamed strike-animation constants and `todo-error-reminder` type.
2026-06-04 02:45:30 +02:00
can1357 542ea6c930 fix(tui): parked cursor at content bottom to stop scrollback dupes
- Moved hardware cursor up to the real content bottom instead of the padded viewport bottom.
- Prevented terminal height shrinks from scrolling live rows into scrollback and duplicating them per resize step.
- Kept relative rowDelta math correct so IME cursor still lands right after height-grow resizes.
2026-06-04 02:17:12 +02:00
can1357 b478e5f34a fix(tui): suppressed redundant DECRPM resets and unchanged resizes
- Treated DECRPM status 4 (permanently reset) as disabled, not enabled.
- Skipped resize handler when in-band report leaves geometry unchanged.
2026-06-04 02:09:53 +02:00
can1357 53aaced81f feat: enabled text-sizing and fixed OSC66 and DECCARA rendering behavior
- Added `textSizing` terminal capability and `tui.textSizing` setting for Kitty OSC66 scaling.
- Updated OSC66 range and visible-width handling to preserve grapheme slice behavior.
- Updated markdown rendering to apply heading text sizing only when enabled.
- Fixed DECCARA trailing-background fill tracking and DECRPM status 3/4 recognition.
2026-06-04 01:33:48 +02:00
can1357 cb6ca2115b feat(packages/tui): enabled OSC99 and Kitty notification probe support
- Enabled OSC99 probe parsing and title advertisement checks before using rich output.
- Enabled Kitty probe negotiation on startup and switched transmission to temp-file on OK replies.
- Enabled direct-mode fallback when Kitty probes return non-OK or unsupported responses.
2026-06-04 00:50:46 +02:00
can1357 b77e3ab5d5 fix(packages/tui): resolved viewport clear and DECCARA fill rendering
- Added non-destructive viewport clear behavior to emit CSI22J then 2J+H without 3J.
- Preserved destructive clear path to keep sending 2J+H+3J when clearScrollback is enabled.
- Adjusted DECCARA fill offsets and fallback rendering to preserve row fills after scrolling overflow.
- Added terminal write capture helpers and DECCARA parity tests, including deterministic fuzz checks.
2026-06-04 00:50:46 +02:00
can1357 33077363f9 feat(packages/tui): added kitty placeholder image and temp-file flow caps
- Added kitty-graphics module with Unicode placeholder and temp-file APIs.
- Refined terminal image handling to use rendered placeholder lines and detect placeholder output.
- Raised the max inline-image default from 3 to 8 in schema and image constants.
- Refined terminal capability flow for Kitty support, including screen-to-scrollback and text-sizing handling.
- Added integration tests for kitty placeholders, virtual placement, and temp-file rendering.
2026-06-04 00:50:46 +02:00
can1357 fe6a94cb2a feat(packages/tui): added OSC 66 text sizing for markdown headings
- Added OSC 66 text-sizing utilities and `encodeTextSized` for safe, width-aware span emission.
- Enabled scale-2 OSC 66 output for H1 headings when text sizing is enabled and width permits.
- Handled OSC 66 heading rows as raw output, skipping wrap/background and preserving the reserved blank row.
- Mapped inline heading tokens to plain text to gate OSC 66 heading rendering by measured width.
2026-06-04 00:50:46 +02:00
can1357 86c56d6472 feat(tui): added DECCARA fill optimizer with OSC 66 and DEC 2026/2048
- Added a Kitty-only DECCARA optimizer painting solid bg panels as rectangles, with `PI_NO_DECCARA` kill switch.
- Added OSC 66 text-sizing width handling to slicing, truncation, and wrapping.
- Added DECRQM probes for DEC 2026 sync output and 2048 in-band resize.
- Added structured OSC 99 notification formatting.
2026-06-04 00:27:20 +02:00
can1357 b97ddeac94 feat(tui): added inline-image budget capping live graphics
- Added `ImageBudget` keeping only N recent images live, demoting older ones to text via a full redraw plus Kitty graphics purge.
- Changed Kitty images to transmit-once + placement, so repaints re-send only tiny placement sequences instead of base64.
- Added `tui.maxInlineImages` setting (default 3, 0 disables) wired through the coding-agent renderers.
2026-06-03 23:03:54 +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 269da2f930 fix(tui): fixed native scrollback re-anchoring after terminal resize reflows
- Marked native scrollback dirty on resize when overflowing content was not at bottom, to resync history at checkpoint.
- Added reflow-based line wrapping and verify scenarios in stress harness to exercise resize-count changes.
- Adjusted checkpoint/reconciliation assertions to model foreground-streaming scrollback deferral and cleanup.
2026-06-03 22:03:51 +02:00
can1357 b803f136ef fix(tui): fixed live tail drift on shrink for ED3-risk terminals
- Repainted bottom-anchored tail during eager rebuild instead of pinning the pre-shrink top.
- Re-anchored viewport when a shrink moves the window above the lagging high-water mark.
- Added ghostty fuzz test for chip injection over active tool renders.
2026-06-03 20:52:31 +02:00
can1357 4905e142c1 feat(tui): added PI_NO_SYNC_OUTPUT opt-out for DEC 2026 synchronized output
- Added `PI_NO_SYNC_OUTPUT=1` env var to disable DEC 2026 wrappers while keeping autowrap guards active around paints.
- Removed Termux-specific height-change no-op; all non-multiplexer resizes now repaint to prevent phantom blank rows.
- Added `linux-normal-vteNoSync-small` stress scenario and issue-1765 regression tests.
2026-06-03 11:30:48 +02:00
can1357 0dae697f47 fix(tui): removed Windows ConPTY viewport probe and defer all win32 rebuilds
- Deleted `shouldTrustNativeViewportProbe` and `ProcessTerminal.isNativeViewportAtBottom` — ConPTY pins the pseudo-console buffer to the visible grid so the probe always lied "at bottom," yanking scrolled readers in Tabby, Hyper, VS Code, and conhost (#1746).
- Every Windows host now treated as viewport-unobservable; live mutations defer destructive rebuilds and reconcile at prompt-submit checkpoints.
- Added `issue-1746-repro.test.ts` and `win32-unknown-small` stress scenario to lock the anti-yank contract end-to-end.
2026-06-03 10:51:49 +02:00
can1357 9eaf135293 fix(tui): fixed resize/multiplexer/WSL scrollback corruption bugs
- Fixed phantom blank rows spliced into scrollback when resize events net unchanged dimensions, coalesce with appends, or land in multiplexer panes.
- Fixed tmux pane history duplicating on dirty-scrollback live frames, forced renders, and checkpoint replays; destructive rebuilds now blocked inside multiplexers.
- Fixed WSL+Windows Terminal classified as ED3-risk so eager streaming rebuilds defer instead of yanking scrolled readers.
- Fixed turn-end teardown freezing on ED3-risk terminals by deferring eager-mode disable until after frame classification.
2026-06-03 10:07:23 +02:00
can1357 77f3c3ddf0 fix(tui): excluded win32 from ED3-risk scrollback erase checks
- Guarded eagerEraseScrollbackRisk with a win32 platform exclusion to avoid incorrect deferred mutations on Windows.
- Added early deferredMutation exit for unobservable ED3-risk shrinks outside foreground-tool streaming.
- Fixed viewport drift on direct-input shrinks by returning viewportRepaint when naturalViewportTop shifts.
- Removed unused #nativeViewportIsAtBottom helper.
2026-06-03 00:15:13 +02:00
can1357 06981f5549 fix(tui): changed ED3-risk overflowing shrink to repaint instead of defer
- Replaced deferred-mutation early exit with viewportRepaint for unobservable ED3-risk shrinks that exceed the padded viewport top.
- Kept historyRebuild for ordinary POSIX terminals in the same path.
- Added regression test verifying the live UI stays visible and scrollback flushes on next checkpoint.
2026-06-03 00:06:56 +02:00
can1357 1919b3bbdf fix(tui): treated focused keyboard input as ED3-risk opt-in
- Passed `allowUnknownViewportMutation: true` when requesting render after focused component handles input.
- Added regression test verifying deferred shrink repaint flushes on user keypress.
2026-06-03 00:02:06 +02:00
can1357 e343ac01db fix(tui): deferred huge-shrink repaints on ED3-risk terminals
- Added early-exit path when viewport position is unknown and terminal has ED3 risk, marking scrollback dirty instead of issuing historyRebuild.
- Added regression test covering the deferred-mutation path and explicit checkpoint flush.
- Guarded existing POSIX historyRebuild tests against eagerEraseScrollbackRisk side-effects.
- Added Arabic combining/tashkeel text to stress harness to cover nonspacing-mark width measurement.
2026-06-03 00:02:06 +02:00