Commit Graph

1022 Commits

Author SHA1 Message Date
Voon Foo f92957bc6f fix(tui): clip direct Kitty placements when image blocks straddle the viewport top
- The Image line's CUU(rows-1) clamps at the viewport top once the block's
  leading rows scroll out, re-anchoring the full image shifted down; Kitty
  replace-by-id then strips the prior placement's cells, scrollback included -
  permanently cropped inline images on WezTerm/Warp.
- The renderer now rewrites placement lines at write time, clipping the source
  rectangle (y=/h=) to the visible slice, and advances the placement id (epoch)
  exactly when cells attached by the current epoch enter native scrollback:
  every rendered frame feeds its raw commit target to the budget, crossing an
  epoch's attach top latches a per-image archived flag, and the next emit
  consumes it. Era-local comparisons keep ledger rewinds (duplication-never-
  loss recommits) correct by construction; no-commit rewrites (overlay
  show/hide) keep replacing the same id. The watch set bounds the per-frame
  scan to live un-archived placements regardless of session length.
- Destructive ED3 replays restart epochs and delete every registry entry each
  image placed (placement-scoped d=i, data retained) before re-placing under
  epoch 1, so repeated resets cannot strand terminal-side placements.
- Verified against WezTerm 20240203 cell-attachment debug logs: straddling
  frames attach exactly the visible slice, the finalize commit writes a full
  archive copy under a fresh id, and resetDisplay deletes exactly the ids the
  image ever placed.
2026-08-09 21:15:33 +08:00
can1357 3cf1e42a05 fix(tui): preserve unbraced math continuations 2026-08-08 19:38:32 +02:00
can1357 78cd70bb94 Merge PR #7997: fix(tui): keep display-math fractions intact across source newlines (@roboomp) 2026-08-08 19:38:32 +02:00
roboomp a6aa462a60 fix(tui): bounded WSL idle animation CPU
- Removed the Loader backpressure cap so slow ConPTY paints retain the documented proportional duty cycle.

- Made WSL terminal-title working state static to avoid a second periodic OSC write loop.

Fixes #8012
2026-08-08 13:17:01 +00:00
roboomp fe86512268 fix(tui): parsed spaced nested command arguments
Share display-command arity with readArg and consume exactly that many
required arguments across whitespace. This keeps continuation newlines
collapsed to spaces without separating a nested command from its own
argument or letting it absorb the outer command's next argument.

Cover adjacent, spaced, and source-line-split sqrt and nested-fraction
numerators.

Fixes #7996
2026-08-08 09:03:00 +00:00
roboomp 9757a7b160 fix(tui): preserved outer arity through command arguments
Track pending command arities as nested frames instead of replacing the
outer frame when an unbraced command supplies an argument. Match readArg
by treating each command and its attached groups as one outer atom, while
retaining only that command's own missing arguments.

This keeps fractions such as `\frac\sqrt{a}\n{b}` waiting for their
denominator without folding standalone braced rows.

Fixes #7996
2026-08-08 08:52:02 +00:00
roboomp 2504800a4b fix(tui): only suppress a math row break when a command owes an argument
The first pass suppressed the top-level newline split whenever the next
row opened with `{`, folding a genuine braced row (`a\n{b+c}`) into the
row above. Gate the continuation on bracesOwed(): a newline joins to the
next row only when the current row ends with a command still awaiting a
brace argument (`\frac{num}\n{den}`, `\frac\n{a}{b}`, `x^\n{2}`); a row
that merely opens with a braced group stays a real row break.

Fixes #7996
2026-08-08 08:40:07 +00:00
roboomp 0f7e379006 fix(tui): keep display-math fractions intact across source newlines
latexToBlock pre-split display math on top-level newlines to stack a
`lhs =` line above its block, but a newline between `\frac{num}` and
`{den}` falls at brace-depth 0 and was treated as a row break, severing
the fraction from its denominator and rendering it as fragmented text.

Treat a top-level newline whose next non-space token opens a `{…}`
argument group as an argument continuation rather than a row break, and
collapse those interior newlines to a space so the argument reader parses
both brace groups.

Fixes #7996
2026-08-08 08:30:48 +00:00
can1357 d8def7418c Merge PR #7801: fix(tui): avoid leaking DA1 through tmux appearance refresh (@anatoli-tsinovoy) 2026-08-07 13:37:56 +02:00
can1357 cc28589c4a Merge PR #7810: fix(tui): preserve scrollback in Herdr panes (@chessl) 2026-08-07 13:37:56 +02:00
Chess Luo c720597d43 fix(tui): preserve scrollback in Herdr panes 2026-08-06 15:29:21 +08:00
Anatoli Tsinovoy 54481bebb7 fix(tui): avoid tmux DA1 passthrough 2026-08-06 09:11:34 +03:00
Anatoli Tsinovoy 86c6265e16 fix(tui): read refreshed tmux appearance cache 2026-08-06 08:09:56 +03:00
can1357 49e0fff7f9 Merge PR #7573: fix(tui): use Kitty flag 1 on Windows to fix Shift+letter input (@0xGREG) 2026-08-05 21:50:01 +02:00
can1357 db09dedda9 Merge PR #7707: fix(tui): detect systemd user bus for Linux desktop notifications (@metaphorics) 2026-08-05 21:50:01 +02:00
can1357 c2827621a7 Merge PR #7695: fix(tui): trigger autocomplete for Windows drive-absolute paths (@metaphorics) 2026-08-05 21:50:01 +02:00
can1357 501cc74754 Merge PR #7747: fix(tui): handle raw-mode startup EIO instead of aborting (@mvid) 2026-08-05 21:50:00 +02:00
Mantas Vidutis 6e81c9cb6c Merge upstream/main into fix/raw-mode-startup-eio 2026-08-05 11:43:18 -07:00
metaphorics fcf0923366 docs(tui): describe the systemd user-bus fallback
Add the Unreleased entry for the desktop-notification fix and correct
the hasLinuxDesktopSession docstring, which still claimed the check was
limited to a session bus address in env.

Addresses review feedback on #7707.
2026-08-05 22:40:25 +09:00
metaphorics 54e36db16d fix(tui): trigger autocomplete for Windows drive-absolute paths 2026-08-05 11:43:26 +00:00
can1357 e9888367d1 refactor: migrated packages to internal utility modules and removed external dependencies
- Implemented in-house, zero-dependency utility modules in `pi-utils` covering DOM manipulation, markdown parsing, templating, browser automation helpers, and terminal buffers.
- Migrated packages across the repository to consume the new internal utilities and `omptype` schema validators instead of external dependencies.
- Removed multiple external runtime and development dependencies including Zod, Marked, LRU cache, Turndown, and Puppeteer browser packages.
2026-08-05 13:39:09 +02:00
metaphorics 8e06f2c6b8 docs(tui): document Linux user bus fallback 2026-08-05 11:11:00 +00:00
metaphorics a6c129533c fix(tui): detect Linux user bus socket 2026-08-05 10:51:27 +00:00
can1357 40d47b557f Merge PR #7580: fix(tui): run sixel probe under WSL + Windows Terminal (@roboomp) 2026-08-05 01:11:56 +02:00
can1357 2eea289648 Merge PR #7576: fix(tui): terminate wrapped table cell lines' SGR state so borders keep default color (@miaopan607) 2026-08-05 01:11:56 +02:00
Mantas Vidutis 46051126a3 fix(tui): handle raw-mode startup EIO 2026-08-04 11:40:45 -07:00
metaphorics 3802d2dd80 chore(ts): enforce noImplicitOverride 2026-08-05 02:49:01 +09:00
roboomp 6eb9574436 fix(tui): ran sixel probe under wsl windows terminal
The SIXEL capability probe gated on process.platform === "win32", but
under WSL process.platform is "linux", so the probe never ran and inline
images fell back to the text placeholder even on Sixel-capable Windows
Terminal. Gate on isConPTYHosted() (native win32 or WSL) instead; the
existing WT_SESSION and TTY requirements still scope it to WT.

Fixes #6009
2026-08-04 02:55:38 +00:00
淼畔 6b2d532269 fix(tui): terminate wrapped table cell lines' SGR state so borders keep default color
Table rows splice every wrapped cell line between unstyled border glyphs.
The native wrap deliberately leaves fg color and bold/italic open at line
ends so continuation lines can re-open them, so a codespan broken across a
wrap leaked its color into the '|' borders, inter-cell padding, and the
following cells. Close SGR state per cell line (bold/italic off, default
fg; background preserved) in #wrapCellText.

Closes #7575
2026-08-04 09:56:54 +08:00
Gergely Jutasi 0072385e22 fix: use isConPTYHosted() predicate, add CHANGELOG entry
Use isConPTYHosted() instead of process.platform === "win32" so the
flag-4 avoidance also covers WSL under a Windows terminal (where
process.platform is "linux" but stdout still crosses ConPTY).

Add CHANGELOG entry under [Unreleased] for this user-facing fix.
2026-08-04 02:55:12 +02:00
Gergely Jutasi a34446823d fix: revert keys.ts SHIFT_MAP, move Windows check before flag-2 branch
Remove the US-layout-specific SHIFT_MAP fallback from keys.ts (not
needed with flag 1, and wrong for non-US layouts).

Move the Windows platform check before the flag-2 preservation branch
in terminal.ts so that Windows always avoids flag 4, even when a parent
TUI has already enabled flag 2. In that case, push flag 3 (1+2) instead
of flag 7 (1+2+4).
2026-08-04 02:48:33 +02:00
Gergely Jutasi 91be0eba77 fix(tui): use Kitty flag 1 on Windows to fix Shift+letter input
WezTerm/ConPTY on Windows drops Shift+letter keypresses entirely when
Kitty keyboard protocol flag 4 (report alternate keys) is set. Fall
back to flag 1 (disambiguate only) on Windows so shifted printable
keys are delivered as raw characters instead of being silently eaten.

Also adds a defensive SHIFT_MAP fallback in decodeKittyPrintable for
terminals that send CSI-u sequences with the shift modifier but omit
the shifted_key secondary codepoint.
2026-08-04 02:35:48 +02:00
can1357 c6b282bc68 fix(tui): preserve kitty event reporting mode 2026-08-02 20:54:39 +02:00
roboomp 422aeeea49 fix(tui): requested base-layout keys for shortcuts
Requested Kitty flag 4 alongside escape-code disambiguation so Ghostty reports base-layout key codepoints for non-Latin keyboard layouts.

Added negotiation and shortcut-matching regression coverage.

Fixes #7320
2026-08-01 20:36:22 +00:00
roboomp b1b6d99627 fix(tui): backpressured slow loader paints
Measured each animated Loader paint and recursively scheduled the next frame with a 10% duty-cycle target, capped at 200ms to retain responsiveness.

Added a regression covering a slow synchronized-output direct-write path and documented the fix.

Fixes #7290
2026-08-01 17:23:26 +00:00
can1357 a91fa13116 Merge PR #7055: fix(tui): preserve literal code block rows (@GratefulDave) 2026-07-31 19:42:43 +02:00
can1357 f1f7ed7f75 Merge PR #7113: fix(tui): ignore system sleep in loop watchdog (@wolfiesch) 2026-07-31 19:28:43 +02:00
can1357 540e8f5797 Merge PR #7188: fix(coding-agent): preserve scrollback on appearance changes (@Sairen777)
# Conflicts:
#	packages/coding-agent/src/modes/controllers/input-controller.ts
2026-07-31 19:08:16 +02:00
Alex Jaden daa9b99aab fix(coding-agent): preserve scrollback on appearance changes 2026-07-31 10:34:43 +05:00
can1357 652647770e feat(coding-agent): added app.live.toggle keybinding and map display reset to alt+l
- Add the `app.live.toggle` keybinding defaulted to `Ctrl+L` to start or stop live voice mode.
- Remap the default display-reset action (`app.display.reset`) from `Ctrl+L` to `Alt+L`.
- Update the live visualizer to listen for stop keys so the toggle chord terminates active sessions.
2026-07-31 00:20:04 +02:00
Wolfgang Schoenberger 2841e99a95 fix(tui): ignore system sleep in loop watchdog 2026-07-30 14:48:06 -07:00
David Andrews 9502bc2341 fix(tui): preserve literal fenced code rows 2026-07-30 15:41:35 -04:00
David Andrews aa2417c8f6 fix(tui): preserve literal fenced code rows 2026-07-30 15:27:21 -04:00
David Andrews 096ff49fc5 fix(tui): preserve nested code copy 2026-07-30 15:27:21 -04:00
David Andrews 7928353e02 fix(tui): preserve assistant code copy 2026-07-30 15:27:21 -04:00
David Andrews cf069f37c8 fix(tui): preserve literal code block rows 2026-07-30 15:27:21 -04:00
can1357 83294afc0a Merge PR #7013: fix(tui): prevent UUID prefixes rendering color swatches (@roboomp) 2026-07-29 23:09:04 +02:00
roboomp 4e06b7f1f5 fix(tui): prevented UUID prefixes rendering color swatches
Excluded canonical hash-prefixed UUIDs from prose hex-color matching while preserving standalone 8-digit CSS colors.

Fixes #7002

(cherry picked from commit b423fe6e51bb1d45b88916f885f1b81e1ce54ff0)
2026-07-29 23:09:03 +02:00
can1357 e24babd8e1 Merge PR #6941: fix(tui): stop loader spinner re-wrapping text every tick (@roboomp) 2026-07-29 23:08:40 +02:00
roboomp beaafb9955 fix(tui): handled mixed-width spinner frames
Cached one stable layout representative per frame display width so same-width animation retains the fast path while width transitions rewrap before painting. Added coverage for wider custom frames remaining within terminal bounds.

(cherry picked from commit 3aa173a574538d754e68f8d10f7b88d437709884)
2026-07-29 23:08:40 +02:00