Commit Graph

568 Commits

Author SHA1 Message Date
usr-bin-roygbiv bdbea3f7f3 fix(tui): recover reports after orphan fences 2026-08-14 02:15:22 +00:00
can1357 28997c0d46 refactor(coding-agent): restructured transcript rendering during initialization
- Stage transcript initialization inside a detached TranscriptContainer to keep existing messages visible during incremental rendering.
- Add fallback state restoration in InteractiveMode.renderInitialMessages when chat rendering is aborted or fails.
- Update render-initial-messages tests to assert that old transcripts remain visible until replacements are fully committed.
2026-08-13 18:55:36 +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
can1357 e8eed95130 feat(coding-agent): introduced fine grained per agent advisor configuration
- Replaced blanket subagent advisor global settings with fine-grained per-agent configuration and frontmatter support.
- Added dashboard keybindings and inline override editors for managing agent advisor patterns.
- Implemented settings migration logic to convert legacy global options into per-agent settings.
- Updated session persistence and execution layers to restore and enforce per-agent advisor behaviors.
2026-08-13 04:59:50 +02:00
can1357 2dddba9fe4 Merge PR #8199: fix(coding-agent): gate prompt tool mentions on session tool availability (@szavadsky)
# Conflicts:
#	packages/coding-agent/src/prompts/system/orchestrate-notice.md
#	packages/coding-agent/src/prompts/system/plan-mode-active.md
#	packages/coding-agent/src/prompts/system/project-prompt.md
#	packages/coding-agent/src/prompts/system/system-prompt.md
2026-08-13 01:18:42 +02:00
can1357 193894c8d4 Merge PR #8135: fix(tui): keep large transcript rebuilds responsive (@roboomp)
# Conflicts:
#	packages/coding-agent/test/modes/utils/render-initial-messages.test.ts
2026-08-13 01:16:23 +02:00
can1357 338abf4881 Merge PR #8266: fix(omp): prevent false reset fireworks (@oleksoleksoleks) 2026-08-13 01:14:51 +02:00
Shawn Koh 16c2832404 fix(tui): validate leading width epoch blocks
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 16:16:20 +08:00
Shawn Koh d131b61227 fix(tui): preserve non-prefix width appends
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:42 +08:00
Shawn Koh 8751a9571f fix(tui): preserve live output across width epochs
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:42 +08:00
Shawn Koh fb0bcdbba0 fix(tui): preserve mutable Markdown row on resize
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:41 +08:00
Shawn Koh d164a6407a fix(tui): avoid unwatermarked width-epoch appends
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:41 +08:00
Shawn Koh ef803e3880 fix(tui): rebuild direct HerdR scrollback from source 2026-08-12 10:14:41 +08:00
can1357 b6dc98eb63 test(coding-agent): updated test suites and assertions for coding agent
- Updated eager compaction and plan reference tests to track call indices and task delegation markers instead of text strings.
- Removed obsolete context message marker checks, vibe mode assertions, and prompt gating test cases.
- Simplified prewalk, workflow, and Gemini instruction test expectations across agent modules.
- Removed the system prompt personality test suite entirely.
2026-08-12 03:12:15 +02:00
can1357 a4d8860a6c feat: added google reasoning controls mcp stream resumption and tar support
- Added Google provider thinking configuration parameters and force-reasoning-off controls.
- Implemented MCP SSE stream resumption using Last-Event-ID and `SSEResumeError`.
- Added support for TAR old-GNU sparse extension blocks, path length checks, and archive entry overrides.
- Restricted external thinking support to specific models and added semver fallback parsing.
2026-08-12 02:32:45 +02:00
Daniel Anderson-Little e4dc5c9637 refactor(coding-agent): clarify warning activity policy 2026-08-11 17:52:05 -04:00
Daniel Anderson-Little d50e47d2af fix(coding-agent): align activity visibility contract 2026-08-11 17:26:33 -04:00
Daniel Anderson-Little cbd7dc2e70 fix(coding-agent): centralize hidden activity state 2026-08-11 17:07:20 -04:00
Daniel Anderson-Little 3a4ea6a376 fix(coding-agent): hide internal tool activity blocks 2026-08-11 16:59:53 -04:00
Alexander Kirilin d1741f04e6 fix(omp): prevent false reset fireworks 2026-08-11 13:52:48 -04:00
can1357 f3a3073a3d Merge PR #7959: fix(tui): show edit previews before approval (@roboomp) 2026-08-11 15:18:16 +02:00
can1357 b807d67e1d Merge PR #8238: fix(tui): render platform-aware modifier labels on macOS (@roboomp) 2026-08-11 15:15:45 +02:00
can1357 706371bb91 fix(extension-api): preserved overlay option factories 2026-08-11 15:08:39 +02:00
Vanko ed820703a7 fix(extension-api): restore overlayOptions/onHandle passthrough in ui.custom
showHookCustom hardcoded the overlay geometry and never read
overlayOptions/onHandle, which regressed the v0.45.6 API (PR
badlogic/pi-mono#667). Forward overlayOptions to showOverlay (keeping the
full-cover defaults as fallback), invoke onHandle with the returned
OverlayHandle, widen the options type via a shared ExtensionCustomOptions,
and re-export OverlayHandle/OverlayOptions from the extension API.
2026-08-11 15:08:39 +02:00
can1357 600bac9615 Merge PR #8213: Fix/8030 osc133 command start (@Mustaqeem66) 2026-08-11 15:07:43 +02:00
roboomp 097845bff0 fix(tui): render platform-aware modifier labels on macOS
Key hints resolved modifier tokens through a static, platform-agnostic label map with no `super` entry, so on macOS the shipped `super+v` paste default rendered 'Super+V' (no such key on a Mac) and `alt` always rendered 'Alt' instead of 'Option'. The static /hotkeys navigation rows were hardcoded with macOS 'Option'/'Cmd' names on every platform, so Linux/Windows users saw 'Cmd+Left'.

Modifier labels are now platform-aware: on darwin `alt` renders 'Option' and `super` renders 'Cmd'; every other platform keeps 'Alt'/'Super'. The platform is resolved through a single seam (setKeyHintPlatform/keyHintPlatform) mirroring the TUI's setKittyProtocolActive, keeping hint output deterministic in tests without mutating process.platform. The static /hotkeys rows use the same convention and drop the macOS-only Cmd line-start/end fragments (which map to no binding) off darwin.

Fixes #8235
2026-08-11 09:28:52 +00:00
Muhammad Mustaqeem bf99f9ce5b test(tui): lock the paired OSC 133 command zone instead of its absence
The existing assertion encoded the exact behaviour #8030 reports as the bug:
it required that no `133;C` ever be emitted, which is what leaves Ghostty's
sticky `.input` cursor semantic latched for the rest of the session.

Rewrite it around the property the fix actually guarantees. The marker must
now be present, but it must be immediately followed by `133;D;0` and appear
exactly once per bubble, so the command zone is opened and closed within the
same render and later assistant/tool output is still never grouped under the
submitted prompt. That was the real concern behind the original assertion,
and it is now checked directly rather than by proxy.

Refs #8030
2026-08-11 10:47:01 +05:00
Slava Zavadsky 8b8e1931a4 fix(coding-agent): address review on plan-mode and orchestrate gating
- plan-mode-active: when ask is unavailable, no longer present a prose
  terminal action — plan mode cannot yield on text-only turns. Preferences
  are recorded as Assumptions with a recommended default instead.
- orchestrate-notice: name edit/write in the tool budget and inline-edit
  guidance only when each tool is individually present (no stray
  `edit`/`write` when only one is active).
- Tests updated to the new contracts (incl. write-only/edit-only render
  coverage).
2026-08-10 20:44:12 -04:00
Slava Zavadsky b6a3862ebc fix(coding-agent): gate prompt tool mentions on session tool availability
System and mode prompts referenced tools that may be absent from the
session catalog, forcing the model to satisfy requirements it cannot
execute (generalizes #8139's browser-verification mismatch):

- system-prompt.md: browser verification now keys on the actual UI
  surface and available tools (browser/computer/TUI/CLI), with an
  explicit behavioral/smoke-test fallback when no runtime tool exists;
  todo workflow guidance and the AST-section grep hint are gated on
  tool presence; the auto-QA report_issue block additionally requires
  the write tool.
- project-prompt.md: workspace-tree drill-in and additional-roots tool
  hints only name tools present in the session.
- plan-mode-active.md: ask-tool directives get a prose fallback and
  scout-via-task dispatch is gated on the task tool (render site now
  passes askAvailable/taskAvailable).
- orchestrate-notice.md: the tool budget, verify gates, todo tracking,
  and inline-edit guidance are gated on tool presence; the notice is
  skipped entirely when the task tool is inactive (render fn takes the
  active tool list).

Adds regression tests for each gate; changelog entry.
2026-08-10 20:24:34 -04:00
Shawn Koh cfbd567628 fix: preserve punctuation label colors 2026-08-11 01:19:54 +08:00
Shawn Koh e658d9f7be fix: address Mermaid rendering review 2026-08-11 01:14:29 +08:00
Shawn Koh a42868f550 fix: make terminal state diagrams readable 2026-08-11 01:00:35 +08:00
roboomp 492cf010f1 fix(tui): serialized initial transcript replay
Kept initialChatRendered false until the incremental cold-start replay settles, preventing extension display callbacks from launching a synchronous rebuild into a partially replayed transcript. If session entries arrive while the replay yields, discard the stale partial tree and replay the current context before publishing the initialized state.

Fixes #8133
2026-08-10 05:48:57 +00:00
roboomp b606e7a175 fix(tui): yield before each replayed message
Moved the per-message rebuild yield to the top of the loop so it runs regardless of which early continue path (preserved-live, image-only, or grouped read result) an iteration takes. A large parallel read-result batch replays entirely through the isReadGroupResult continue, which previously skipped the trailing yield and rebuilt the whole batch in one event-loop turn.

Fixes #8133
2026-08-10 05:41:48 +00:00
roboomp 94c51945d4 fix(tui): chunked large transcript rebuilds
Replayed idle transcripts in bounded message and time chunks, painting cleared scrollback between macrotasks so terminal input remains responsive during restore and tree navigation. Kept streaming rebuilds atomic and migrated every rebuild caller to await completion.

Fixes #8133
2026-08-10 05:30:18 +00:00
roboomp ee2f10764c fix(tui): waited for edit previews before approval
- Gated model-issued approval dialogs on the TUI tool preview lifecycle.
- Finalized edit arguments before waiting for the asynchronous diff.
- Added regression coverage for both the preview gate and approval ordering.

Fixes #7957
2026-08-07 22:58:57 +00:00
can1357 38b61ae342 fix(session): honored explicit retry-after over reason backoff
- A provider-supplied retry-after now bypasses the transient rate/concurrency
  heuristic window instead of being overridden by it (regression from the
  subscription-cap retry change).
- Updated event-controller/ui-helpers test doubles for provenance-gated
  renderer selection (hasBuiltInTool), aggregated retryErrors on
  auto_retry_end, and Bedrock override compat gaining streamIdleTimeoutMs.
2026-08-07 23:38:25 +02:00
can1357 0e8142ad0e Merge PR #7904: fix(session): surface real handoff errors instead of false cancel (@roboomp) 2026-08-07 14:52:57 +02:00
roboomp 1e6638d8cd fix(session): surfaced real handoff errors instead of false cancel
The handoff catch in session-handoff.ts and the /handoff handler in
command-controller.ts mapped any error named AbortError to "Handoff
cancelled" regardless of whether the handoff signal was actually
aborted. Providers throw name-AbortError errors on non-user conditions
(stalls, idle timeouts, nested resolution failures), so a genuine
generation failure surfaced as a user cancellation and hid the cause.

Only report "Handoff cancelled" when handoffSignal.aborted is set;
re-throw the real error otherwise. The controller now trusts the
normalized "Handoff cancelled" message and drops its own AbortError
check so re-thrown provider failures render as "Handoff failed: ...".

Fixes #7903
2026-08-07 12:00:06 +00:00
can1357 9637a2cb0c Merge PR #7774: fix(tui): gate built-in renderers by tool provenance (@roboomp) 2026-08-07 13:37:57 +02:00
can1357 4beb58a39b fix(tree): make bookkeeping rows searchable 2026-08-07 13:37:57 +02:00
can1357 93f3c5c51c Merge PR #7782: fix(tree): stop rendering bookkeeping entries as empty rows (@ParadaCarleton) 2026-08-07 13:37:57 +02:00
ParadaCarleton ecaefd54d7 fix(tree): stop rendering bookkeeping entries as empty rows
Seven session entry types — title_change, credential_pin, mode_change,
service_tier_change, ttsr_injection, reset_boundary and session_init —
fell through #getEntryDisplayText's default branch to the empty string,
and none of them were in the default view's hidden set. Each one drew as
a bare bullet: a row you cannot read, cannot identify and cannot explain
the gap it leaves in the thread.

Hide them in the default and no-tools views, alongside the settings
entries they resemble, and give every one of them a label for `all`
mode. The default branch now falls back to the entry type rather than
the empty string, so a type added later degrades to a dull row instead
of an invisible one. Service tier renders its per-family map, and says
"(default)" when the tier was cleared instead of printing null.
2026-08-05 19:08:54 -07:00
roboomp 931f61867c fix(tui): gated built-in renderers by tool provenance
- Routed session tool provenance through live and rebuilt transcript render paths.
- Kept same-named extension tools on the generic renderer while preserving native tool rendering.
- Added regression coverage for an external recall result collision.

Fixes #7770
2026-08-06 01:36:25 +00:00
can1357 1e3419ebac Merge PR #7688: fix(tui): detach plan approval dispatch from serialized event chain (@roboomp) 2026-08-05 22:16:28 +02:00
Mantas Vidutis ebdda043b8 Merge upstream/main into fix/deferred-command-output-feedback 2026-08-05 11:43:17 -07:00
roboomp a785811a64 fix(tui): detach plan approval dispatch from serialized event chain
After the fullscreen Plan Review closed on approve-and-execute, the
conversation view stayed blank while the plan ran. The propose write's
tool_execution_end handler runs inside EventController's serialized
dispatch chain and awaited handlePlanApproval, which awaits session.prompt
for the entire execution turn, so every later agent_start/message_start/
tool/message_update event queued behind it until the run finished.

Detach the approval dispatch so the dispatch link settles immediately and
the execution turn's events render live. Follow-up to #5688, which only
moved the overlay close before the still-blocking dispatch.

Fixes #7684
2026-08-05 09:18:12 +00:00
Mantas Vidutis ced87b907b fix(tui): flush queued command panels at a non-terminal settle
Reaching the `isTerminal === false` branch means the superseded-turn guard
above it already passed, so `session.isStreaming` is false: a command
issued from that point mounts immediately while panels queued earlier in
the turn stay in `#pendingCommandOutput` until some later terminal
agent_end. Newer output rendered ahead of older, and the queued panel
could strand for minutes on an async fan-out that keeps settling
non-terminally.

Flush there too. The transcript is quiescent at a settle, which is the
condition #4806 wanted, and the notice now says "until the agent pauses"
rather than promising the current turn.
2026-08-04 11:47:54 -07:00
roboomp fe6e9c28ab test(coding-agent): stub setTextOutputCommitted in print mocks
Added the no-op setter to lightweight print-mode session mocks so text-mode runs without a submitted prompt no longer throw at the final commit call.

Fixes #7625
2026-08-04 13:57:04 +00:00
can1357 bc39ffa265 feat: introduced omptype validation package and migrated workspace dependencies
- Introduce `@oh-my-pi/omptype` as a new ArkType-compatible schema validation package featuring a lazy JIT runtime, JSON Schema emission, and compatibility adapters.
- Replace `arktype` across workspace packages and test utilities with `@oh-my-pi/omptype`.
- Add benchmark suites, tests, and documentation for the new validation engine and adapters.
- Update workspace build, test runner, and release configurations to include the new package.
2026-08-03 21:56:48 +02:00