Commit Graph
944 Commits
Author SHA1 Message Date
roboomp 44586a9324 fix(tui): respected resize-in-place opt-out after detection
Gate the runtime alt-toggle resize latch when PI_TUI_RESIZE_IN_PLACE explicitly forces the fast path off, while preserving multiplexer handling.

Add regression coverage that auto-detects the alt-toggle echo, then verifies a later width resize still borrows the alternate screen and performs the authoritative ED3 rewrap.
2026-07-24 12:30:23 +00:00
roboomp fe4dec9b9b fix(tui): auto-detected alt-toggle size echo to stop overlay-exit flicker
Terminals that re-report their size whenever the alternate screen buffer toggles turned every fullscreen-overlay exit (/settings, models page) and resize into a spurious height-only SIGWINCH. That armed the resize drag/settle behind the overlay and drove a destructive ED3 clear-scrollback full repaint on exit -- visible as a flicker on terminals without DEC 2026 synchronized output -- with the size revert flashing another.

A SIGWINCH while a fullscreen overlay covers the transcript now repaints the overlay in place instead of arming the drag/settle, and the in-place resize path is latched once the height-only alt-toggle echo is observed, so this was previously handled only for Warp and is now auto-detected for any such terminal.

Fixes #6511
2026-07-24 12:23:20 +00:00
can1357 22a2ea1699 refactor(tui): moved Hangul Jamo width onto the TERMINAL capability object
- Replaced resolveHangulCompatibilityJamoWidthFromTerminalIdentity with a
  static hangulJamoWidth field on TerminalInfo (ghostty 2, warp 1,
  platform otherwise); startup now reads TERMINAL.hangulJamoWidth.
2026-07-24 06:53:58 +02:00
roboomp 74c4868358 fix(tui): corrected Warp compatibility Jamo width
- Reused terminal identity detection to select Warp narrow and Ghostty wide profiles.
- Covered Warp resolution while preserving platform defaults for other terminals.

Fixes #6461
2026-07-24 03:37:47 +00:00
can1357 ef39fe18b9 Merge PR #6420: fix(tui): re-resolve transient status colors on theme swap (@roboomp) 2026-07-23 22:15:21 +02:00
roboomp 93d032a144 fix(tui): re-resolve transient status colors on theme swap
Status presenters (showWarning/showError/showStatus and extension/tool
error presenters) baked theme.fg() into Text at construction, so a
warning shown while the auto-theme default guess was dark kept the
dark-mode color after async appearance detection switched the active
theme to light — dark-catppuccin Mocha yellow on the light Latte
background (1.12:1 contrast, effectively invisible).

Add Text.setStyleFn(), a foreground styler evaluated at render time, and
route the transient status presenters through it. Because the coding
agent invalidates status components on onThemeChange, a theme swap now
re-shapes them against the live theme instead of replaying the palette
active when they were constructed.

Fixes #6337
2026-07-23 19:20:53 +00:00
roboomp 6a98c4eb26 fix(tui): reset cursor-key and keypad mode on terminal teardown
omp took full ownership of the TTY and emitted a comprehensive private-mode
reset menu on teardown, but never restored normal cursor-key (DECCKM) or
numeric-keypad mode (terminfo `rmkx` = `\x1b[?1l\x1b>`). The native key decoder
accepts both CSI (`\x1b[A`) and SS3 (`\x1bOA`) arrow encodings, so omp never
enabled application mode itself and never bothered to reset it -- but a program
that shares the TTY (or inherited state) could leave the terminal in
application-cursor-keys mode. Arrows then arrived as SS3 and the parent shell's
Up/Down history navigation stayed broken after omp exited.

Emit `rmkx` in ProcessTerminal.start() (normalize inherited state so arrows use
the predictable CSI form inside omp), ProcessTerminal.stop(), and the blind
branch of emergencyTerminalRestore() (restore normal mode so the shell handoff
is sane), symmetric with every other terminal mode omp manages.

Fixes #6374
2026-07-23 18:43:44 +00:00
can1357 39c3f2a054 Merge PR #6329: fix(settings): expose Hindsight API token (@salmonumbrella) 2026-07-23 11:37:12 +02:00
salmonumbrella 47a0c56f93 fix(settings): mask Hindsight API token 2026-07-22 18:50:05 -07:00
can1357 7504d4c24d fix(coding-agent): kept setup wizard selection visible on short terminals
- Provider sign-in, theme, and web-search lists now shrink their visible row window to fit available height.
- Decorative chrome (sign-in hint, theme mock preview) yields to the list when space is tight.
- SelectList and OAuthSelector expose `setMaxVisible`/`setMaxHeight` so hosts can refit lists after construction.
2026-07-23 03:36:20 +02:00
can1357 1b77b42ba2 Merge PR #6204: fix(tui): route explicit appearance refresh through tmux (@roboomp) 2026-07-22 21:13:18 +02:00
can1357 d65f734e81 Merge PR #6224: fix(tui): deduplicate slash command aliases (@roboomp) 2026-07-22 21:13:18 +02:00
pppobear 7cbcc3e3a7 Normalize OSC 8 links in inline Markdown 2026-07-22 18:56:14 +08:00
pppobear 08e617eec7 Fix ST-terminated OSC 8 Markdown tables 2026-07-22 18:30:15 +08:00
roboomp 245d049559 fix(tui): deduplicated slash command aliases
Selected one highest-scoring completion per command so canonical names and matching aliases no longer occupy duplicate rows while exact aliases still win.

Fixes #6131
2026-07-21 21:21:58 +00:00
roboomp 51de8b9846 fix(tui): routed explicit appearance refresh through tmux
- Wrapped the user-requested OSC 11 query and DA1 sentinel in one tmux passthrough envelope.
- Preserved direct startup and Mode 2031 probes and retained passthrough routing when a refresh is queued.
- Added regression coverage for the emitted tmux control sequence.

Fixes #6066
2026-07-21 20:38:24 +00:00
roboomp b473e5f8ea fix(tui): resumed direct writes after conpty settle
Expired post-paint settle timestamps kept requestDirectWrite on the scheduled component-render path after the 150 ms guard ended.

Expire stale timestamps before selecting the fallback, preserving coalescing inside the active window.

Fixes #6024
2026-07-18 22:36:07 +00:00
can1357 4a6fab5530 Merge PR #6012: fix(tui): preserve history across tmux pane growth (@roboomp) 2026-07-18 21:32:20 +02:00
roboomp 642c9e2eba fix(tui): preserved history across tmux pane growth
Rebased the committed-row seam when multiplexer reflow exposes native scrollback inside an enlarged viewport.

Added production transcript coverage for a finalized prefix above a live response and verified no ED3 is emitted.

Fixes #6011
2026-07-18 19:17:48 +00:00
can1357 8a25d9e517 Merge PR #5767: fix(coding-agent): clear inline images when disabled (@derekszen) 2026-07-18 20:12:48 +02:00
can1357 17212e22e3 Merge PR #5779: fix(tui): prevent vibe_wait TV-wall scrollback stacking (@roboomp) 2026-07-18 20:12:47 +02:00
can1357 9a2a9e3ffb Merge PR #5849: fix(tui): restore slash description wrapping (@roboomp) 2026-07-18 20:12:45 +02:00
can1357 b2c7a709e5 Merge PR #5937: perf(tui): carry measured widths through rendering (@metaphorics) 2026-07-18 19:57:43 +02:00
Derek Zeng 9a452077b2 fix(coding-agent): clear inline images when disabled 2026-07-18 18:12:08 +08:00
metaphorics 92380971da perf(tui): carry measured widths through rendering
Carry exact visible widths from Text and Box render results into their owners, and through Editor wrap/layout/render state. Stamp derived widths and render caches with a monotonic Hangul width-config epoch. Retain sidecar entries only by WeakMap owner identity, with immutable publication-time line/width proof, and conservatively remeasure escape-leading padded rows.

Before:
  static_redraw 1633.11 us/op
  editor_edits  1249.71 us/op
After hardened repair:
  static_redraw 1321.51 us/op (1.236x)
  editor_edits  1150.32 us/op (1.086x)
Win:
  Exact byte/grid/scrollback hashes match across all five phases; every phase CV is below 20%, with no B/C regression.
Memory:
  retained heap 251,393,541 -> 251,500,114 bytes (+0.042%).

Op: carry exact widths through render ownership and editor layout
Restores: repeated visible-width measurement in core TUI hot paths
2026-07-18 10:50:39 +09:00
roboomp 3eca0813bb fix(tui): preserved callback-driven full renders
Kept full-root rendering as the default after input and introduced an explicit host opt-in for stable-focus subtree repainting. The coding-agent default composer opts in, while extension-provided editors and other TUI consumers retain callback-safe full composition.
2026-07-18 00:20:15 +00:00
roboomp ea29f72dc0 fix(tui): scoped stable-focus keystroke renders
Scoped ordinary input frames to the focused component while retaining a full compose when input moves focus. Explicitly repainted the coding-agent pending-message sibling and covered stable focus, wrapped growth, focus movement, and queue clearing.

Fixes #5928
2026-07-18 00:12:08 +00:00
can1357 4a363870aa Merge PR #5866: fix(tui): prevent settings exit flicker (@roboomp) 2026-07-17 21:22:08 +02:00
can1357 afd7265c4c Merge PR #5863: fix(tui): recognize remote cmux resize sessions (@roboomp) 2026-07-17 21:22:07 +02:00
can1357 4d7604dffc Merge PR #5837: fix(tui): exit when the terminal disconnects (@roboomp) 2026-07-17 21:22:07 +02:00
can1357 c081dedd3a Merge PR #5887: fix(tui): isolate wrapped OSC 8 links in tables (@roboomp) 2026-07-17 21:22:06 +02:00
roboomp 65d0d779f0 fix(tui): close OSC 8 links on explicit cell newlines
Closed active OSC 8 state on wrap_single_line's short-line fast path and wrapped whole table cells in one call so hyperlinks stay balanced across <br>-derived newlines.

Fixes #5885
2026-07-17 17:41:24 +00:00
roboomp 54fe6a4bcd fix(tui): isolated wrapped OSC 8 table links
Closed and restored OSC 8 hyperlinks at native wrap boundaries so composed table cells cannot inherit active link state.

Moved explicit-link spacing outside the clickable URL span and added wrapped table regression coverage.

Fixes #5885
2026-07-17 17:28:20 +00:00
roboomp 50dec0fef9 fix(tui): prevented settings exit flicker
- Kept height-only resize echoes on the normal buffer.
- Preserved alternate-screen borrowing for width drags.
- Added a regression test for the settings-exit resize path.

Fixes #5854
2026-07-17 15:22:39 +00:00
roboomp 930221ee01 fix(tui): recognized remote cmux resize sessions
Treated CMUX_REMOTE_TRANSPORT as an authoritative cmux marker so pane resizes use the in-place repaint path instead of borrowing the alternate screen.

Added a regression test for the native cmux SSH environment and documented the fix.

Fixes #5857
2026-07-17 14:54:55 +00:00
roboomp 81e977d8f2 fix(tui): restored slash description wrapping
Re-enabled wrapped descriptions for slash-command autocomplete while preserving the existing visual-row popup budget.

Replaced the compact-row regression with an editor-level contract that proves long description tails remain visible.

Fixes #5848
2026-07-17 14:22:00 +00:00
roboomp e6b3e1acf0 fix(tui): buffered split raw paste bursts before classifying
Raw unbracketed paste data may span adjacent stdin reads. The prior call-local check drained a first chunk such as "line 1\r" before later lines could classify the burst, leaving the original per-line submit bug.

- Held ESC-free break-bearing input in a fixed 10 ms classification window and appended adjacent raw reads before classification.
- Coalesced candidates after two completed logical line breaks; replayed ambiguous candidates unchanged through the normal per-key path on expiry or before escape-bearing input.
- Cleared and exposed pending candidates through the existing flush, clear, getBuffer, and destroy lifecycle.
- Added regressions for split reads, a break-only boundary, and delayed replay of ordinary Enter input.

Fixes #5841
2026-07-17 13:26:38 +00:00
roboomp bacad80b56 fix(tui): require 3+ lines to coalesce a raw paste burst
The single-interior-break heuristic misclassified a single Enter batched with a following keystroke in one stdin read ("a\rb") as a paste, swallowing the submit. Terminal read boundaries are not key boundaries.

- Tightened RAW_MULTILINE_BURST to content-break-content-break-content so only 3+ line bursts (two interior break runs; CRLF counts as one) coalesce; a single Enter can never produce two interior breaks.
- Added regression tests for CRLF three-line bursts, a batched single Enter, and an ambiguous two-line burst staying on the key path.

Fixes #5841
2026-07-17 13:16:39 +00:00
roboomp 838fbca3d1 fix(tui): coalesced raw multiline paste bursts without bracketed markers
- Detected an ESC-free stdin burst with an interior CR/LF in StdinBuffer.process and routed it through the paste channel instead of per-key splitting, so a Cmd+V multiline block whose terminal omitted the \x1b[200~…\x1b[201~ markers no longer fires one submit per line.
- Guarded to ESC-free buffers so real bracketed pastes, CSI keys, and mouse reports keep their path; a lone Enter, a single trailing newline, and a run of bare Enters stay normal keypresses.
- Added regression tests for the raw CR/LF burst, single Enter, trailing Enter, bare-Enter run, single-line burst, and escape-bearing chunk.

Fixes #5841
2026-07-17 13:07:57 +00:00
roboomp 09b43b7581 fix(tui): exited when terminal disconnected
Stopped the renderer when stdin closes or stdout fails, then raised SIGHUP so registered session cleanup completes before exit.

Fixes #5835
2026-07-17 11:53:11 +00:00
can1357 eac51b6a04 Merge: darkphilosophy/feat/advisor-per-agent-toggle
Brings the per-advisor toggle, status-line glyphs, quota display, and the
failing-advisor stall/abort fix (f4c8143) onto main's rewritten advisor
runtime. Conflict reconciliation kept main's architecture (fingerprint
prefix reconciliation, host-level onTurnError recovery + fallback chains,
terminal-failure classification) and ported the branch semantics onto it:

- #failing latch: waitForCatchup resolves immediately while an advisor is
  mid-failure; parked waiters wake the moment a turn fails, before any
  async hook or retry sleep.
- Turn-end render containment: a formatter bug restores the cursor/prefix/
  dedup snapshot and never propagates into the primary's turn-end callback
  (per-advisor try/catch boundary in AgentSession).
- Quota pause: when host recovery declines a usage-limit failure, the
  runtime latches quotaExhausted, requeues the batch, and notifies —
  cleared only by an explicit reset.
- Hard halt after a permanent rejection or three backlog-drop cycles.
- #recoverAdvisorTurn also marks usage limits for structural errors thrown
  before any assistant turn is recorded.
2026-07-17 07:37:29 +02:00
can1357 1b267ad3fe fix(tui): restored alt-screen borrow for resize drag frames
- v17.0.1 (#5476) rewrote the normal buffer in place per SIGWINCH, so
  the terminal's own width reflow pushed wrapped fragments into native
  scrollback mid-drag and resize smoothness collapsed.
- Throwaway drag frames paint on the alternate screen again; the settle
  full paint fuses the buffer exit ahead of its destructive repaint.
- Kept the #5319 fixes: deferred overlay alt-exit fusing, confirmed-only
  DECRPM 2026 handling, and Warp's in-place resize path.
2026-07-17 05:49:22 +02:00
can1357 2a6d551063 revert(status-line): restored single-row status bar with priority drop
- Reverted PR #5751 (issue #5749): continuation rows wrapped the editor
  top border onto extra lines, which is unacceptable for the input frame.
- EditorTopBorder is back to a single content/width pair; narrow widths
  drop right segments, shrink the path, then drop left segments.
2026-07-17 05:49:13 +02:00
can1357 8876eef886 Revert "merge PR #5669 via eval/pr-5669: fix(tui): preserve inline images in scrollback"
This reverts commit 8ac271b90b, reversing
changes made to 5903894e66.
2026-07-17 05:32:26 +02:00
can1357 2594ae352b style: formatted conflict-resolved files with biome 2026-07-17 05:01:19 +02:00
DarkPhilosophy 1b4c292f8f Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle 2026-07-17 05:47:09 +03:00
can1357 4e85f6acee apply PR #5490: fix(tui): refresh dark/light appearance on explicit ctrl+l reset
Cherry-picked 69c9fe8d4; resolved terminal.ts against the newer
onPrivateModeReport signature and unioned appearance tests with the
Windows Terminal polling regression.
2026-07-17 04:45:22 +02:00
can1357 f077d2c7b6 merge PR #5751 via eval/pr-5751: fix(status-line): wrapped overflow segments 2026-07-17 04:40:05 +02:00
can1357 bcc67be379 merge PR #5714 via eval/pr-5714: fix(tui): preserved plan review text selection 2026-07-17 04:39:15 +02:00
can1357 8ac271b90b merge PR #5669 via eval/pr-5669: fix(tui): preserve inline images in scrollback 2026-07-17 04:37:11 +02:00