Commit Graph

535 Commits

Author SHA1 Message Date
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
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
roboomp a54a2f79cb fix(tui): preserved b before /btw completion
Reserve the plain b shortcut only after /btw has a completed answer or a branch is already pending. Running, empty, aborted, and failed panels now leave the key for the composer, while completed-but-refused branches still consume it with an explanation.

Fixes #7474
2026-08-03 09:33:07 +00:00
roboomp 98f484bd2f fix(session): validated session identity for /btw branch
Branched session files preserve entry ids, so leaf-id equality alone let a stale /btw answer promote into a different loaded session. Capture the originating session id at /btw start and require it to match at both the controller gate and every branchFromBtw checkpoint.

Fixes #7474
2026-08-03 09:22:32 +00:00
roboomp 7a1183da91 fix(session): prevented stale /btw branch promotion
- Passed the authorized leaf through the branch executor and revalidated it before rewriting history.
- Refused promotion during active turns and bounded post-prompt drains.
- Consumed unavailable branch keys while showing pending and refusal state in the panel.

Fixes #7474
2026-08-03 09:07:12 +00:00
can1357 5ad263f0a6 fix(tui): hid stripped-tool-call placeholder with tool activity
- The 'N tool calls elided' replay placeholder leaked tool activity while
  display.hideToolActivity was on; it is now a visibility-aware component
  wired into both the hotkey and /settings toggle paths.
- Added replay + live-reveal regression coverage.
2026-08-03 05:42:07 +02:00
Daniel Anderson-Little 4471a3f26d fix(tui): purge hidden tool images 2026-08-02 23:21:17 -04:00
Daniel Anderson-Little a20690a40b feat(tui): add hidden tool activity mode 2026-08-02 22:59:48 -04:00
can1357 83e23a58e6 Merge PR #7387: fix(tui): keep working title across non-terminal agent_end (@roboomp) 2026-08-02 20:53:22 +02:00
can1357 abebe8c2a8 Merge PR #7333: fix(tui): compact linear branch continuations (@roboomp) 2026-08-02 20:52:07 +02:00
can1357 a872d77068 chore: cleanup dumb tests 2026-08-02 20:39:23 +02:00
roboomp 84135e9fed fix(tui): flush deferred model switch on non-terminal settle
The isTerminal:false early-return skipped #finishAgentEnd, the only site
that flushes a deferred plan-mode model switch, so an automatic continuation
(async wake) ran on the old model/thinking level until the terminal settle.
Flush the pending switch on the non-terminal branch before returning; the
title/loader teardown stays deferred to the terminal agent_end.
2026-08-02 12:24:01 +00:00
roboomp 4e4c5564c9 fix(tui): keep working title across non-terminal agent_end
EventController.#handleAgentEnd guarded only on session.isStreaming, so a
non-terminal agent_end (isTerminal:false, emitted while an async job will
re-wake the loop) flipped the terminal title to idle and tore down the
working loader while a /vibe worker or async bash job was still running.

Early-return on event.isTerminal === false, matching the guard every other
agent_end consumer already applies; the later terminal agent_end performs
the normal teardown.

Fixes #7386
2026-08-02 12:18:08 +00:00
roboomp ca5504cae0 fix(tui): kept virtual-root children nested
- Advanced indentation for a virtual root's direct children so single-child roots no longer collapse to the shared column-0 root.

- Mirrored the fix in the HTML export renderer and added a multi-root regression.

Fixes #7332
2026-08-02 00:34:42 +00:00
roboomp f8b71b4a3c fix(tui): compacted linear branch continuations
- Kept single-child chains aligned with their branch head while preserving real branch depth.

- Removed disconnected terminal-branch anchors from TUI and HTML tree renderers.

- Updated nested tree regressions for compact connector alignment.

Fixes #7332
2026-08-02 00:27:41 +00:00
Kenneth Hoff 7d0b8cf8dc fix(memory): clarify /memory stats and /memory diagnose message when memory is off
/memory stats and /memory diagnose fall back to a generic
'Memory <action> is not available for the <backend.id> backend.'
message whenever the active backend's stats/diagnose hook is
undefined. For every real backend (hindsight, mnemopi, local) this
reads fine, but the off backend isn't a backend a user picked among
several stats-capable options - it's the no-op state memory falls
back to by default - so the same template renders as 'Memory stats
is not available for the off backend.', which reads as an odd,
almost self-contradictory warning.

Special-case backend.id === "off" with wording that matches the
phrasing offBackend.status() already uses elsewhere ('Memory backend
is off.'), and add a unit test covering both the off-backend wording
and the unchanged generic fallback for a real backend (local) that
simply has no stats hook.

The regression test only asserts on a mocked showWarning call and
never renders Markdown, so it doesn't need a real theme instance;
drop the global dark-theme setup/teardown to avoid leaving the
process-wide theme singleton mutated for later suites in the same
Bun process.
2026-08-01 11:58:50 +02:00
roboomp 8a059e3027 fix(coding-agent): normalize ask dialog questions to prevent render crash
The live AskDialog trusted question.question while its render helpers
(replaceTabs, renderQuestionTitle, questionTabLabel) assume a string. A
question reaching AskDialogComponent without a string question field threw
an uncaught TypeError that escaped the TUI render loop and killed the
session. The transcript renderer already normalizes the same malformed
data via normalizeRenderQuestions; the live path did not.

Normalize the questions array at dialog entry (new normalizeDialogQuestions),
coercing question/id/label to strings and options to a well-formed array,
matching the transcript path.

Fixes #7211
2026-08-01 00:11:21 +00:00
can1357 21b1d4d4d2 Merge PR #7165: fix(tui): format selector keybinding hints (@roboomp) 2026-07-31 19:07:16 +02:00
roboomp a60f1efa96 fix(tui): formatted selector keybinding hints
Routed copy selector and ask dialog hints through the shared human-readable key formatter and covered both rendered surfaces.

Fixes #7164
2026-07-31 10:06:46 +00: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
Kyle McCleary 4337797565 Merge remote-tracking branch 'origin/main' into feat/security-native
# Conflicts:
#	packages/coding-agent/src/tools/index.ts
2026-07-29 23:26:22 -07:00
can1357 38ebd30337 chore: update stale tests 2026-07-30 07:49:43 +02:00
Kyle McCleary dba303e2e0 Merge remote-tracking branch 'origin/main' into feat/security-native 2026-07-29 20:31:08 -07:00
Kyle McCleary d90e54fb09 fix(coding-agent): harden native security workflow 2026-07-29 20:05:57 -07:00
can1357 fcc8cce9d9 Merge remote-tracking branch 'refs/remotes/pr/6858' into prep/6858
# Conflicts:
#	packages/coding-agent/src/modes/components/status-line/component.ts
2026-07-30 01:41:54 +02:00
can1357 1d41b269f7 Merge PR #6997: perf(coding-agent): keep reftable branch resolution off the render path (@metaphorics) 2026-07-29 23:08:59 +02:00
robomp-bot 65707c7f4c fix(coding-agent): close VCS cache lifecycle gaps
(cherry picked from commit b88851334b07eb1da6743b51b542ea5d3222ccca)
2026-07-29 23:08:58 +02:00
can1357 4bad9b481d Merge PR #6973: fix(coding-agent): share parent local:// root with /tan clone (@roboomp) 2026-07-29 23:08:44 +02:00
roboomp bbf3d78c7e fix(coding-agent): keyed tan local root on session-manager id
Snapshot this.ctx.sessionManager.getSessionId() for the tan clone's local://
mapping instead of session.sessionId. The two diverge after /fresh or a
provider session override, and the Windows short-root fallback keys
%TEMP%/omp-local/<id> off the session-manager id used by the parent's
large-paste writes and '/data/workspaces/can1357__oh-my-pi__6971/.omp-session/2026-07-29T06-08-45-283Z_019fac7d-5ee3-7000-a7aa-16fe9394fdc9/local' reads, so the mismatched id left attachments
unreachable.

Diverge the mocked session id from the manager id in the regression test so
it pins the session-manager id.

Fixes #6971

(cherry picked from commit 1efcd22326d76fdb8b50c0977a836c892e80ab76)
2026-07-29 23:08:44 +02:00
roboomp fb4393ae16 fix(coding-agent): snapshotted tan parent local root
Capture the parent artifacts directory and session ID when /tan dispatches
instead of resolving them through the mutable interactive SessionManager.
This keeps background tan '/data/workspaces/can1357__oh-my-pi__6971/.omp-session/2026-07-29T06-08-45-283Z_019fac7d-5ee3-7000-a7aa-16fe9394fdc9/local' reads pinned to the dispatching transcript
after the user switches or resumes another session.

Extend the regression test to switch the mocked interactive session before
the background job starts and assert the original local mapping is retained.

Fixes #6971

(cherry picked from commit e05db428eabd5087e4b2b4a462f47927c0628e72)
2026-07-29 23:08:43 +02:00
roboomp d933cfbe05 fix(coding-agent): shared parent local root with tan clone
TanCommandController.start nests the tan clone at
<parent-artifacts>/Tan-<id>.jsonl, so the clone's session manager derived
its own artifacts dir and hence local root <parent-artifacts>/Tan-<id>/local.
Its sdk.createAgentSession call omitted localProtocolOptions, unlike the
task-subagent path which inherits the parent's mapping, so parent-session
'/data/workspaces/can1357__oh-my-pi__6971/.omp-session/2026-07-29T06-08-45-283Z_019fac7d-5ee3-7000-a7aa-16fe9394fdc9/local' attachments (pasted files, generated references) were unreadable.

Thread the parent session manager's localProtocolOptions into the tan clone
so local:// resolves against <parent-artifacts>/local.

Fixes #6971

(cherry picked from commit 1ded46e182fc24f9f57d8e9a907aaad58f790783)
2026-07-29 23:08:43 +02:00
joshrzemien daf1557b3d fix(tui): seal mixed read groups before usage
(cherry picked from commit 576b950b80583d8fd028edd08967b537f4eb18f0)
2026-07-29 23:08:42 +02:00
joshrzemien 57cb290fef fix(tui): preserve grouped read request order
(cherry picked from commit eb6767e3248ad0fe3ea371e5226a4af6e0b8f97b)
2026-07-29 23:08:42 +02:00
joshrzemien a3e90b3d95 fix(tui): nest usage metrics in read groups
(cherry picked from commit 101268adc632e80bb3f8304b95497ac7bd884131)
2026-07-29 23:08:41 +02:00
joshrzemien 7a9f8da3f8 Fix Codex fireworks workspace account matching 2026-07-28 23:31:52 -04:00