TuiAltScreen.copySelectionToClipboard() wrote a bare OSC 52 sequence and
flashed "Copied!" unconditionally. Terminals that ignore OSC 52 clipboard
writes (macOS Terminal.app, VTE terminals, tmux without OSC 52 passthrough)
left the system clipboard untouched while the toast reported success.
Add an injectable copySelection option to TuiAltScreenOptions (an async
handler returning whether the copy succeeded) and use it when provided,
falling back to the existing OSC 52 write otherwise. The coding agent now
injects its native clipboard implementation (clipboard addon + pbcopy /
wl-copy / xclip / xsel), so selection copy reaches the real clipboard and
the toast only fires on verified success, with "Copy failed" otherwise.
Closes#7761
Co-authored-by: 富永 誠 <makoto@credify.one>
Skip TuiAltScreen viewport consume for wheel and alt-screen scroll
keys when a visible overlay has focus. Transcript search still owns
those events so the transcript can move while the find box is open.
fixes#7894
Split StdinBuffer's incomplete-sequence wait from the lone-ESC wait so SSH and PI_TUI_ESC_TIMEOUT can reassemble split Alt+Enter without delaying Escape or mouse/CSI buffering.
* fix(tui): prevent split Alt+Enter from interrupting
Increase the escape-sequence timeout over SSH and allow high-latency terminals to override it with PI_TUI_ESC_TIMEOUT.
Fixes#7876
* docs(coding-agent): shorten escape timeout description
---------
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
Add tui.altScreen.lineUp and tui.altScreen.lineDown keybinding actions
for one-line viewport scrolling in fullscreen TUI. Both are unbound by
default and can be configured via user keybindings.
closes#7830
Co-authored-by: midas <midas@traderdifferent.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
paintBox ran every visible text row through compositeTuiLine on every
frame, rebuilding each row string via ANSI/grapheme segmentation even
when nothing changed. Full-width boxes painting onto untouched rows now
assign the source line reference directly; padding is unnecessary since
rows are written with erase-line and the final width clamp still
truncates over-wide lines.
Cuts alt-screen per-frame allocation churn 9-18x (test/render-churn-bench.ts)
and removes the fullscreen RSS penalty over regular mode on short
sessions (previously +11-29 MiB loaded, +26-36 MiB peak).
When truncateToWidth() cut through an OSC 8 hyperlink label, the retained prefix could leave the hyperlink open. Close an active hyperlink before the existing reset and ellipsis, preserving its BEL or ST terminator.
Added a focused regression test for the reported BEL-terminated case.