Commit Graph

2152 Commits

Author SHA1 Message Date
can1357 edc0caeb0f feat(builtins): sweep of GNU/BSD compat fixes + str performance opts
Addresses a broad audit of built-in shell utilities against their real counterparts: timeout gains signal delivery, -s/-k/--preserve-status/--foreground/-v, and GNU exit codes; diff defaults to normal format and gains -w/-b/-B/-i/-c/-x/-L/-s/--strip-trailing-cr and proper -r gating; find fixes -newerXY timestamp comparison direction, anchors -regex to whole paths, and gains BSD -perm +mode, -type lists, -size T/P suffixes, -E/-x/-s flags; date gains BSD -r epoch, -v adjustments, -j -f strptime, and non-greedy -I; tail/head accept obsolete -N/+N at any position with any file count; rg resolves case flags by last occurrence and gains --path-separator and clean -0 output; stat prints integer epochs for %X/%Y/%Z and gains BSD -s/-x/-t; cksum is registered as a builtin; truncate implements -o/--io-blocks and b/= size suffixes; sleep/timeout accept infinity; yes/errno/kill accept hyphen-prefixed operands; nohup -- cmd no longer runs --; which gains BSD -s.
2026-08-20 02:33:10 +02:00
can1357 416b30a8d5 feat(tui): supported risk notes with warning glyphs in settings lists
- Add support for risk notes and warning markers on setting items in the TUI settings list component.
- Update the external thinking setting schema and help command to include a warning about provider abuse enforcement.
2026-08-19 16:26:57 +02:00
can1357 22b40b47e1 chore: bump version to 17.3.8 2026-08-19 12:35:37 +02:00
can1357 43f7b09348 Merge PR #8977: fix(tui): honor tui.input.submit remap onto ctrl+enter (@roboomp) 2026-08-19 11:52:53 +02:00
roboomp caace28295 fix(tui): honor tui.input.submit remap onto ctrl+enter
The multiline editor's key dispatch checked a hardcoded Ctrl/Shift+Enter
-> newline branch before the config-driven tui.input.submit branch, so a
user remap of submit onto Ctrl+Enter was swallowed as a newline and never
submitted. Gate the hardcoded newline fallbacks behind an explicit submit
binding; the bare-LF (iTerm2 Shift+Enter) case stays exempt because its
canonical form is indistinguishable from plain Enter.

Fixes #8906
2026-08-19 09:10:10 +00:00
roboomp 7cff20cfd0 fix(tui): pin anchored regions under an unpinned streaming seam
TUI.render merged live-region seams with a topmost-seam-wins rule that
adopted only that seam's pin policy for the whole frame. While the primary
turn streams, the transcript reports the topmost, unpinned seam, so the
frame-wide pin flag becomes false and a pinned AnchoredLiveContainer below
it (the /btw panel, the working HUD) loses its pinning: once its content
grows past the viewport, the emit path commits the scrolled-off rows as
frozen snapshots on every growth frame, piling duplicates into native
scrollback.

Track a pinnedBoundary (start row of the topmost pinned region)
independently of which seam wins the topmost merge, and cap every commit
ceiling at it. Equivalent to the prior behavior for a fully-pinned frame
and for a frame with no pinned region; only the mixed case changes.

Fixes #8793
2026-08-19 08:51:13 +00:00
can1357 b3f48dbf6c Merge PR #8806: fix(tests): isolate TUI scrollback tests from terminal multiplexers (@Huang-404-Q) 2026-08-19 01:36:58 +02:00
can1357 8d6f8854fa Merge PR #8724: fix(tui): detect SIXEL outside Windows Terminal (@shrimpza) 2026-08-19 01:36:04 +02:00
can1357 adfa211bbf chore: bump version to 17.3.7
Retry: deflaked tui IME preedit border test (#5563) — VirtualTerminal.waitForRender's fixed 40ms sleep raced TUI's throttled render timer on starved CI runners, reading the pre-input frame; waitForRender now takes an optional settle predicate polled up to 2s and the test keys on the rendered content.
2026-08-18 11:24:23 +03:00
Kenneth Watson 49543d798e fix(tui): detect SIXEL outside Windows Terminal
The startup graphics probe only ran on ConPTY hosts with WT_SESSION, so a
SIXEL-capable terminal that exposes no identifying environment variable
(foot exports TERM=foot and COLORTERM=truecolor only) resolved the
trueColor capability row, kept imageProtocol null, and rendered every
image as the "[Image: …]" text card.

The XTSMGRAPHICS branch also had its status inverted: per xterm ctlseqs a
reply of `CSI ? 2 ; Ps ; Pv S` carries Ps = 0 on success, and a terminal
without SIXEL reports a zero maximum geometry, so a successful reply was
read as unsupported.

Drop the dead DA1 half of the probe with it: ProcessTerminal swallows
every `CSI ? … c` reply for the whole session so a late one cannot leak
into the composer (#8542), which means the attribute list never reached
the probe's input listener on any platform. The bare `CSI c` it wrote was
also unaccounted for in the DA1 sentinel FIFO, so its reply consumed
another probe's sentinel.

PI_FORCE_IMAGE_PROTOCOL, including its off/none kill switch, still wins
over the probe.
2026-08-18 14:47:20 +08:00
can1357 0a912cc467 chore: bump version to 17.3.7 2026-08-17 22:29:25 +03:00
can1357 54e1a8c900 chore: bump version to 17.3.6 2026-08-17 17:16:40 +03:00
Huang-404-Q 099ca42749 fix(tests): isolate TUI scrollback tests from terminal multiplexers
isMultiplexerSession() treats TMUX, STY, ZELLIJ, HERDR_ENV=1, the CMUX_*
markers and a tmux/screen TERM as authoritative, and routes rendering down the
path that cannot rebuild scrollback. Nine tests across four files assert the
destructive full-paint behavior and fail for anyone running the suite inside
tmux, screen, Zellij or CMUX.

component-render.test.ts already cleared HERDR_ENV for exactly this reason but
covered only one of the nine signals. Replace it with a shared helper that
clears the whole family and restores it afterwards, and call it from the other
three files.
2026-08-17 17:56:12 +08:00
can1357 37eee71978 chore: bump version to 17.3.5 2026-08-16 10:21:05 +03:00
can1357 02cd22dc9b feat: added live tracking and stale status warnings for agent activity snapshots
- Added live tracking and stale status warnings for agent activity snapshots.
- Fixed text wrapping with ANSI escape sequences to defer style open sequences after whitespace.
- Added VirtualRenderScheduler for deterministic virtual-clock rendering tests.
2026-08-16 10:18:56 +03:00
Can Bölük ca1f184823 chore: rewritten changelogs 2026-08-16 09:28:34 +03:00
can1357 8a921148e8 Merge PR #8652: fix(tui): bound shimmer animation CPU (@roboomp) 2026-08-16 02:43:31 +02:00
can1357 55e5da3d17 chore(changelog): normalized changelogs after merged fixes 2026-08-16 02:15:11 +02:00
can1357 7b22a2309c fix(tui): handled CPU-throttled loop stalls 2026-08-16 02:13:40 +02:00
can1357 62965c03a5 Merge PR #8442: fix(tui): classify a long loop block by CPU time instead of duration (@Mustaqeem66) 2026-08-16 02:13:39 +02:00
can1357 a7e810c6cc Merge PR #8444: fix(tui): keep btw panels out of scrollback (@Ant39140) 2026-08-16 02:13:38 +02:00
Ant39140 9f8eb090cb Merge remote-tracking branch 'upstream/main' into fix/btw-scrollback 2026-08-15 22:31:03 +08:00
roboomp 62eb6d40b8 fix(tui): bounded magic-keyword shimmer cpu
- Routed focused editor animation through cursor-aware direct row writes.

- Preserved cursor marker bookkeeping and native scrollback across marker changes.

- Added fixed-geometry, fallback, and editor integration regressions.

Fixes #8646
2026-08-15 13:17:49 +00:00
chan1103 dc0e2ebeed fix(utils): stop indented code interrupting paragraphs in marked lexer 2026-08-14 22:48:39 +09:00
can1357 ffd53ff92a chore: bump version to 17.3.4 2026-08-14 14:38:16 +02:00
can1357 db6460c6c5 test(tui): restored process stream descriptors in issue-8542 repro teardown
- Replaced Reflect.deleteProperty teardown with the descriptor-preserving restoreProperty pattern used by the other ProcessTerminal suites, so real isTTY/setRawMode/columns/rows own-properties survive on TTY hosts and later test files are not poisoned.
2026-08-14 14:16:38 +02:00
roboomp 3f5cb91068 fix(tui): swallow late DA responses for the whole session
The private-CSI reassembly gate and the DA1 swallow were both guarded by
`#da1SentinelOwners.length > 0`, so a Device-Attributes reply that arrived
after the startup capability-probe sentinel FIFO drained fell through to the
input handler and leaked into the composer as literal text (e.g.
`1;22;...;52c`). The extra latency of an SSH/zmx PTY chain makes the race
observable.

`CSI ? ... c` and split private-CSI responses are terminal->host reports,
never keystrokes, so they are now consumed regardless of whether a sentinel
is still outstanding.

Fixes #8542
2026-08-14 10:57:37 +00:00
can1357 039728ad80 chore: bump version to 17.3.3 2026-08-14 05:44:05 +02:00
usr-bin-roygbiv ed108dec8b test(gemini): keep retry assertion behavioral 2026-08-14 02:54:25 +00:00
usr-bin-roygbiv fe33232298 fix(gemini): preserve retry and rendering boundaries 2026-08-14 02:48:18 +00:00
usr-bin-roygbiv bdbea3f7f3 fix(tui): recover reports after orphan fences 2026-08-14 02:15:22 +00:00
can1357 ae2d3d6ea1 chore: bump version to 17.3.2 2026-08-14 00:28:43 +02:00
can1357 0bc2c342f4 chore: bump version to 17.3.1 2026-08-13 19:39:21 +02:00
can1357 b279db1790 test: refactored test suites to eliminate time-based sleeps and polling loops
- Replaced time-based sleeps and polling loops with event-driven promise resolvers and fake timers across agent and tool tests.
- Migrated test suites to share in-memory auth storage and fixtures using lifecycle hooks.
- Updated catalog model definitions, metadata, and configurations.
2026-08-13 19:32:22 +02:00
can1357 2b02b1fbf0 test(tui): clear PI_TUI_RESIZE_IN_PLACE in stress env patch
The deterministic replay oracle only models in-place resize for tmux and
direct HerdR, but an inherited PI_TUI_RESIZE_IN_PLACE=1 makes the runtime
treat every scenario as in-place and desyncs the oracle. Add the key to
the stress env patch so a developer's override cannot leak into replay.
2026-08-13 18:44:18 +02:00
can1357 23aff5ae3f test(tui): model direct HerdR in-place resize in stress oracle
The HerdR flicker fix routed direct HerdR panes onto the in-place
multiplexer resize path, but the randomized render-stress oracle still
modeled them as ED3 replaying direct terminals. The width-epoch ledger
now applies to any in-place-resize scenario (multiplexer + direct HerdR)
via a dedicated resizeRepaintsInPlace trait, keeping HerdR's direct
scrollback semantics intact. Adds a deterministic replay regression
(seed 0xcafed00d, 24 iterations) that fails without the oracle update.
2026-08-13 18:39:29 +02:00
Ant39140 45b023cd83 fix(tui): keep btw panels out of scrollback 2026-08-14 00:09:56 +08:00
can1357 0b21036f66 chore: update changelogs 2026-08-13 18:09:56 +02:00
Muhammad Mustaqeem 3d05d9ae2f fix(tui): classify a long loop block by CPU time instead of duration
The watchdog discarded every overshoot longer than `sleepMs` (60s) as
system sleep, on the rationale that "the process could not have run JS
during the missed interval". That is true for a suspended process and
false for a CPU-bound wedge, which is exactly the case where JS ran the
whole interval at 100% CPU.

Duration cannot separate the two: both produce an arbitrarily large gap.
Keying the suppression on magnitude therefore dropped the most severe
stalls and kept only the mild ones, so the probe went quiet precisely
when it had something to report. Issue #5372 shows an 82,391ms block that
16.4.8 logged and current builds do not.

Classify by mechanism instead. `cpuNow()` reads process CPU time, and an
over-`sleepMs` gap is suppressed only when the process also burned less
than half of it on CPU. A resumed process shows a gap it did not spend
CPU on; a wedged one shows a gap it spent almost entirely on CPU. The
observed CPU time is included in the log line so a reader can tell which
kind of stall they are looking at.

Refs #5372, #7328, #6145
2026-08-13 20:57:00 +05:00
can1357 f4eb28e778 docs(tui): correct HerdR stress-scenario comment to match in-place resize policy
Direct HerdR panes no longer clear/replay via ED3 on resize; the
scenario description still claimed the old behavior. Aligns the comment
with PR #8433.
2026-08-13 17:13:14 +02:00
can1357 76457f82de refactor(tui): drop formatter churn from HerdR flicker fix
Revert the unrelated object-literal reflow bundled into the PR merge,
keeping only the direct-HerdR in-place resize routing, its tests, and
docs. PR #8433 (@roboomp).
2026-08-13 17:08:23 +02:00
roboomp 9b389d6006 fix(tui): preserved direct herdr clears
Scoped direct Herdr multiplexer behavior to resize repaint selection so explicit transcript replacements continue to clear and replay scrollback.

Added coverage for resize stability and resetDisplay ED3 behavior.
2026-08-13 14:45:03 +00:00
roboomp bb0314a5a1 fix(tui): stopped direct herdr pane flicker
Kept direct Herdr panes on the host-safe in-place resize path so streaming redraws no longer clear and replay pane scrollback.

Updated the resize regression, stress scenario, renderer docs, and changelog.

Fixes #8431
2026-08-13 14:34:03 +00:00
can1357 8b0f400d3c chore: bump version to 17.3.0 2026-08-13 08:28:43 +02:00
can1357 6b4823181b test: cleaned test suites and documented filtering guidelines
- Remove redundant definedness, null, and type checks across test suites in multiple packages.
- Clean up unused assertions, metadata tests, and obsolete test cases.
- Add good versus bad test filter guidelines and requirements to project documentation.
2026-08-13 08:28:42 +02:00
can1357 fc1fd664b9 chore(changelog): rewritten 2026-08-13 05:51:01 +02:00
can1357 2e492a3076 test(tui): corrected stress oracles and bounded-context resize expectation
- The mux pane-growth oracle treated every physical scroll as a logical append, but immutable-history recovery can recommit a corrected suffix after an off-screen mutation without advancing the shadow tape; exempt only changed shared history prefixes.
- The frame-neutral oracle compared prepared rows only; at narrow widths distinct raw rows prepare identically, so the renderer's raw-prefix divergence recovery recommits legitimately. Snapshot raw frames and allow declared transient growth.
- OSC66 spacer preservation intentionally composes six bounded context rows above the resize viewport; assert that exact bound instead of zero above-fold rendering.
Both oracle false positives reproduce identically at the PR head that introduced the harness (4cc9725037); three full randomized stress passes green after the fix.
2026-08-13 02:19:28 +02:00
can1357 ea10cce8d8 style: applied biome formatting to merged pull request sources 2026-08-13 01:23:48 +02:00
can1357 1c62a51dfd fix(tui): preserve OSC 66 spacers at viewport top 2026-08-13 01:14:53 +02:00
can1357 a8897e7012 Merge PR #8320: fix(tui): keep scaled OSC 66 heading reserved rows intact on repaint (@roboomp) 2026-08-13 01:14:52 +02:00