Commit Graph
20612 Commits
Author SHA1 Message Date
Brennan Benson 9df4559e37 Keep valid automation history when repairing a damaged profile (#37336)
* Allow profile repair to replace damaged automation history metadata

* Keep verified automation history when repairing its placeholder

* Test structural profile open and repair output for kept automation history

Schema verification no longer reads automation history metadata, so the
read-concurrency tests now assert that open succeeds without reading it and
that ordinary reads still keep snapshots consistent and refuse corrupt
metadata. Add output coverage for the recovery-required message, the
startup failure text (English and a translation) and the bundled CLI
recovery route printing kept and backup-restored sections.
2026-11-02 10:26:24 -08:00
Brennan Benson 59fc7ae165 Refresh Checks after failed review actions (#37156)
* fix(review): reconcile hosted reviews after failed writes

* fix(review): reconcile PR page, phone and Checks after failed writes

- PR page: merge, auto-merge, close/reopen and reviewer changes reread details after every attempted write, and the page's displayed state follows a freshly read details state so buttons reflect what landed.
- Phone: the PR actions engine and title save reread once per attempted write after busy clears; a failed reread never replaces the write's outcome or turns a successful write into an error.
- Checks: a failed merge's error stays visible when the reread shows the review merged; a GitLab reread that settles after the panel switched reviews no longer commits details for the other context.

* fix(review): reconcile GitHub and GitLab item dialogs after failed writes

- GitHub item dialog: merge, auto-merge, close/reopen and reviewer changes reread details after every attempted write, after pending clears and after the close/reopen revert. Success toasts and patches stay success-only.
- GitLab MR dialog: merge, close, reopen, details save and reviewer changes run the dialog's existing refresh after every attempted write. The write's error toast and the user's drafts stay.

* fix(review): keep shown review data and ownership across write rereads

- Phone: a write's follow-up read that fails keeps the PR already shown and the write's own error instead of replacing the panel with a load error. Manual Recheck, Retry and HEAD refreshes still show a failed read.
- Phone: a load started for an earlier branch can no longer claim the current one, and a title write that settles after the view moved to another PR stays silent and skips its reread.
- Phone: an older title Save that finishes late no longer closes a newer edit or hides its failure.
- Checks: the GitLab details read after a write lands only on the review the panel currently shows; an old or fallback MR can no longer take over a replacement MR's checks and comments.

* fix(review): keep loaded item details on screen through rereads

- GitHub item dialog and PR page: when a write's reread (or any other invalidation) drops the cached details, the same item keeps showing its last loaded details while exactly one fresh read runs and if it fails, so the comment composer and its unsent draft stay mounted. A cold first load, a retry with no data and switching items still show loading and errors.
- GitLab MR dialog: the state badge and Merge/Close/Reopen follow the item's freshly read details, falling back to the list row; the Reviewers section stays visible while a reread runs; the load-error banner shows only when there is nothing loaded; switching items drops the previous MR's details before paint.

* fix(review): keep loaded details at their cache and scope GitLab details to the full target

- GitHub item dialog and PR page: invalidation keeps the loaded details in the cache entry, retires its pending read and owes exactly one fresh read, so Viewed, description, reviewer and checks updates keep landing on what is shown, even while that read runs or after it fails. A failed read, an empty result or an optimistic comment does not start another read. Removes the separate retained-details hook.
- GitLab MR dialog: details, reviewer/label options and drafts belong to the full target (task source, GitLab project, item and repo); switching source or instance with the same item id drops the previous target's reviewers and state, and a late result for the old target is ignored.

* fix(review): keep owed and running detail rereads through local field updates

Each GitHub details cache (item dialog and PR page) gets one payload-only patch operation that copies the entry's read ownership (an owed reread and the running read) by construction. Viewed, description, reviewer, checks and the optimistic comment all go through it; read start, settlement and invalidation stay separate. A comment that lands with a write's invalidation no longer cancels the owed reread, and a comment during a running reread no longer lets an unrelated invalidation discard that read. A comment alone still starts no read.

* fix(mobile): reread the PR after every attempted write on main's PR tab

Rebuilds this PR's mobile behavior on main's restructured PR tab:
- Engine and title/description edits reread after every attempted
  write once busy/saving clears; the write's outcome is the only
  feedback and a failed reread is contained.
- The controller gives writes a dedicated reread entry that a poll
  can't skip, keeps the shown PR when the read fails, and retires a
  details read started before the write.
- A reread whose checks read failed still shows the PR's new state
  (merged/closed), keeping prior checks only for the same review.
- Details carry, dedup and completion key on repo + number, so the
  same PR number in another repo doesn't inherit details.
- An older Save can't close a newer edit; a write that settles after
  the view moved to another PR shows no error and rereads nothing.

* test: repair CI for the reread tests

- Use a fixed fetchedAt for the unrelated cache entry in the details
  hook tests instead of reading the wall clock.
- Mock platform haptics in the mobile controller probe and text action
  tests so they don't load react-native, and give the act callbacks
  that awaited a load result a Promise<void> body.

* fix(mobile): publish PR details against the latest queued state

Phase-two details spread the last rendered PR data, so when they settled
before phase one rendered (a fast read, or a closed client failing at
once) they restored the PR state the reread had just replaced: a Close
or Merge the host applied still showed open. Details now patch only
their field through a functional update whose identity, sequence and
same-review checks run against the state React applies them to.

* fix: type the reread test fixtures and commit identity refs after render

- Replace type assertions in this PR's tests with typed fixtures; the
  GitLab primary-actions test keeps one partial dialog-state cast with a
  SAFETY note, as neighbouring hook tests do.
- Assign the mobile controller and text-action identity refs and the
  GitLab dialog owner ref in a layout effect, so a render React discards
  can't leave an identity that never committed for a late result to
  check against.

* fix(github): route the saved-body patch through the details payload helper

Main's issue-body rule (a saved description supersedes a read already
running) now goes through the one field-patch helper, which keeps an
owed reread and copies the running read for every other patch.

* fix(github): replace a read retired by a saved issue description

A saved issue description drops the details read already running so it
can't restore the older body. When that read was an ordinary one (such
as the reread after a write), the dialog now owes one replacement read,
so the new conversation still arrives with the saved body. A Refresh
read keeps relying on its own loop, which already retries a superseded
attempt. Starting the replacement consumes the obligation, and a failed
replacement owes no retry.

* test: fix typecheck errors in the dialog and checks-panel reread tests

* fix(gitlab): keep a late write on the previous MR from touching the next one

A save, reviewer change, close/reopen/merge or comment that settled after
the dialog moved to another MR still reread and cleared busy state for
whatever was shown, restarting the new MR's first read and discarding its
answer. Those finalizers now reread and clear busy only while their own
MR is still shown, as pipeline retry already did, and switching MRs
resets the save, action and comment busy flags so the next MR is never
left busy.

* test(gitlab): give the pipeline tab test a details owner after the main merge
2026-11-02 10:25:38 -08:00
Brennan Benson 0747751590 Chat tabs get the terminal's right-click actions (#37442)
* Add standalone chat right-click session actions

* Update fork draft fixtures for source focus callbacks

* Read chat menu data only while the menu is open

Quick Commands and the provider Copy Session ID now read their data from
components that mount only inside the open chat menu, so closed menus in
retained chats do no work on repo, project or agent-status writes. The
add-command editor reuses the terminal's editor dialog and outlives the menu.

Chat menus also stop showing the Insert hint, since they run every quick
command in a new tab the way the tab bar's Quick Commands menu does.
2026-11-02 10:22:29 -08:00
Brennan Benson 7518c94fbd Record a Claude terminal's process even when Orca saw Claude before its first hook (#36825)
* fix(agent-status): let Claude's own hook record its process when the pane's owner has none

An owner recorded without a process (Claude's trust prompt seen before any hook, or a hook that couldn't capture one) refused every later process the agent's own hooks proved, so live Claude terminals stayed unproven and the next Claude in the pane inherited the same owner. The agent's first non-exit hook that proves a process in the same session (or when the owner names none) now claims it; nested agents run another session and stay refused.

Tracked in STA-13222.

* fix(agent-status): a terminal observation doesn't name the pane owner's session

The trust prompt's row carries the pane's previous session (a forked resume's source, an earlier Claude), so the owner it recorded didn't match the session Claude then reported and its process was still refused.

Tracked in STA-13222.

* feat(agent-status): classify a hook's process against its pane from one process table

A hook process is the pane's root when no agent runs above it inside its
terminal session and it holds the foreground (or the foreground has no
agent); an agent above it makes it nested, a foreground agent makes a
background job competing, and anything missing or unreadable is unknown.
The reader validates PID and start identity with the existing probe before
reading the shared budgeted process table, and coalesces concurrent reads.

* fix(agent-status): only an agent's own evidence names a pane's owner; its root process acquires an unproven pane

Terminal, title and process-name reports and Orca's own restatements
(inferred settles, timer and poll republishes) now publish status but keep
the recorded association as it is, suspended and retired ones included, and
never create one. A genuine hook from an agent without process capture still
names its own session. An admitted exit is now an explicit result, so a
retired record carried on the next agent's terminal report never re-clears
it or refreshes the exit.

When a Claude hook carrying its process reaches a pane whose row has no
proven live owner (a trust prompt seen first, a launch seed's source session,
a hook owner that never sent its process, another agent's leftover record or
a retired one), the execution host classifies the sender before provider
folds run, in the shared hook preflight on both the desktop and the relay
(HTTP and spool). A root acquires agent, process and session together;
nested and competing background processes are refused; unknown evidence is
applied as a hook without a process and retried on the next hook. A late hook
from the retired process is refused before folds. Hooks matching a proven
owner never read the process table, and proven-owner rules are unchanged.

* test(agent-status): pin root acquisition gates, unreadable evidence and retired-process folds

Covers a mid-turn record left by another agent (the identity gate must not
refuse the proven root), an unreadable acquisition over a trust prompt (no
guessed process), and a late hook from the retired process being refused
before provider folds.

* test(agent-status): drop the terminal-first presence test the root acquisition contract now covers

* fix(agent-status): answer a hook's root read within the hook's own timeout

A busy Linux process table can take over a second; the hook's curl gives up
at 1.5s and spools its event. Each hook now waits at most 500ms, reads as
unknown past that, and the next hook joins the still-running read.

* fix(agent-status): prove a hook's process belongs to its pane's own job

The first rebuild judged a hook's process against the sender's own terminal, so a shell
wrapper named claude read as a nested agent (every hook refused), a Claude in another
terminal that inherited the pane key could take a Codex pane, a real nested `claude -p`
(run by Claude's Bash tool in a new session with no terminal) read as unknown, and a slow
whole-host process table made every blocking hook wait without ever healing.

Acquisition now needs proof that the process runs in the pane's own job on the host that
owns the pane: the pane's root comes from its PTY provider's inventory, the sender's
ancestry is walked across detached tool sessions up to that root, shell scripts and npx
layers count as launchers, the pane's terminal and foreground job decide root versus a
competing background or foreign terminal, and tmux panes are tied through the outer pane's
foreground client. Reads are targeted (the sender's lineage and the pane's terminal), one
500 ms answer deadline is shared per attempt, late results are kept, unproven evidence is
retried once per turn, and exits get fresh proof. The pane root's own exit retires the
same agent's unproven record once. Desktop, serve and orcad wire the resolver; the WSL
relay asks the desktop for the pane's guest root and keeps the legacy path when the desktop
or the pane's PTY predates it; a relayed process is pane-root proof only from a relay that
asked this session.

* feat(agent-status): name a WSL pane's guest root from the PTY that owns it

A WSL pane's PTY belongs to Windows, so the guest-side hook relay had no way to know which
guest shell is the pane's root: the Windows PID of wsl.exe means nothing inside the distro,
and an inherited pane key proves nothing.

The WSL bootstrap now prints a one-shot marker with its guest PID and Linux start identity
before it execs the login shell (same PID, every shell, never waiting on anything). The PTY
owner, the daemon session or the in-process provider, watches only the launch output for it
and keeps it as volatile metadata of that PTY incarnation in its inventory. The desktop
answers the relay's pane-root request from that inventory for the relay's own distro, and
marks that link as one whose relay proves pane roots. A PTY started before its owner
recorded roots answers legacy, so the relay keeps its existing path.

* test(agent-status): keep a Claude run under Hermes out of its scoped binding, then let the pane's Claude own it

* test(agent-status): mark the slow-host reader's fake-timer delay as no real wait

CI's flaky-test ratchet flagged the simulated read delay in the owner-presence deadline tests, which fake timers drive; the ignore names that, so the 800/2,000 ms contracts stay as they are.

* fix(agent-status): a pane's first unproven hook keeps main's process; only proof replaces it

Round 3 found four places where pane-root acquisition trusted something that is not proof:
- A WSL relay that merely asked for a pane root was trusted for every pane on its link, so after a relay restart a nested `claude -p` could take a pane on a legacy answer and its exit cleared the parent's row. The desktop now issues a binding only for a returned guest root, per pane and link generation, and accepts a relayed owner as proved only when it echoes that binding for the pane's current PTY.
- An untraceable launch (a spawning shim, screen, an unreadable ps, a missed answer deadline) into an empty pane recorded no process, so its exit no longer ended the row. As on main, that first hook now records its process, tagged as a fallback that a later proved root replaces (saved, so it survives a restart). A Claude in a tmux session the pane can't be shown to display gets its status, session and Done without a process.
- A slow host's late answer was dropped after 10 s and each turn waited again. The answer is kept, each process waits at most once, and a late answer now heals the pane, upgrades or withdraws a fallback, or retires the row on an exit that missed its answer, with no later hook and no replayed prompt.
- A suspended owner let any other process take the pane. Only the pane's own foreground job replaces it now; a nested or unverifiable sender is refused before it changes the prompt.

A hook that challenges the owner no longer erases the owner's proved exit unless it is admitted as the successor, and a pane inventory snapshot taken before a PTY spawned is re-read once instead of answering for it.

* perf(agent-status): cap a host's pane-root reads at four at a time

Each pane's first hook started its own ps reads, so a burst of panes (a restore, many agents starting together) spawned one process-table read per pane at once; on a loaded Linux or Mac host past ~70 panes that alone outran the hook's 500 ms answer. Every subprocess or /proc read the acquisition makes (the sender probe, per-PID and per-terminal ps, Linux start identity, tmux list-clients/display-message) now takes one of four shared slots, released on success, failure or abort, and an attempt past its work budget gives up its queued reads.

* perf(agent-status): share one pane-root request among a WSL pane's concurrent hooks

Hooks of one pane arriving together each asked the desktop for the pane's root; they now share the request in flight.

* fix(agent-status): read no tmux from agent-teams' synthetic TMUX; refuse a pane only shown elsewhere

Orca's agent-teams launch gives its Claudes a synthetic TMUX that names no tmux server, so their hooks sent a tmux hint and an untraceable first hook into an empty pane showed status without recording the process main records. One shared constant now names that synthetic socket for the launcher and the hint parser, which reads no hint from it.

A tmux session attached only in another app's terminal read like a detached one (status only). When no client runs in the pane and every client showing the hinted pane has a fully read lineage outside it, the hook is now refused as foreign; anything unverifiable stays status-only.

* fix(agent-status): a late root heals what its next hook would; a stopped fallback resumes as itself

A late answer only reached the pane if the row still had the association the read started against, so the status-only record a hinted first hook minted into an empty pane while its read was pending kept the root out until the next hook. A late root now acquires over any record a root outranks on the hook path (none, an unproven one, a fallback); a stopped or retired owner must still be the one the read started against, and an owed exit retires only the record that exit saw. The hand-off to the host follows whether a hook actually went on without the answer, not a second reading of the clock, since a hook's timer can fire before it.

A Ctrl-Z'd fallback owner's own hooks after fg were refused as a would-be replacement. Suspension now blocks only another process; the owner's own hook resumes it with its process, session and fallback tag, and a late upgrade of its own fallback keeps it suspended.

* test(agent-status): read a tmux pane shown only in another terminal through the real bridge reader

* fix(agent-status): point the moved local-PTY modules at the shared WSL root marker

main moved the local-PTY modules into src/main/providers/local-pty/; the merge carried this PR's two imports of the WSL guest root marker into them at the old depth, which broke the build.

* test(agent-status): type the pane-root reader test's process mocks

* test(agent-status): type the reader test's platform without an assertion

* perf(agent-status): give a spool drain one acquisition answer deadline

Startup replay ran each unproven pane's acquisition in series, so every pane
added up to 500 ms before the listener bound or live hooks were answered. The
drain now owns one deadline on desktop, serve and the WSL relay; every record's
attempt, joins included, is capped by it and hands a later answer to the host.

* fix(orcad): install the pane-root reader before startup replay

orcad started its hook server, and so replayed the spool, before installing
the pane-root reader; replayed hooks took the legacy path and recorded their
processes as proven owners. The reader is now in place before the server
starts, so replay reads the same evidence as live hooks.

* fix(agent-status): record a WSL guest root printed before its session subscribed

Output a PTY prints before its session subscribes is replayed while the
session is constructed. If that output held the guest-root marker, the
callback read the session before it existed and the WSL session failed to
start. The root is now held until construction finishes, then recorded.
2026-11-02 10:20:49 -08:00
Brennan Benson 21857c7424 Continue in Chat UI refuses before closing the terminal when another terminal runs the conversation (#37397)
* fix(native-chat): let createSupport ask whether another terminal runs a resumed conversation

A resume's createSupport can now carry resumeFrom (behind
agent-session.structured.resume-writer-admission.v1, since older hosts'
strict params reject it). The host runs the same writer check create runs,
leaving out the panes the client will close first (matched by key or by
the PTY they resolve to; a shared tmux/OpenCode server is never left out),
and probes the candidates together so a bounded client wait is not spent
on one probe after another. The host's English refusal says "another chat"
only when it names one. The resume params move to their own module to keep
the params file under its line limit.

Tracked in STA-13440.

* fix(native-chat): refuse a resume before anything closes or opens when another terminal runs it

Continue in Chat UI asks the host before closing the terminal, naming the
panes the close takes; when another terminal runs the conversation it says
so in one toast and leaves the terminal open with no chat. Session History's
Resume in New Chat (and any other resume launch) asks through the launch
admission and, on that refusal, opens no placeholder tab: its caller's one
toast is the only notice. A local admission that times out still never
leads to a close. Older hosts without the capability keep today's flow.
The launch admission's toasts move to their own module to keep that file
under its line limit.

Tracked in STA-13440.

* fix(native-chat): say why a resumed chat failed when a terminal holds it or its history is missing

A failed start refused because a terminal's agent still runs the
conversation (no chat named as holder) now reads the existing "already
running this conversation in another terminal" words instead of a bare
"Chat could not be started.". A transcript the host could not find yet gets
the same history words an unreadable one already had. This covers the
create-time backstop: a terminal started between the pre-check and create,
or an older host without the pre-check.

Tracked in STA-13440.

* fix(native-chat): keep exporting ResumeSource from the session params module

* fix(native-chat): keep a terminal open when its host's resume check could not be confirmed

A failed capability read was taken as an older host, so the resume question
was left out, the host admitted, and the terminal closed before create refused
the conversation another terminal runs. An unread capability now leaves the
resume unanswered; a host that reports an older capability list keeps its path.

* fix(native-chat): say "another terminal" only where the refusal's owner is still known

The write failure drops the refusal's owner, so a chat-owned conflict on a
send, mutation or phone notice read as a terminal. Only the failed start,
which keeps the raw refusal, now records that no chat was named; everywhere
else keeps the generic wording.

* perf(native-chat): resolve panes in the writer check only when some are left out

Every create, resume and acquire check resolved each matching row's pane to
its PTY, even with no panes to leave out, and each unresolved key scanned
every terminal. With nothing to leave out no pane is resolved now; with some,
one identity read context serves every key.

* test(native-chat): pin createSupport's resume refusal to create's, and History's one notice

Runs the real createSupport handler on a runtime whose status store proves
another terminal live: leaving out the source pane admits, otherwise it refuses
with create's code and details. The Session History replacement keeps its chat
and toasts once when the host refuses before anything opens.

* fix(native-chat): translate the "another terminal runs this conversation" toast

It is now the only notice when Continue in Chat is refused before the terminal
closes, and only English carried it, so every other language showed English.

* fix(native-chat): withhold an unread resume capability only where a terminal closes next

Reading an unknown capability as unreachable refused Session History and
/resume launches on a paired host that main admits and create completes. The
host question now asks the plain question on an unread capability and says so
on its answer; only Continue in Chat, which closes the terminal next, treats
that answer as not admitted, from the same read that chose the request.

* test(native-chat): count the writer check's terminal reads with a typed map

The perf contract counted iteration through a proxy, which the type-aware lint
rejects. It now counts record reads on a Map subclass; a scan of every
terminal per row still shows up as rows times terminals.

* test(native-chat): read the writer-check fixtures without type assertions

The changed-code gate rejects casts. The perf contract builds real terminal
records through the identity fixture, and the createSupport parity test reads
create's refusal through the shared refusal parser.

* fix(native-chat): declare the refusal holder that failed-start cause words read

The failed chat's notice passes its launch failure, with the holder its
refusal named, through the cause parts to the words that tell a chat from a
terminal. Those functions now declare that field instead of carrying it
undeclared, which the typecheck rejected for a literal in the test.

* perf(native-chat): probe a conversation's writers a few at a time and stop at a holder

The writer check started a process probe for every matching row at once and
kept them all running after the first live holder refused. It now picks the
rows in one synchronous pass, probes at most eight at a time through the
shared bounded pool, and starts no probe once a holder refused.

* test(native-chat): pin the writer check's single terminal look on the real runtime

The scale contract built its own resolver, so a host that made an identity
read per pane, or passed none, still passed. It now runs the runtime's own
writer check over recorded terminals and counts read contexts and per-key
terminal scans: one context and no scans with panes to leave out, none
without.
2026-11-02 10:18:36 -08:00
OrcaWin 509461af4f test: remove 332 low-value renderer tests (#37517)
* test: remove 332 low-value renderer tests

* style: format reliability gate metadata

* docs: narrow tab reveal repaint coverage claim

* test: document retained DOM fixture assertion
2026-11-02 09:46:32 -08:00
OrcaWin d616c1b9ea test: remove 275 low-value renderer tests (#37514) 2026-11-02 09:09:11 -08:00
OrcaWin 8547a982b5 test: remove 270 low-value routing and agent launch tests (#37513) 2026-11-02 08:53:39 -08:00
OrcaWin cbb743f07b test: remove 136 low-value preview and workspace action tests (#37504)
* test: remove low-value preview and workspace action tests

* test: remove low-value preview and workspace action tests
2026-11-02 08:34:06 -08:00
OrcaWin c0cc0168d2 test: remove 49 low-value renderer capability and attachment tests (#37499)
* test: remove low-value renderer capability and attachment projection tests

* test: prune real-time wait ratchet after test removal
2026-11-02 08:06:41 -08:00
OrcaWin a4d6f5e4bf test: remove low-value renderer projection and wiring tests (#37496) 2026-11-02 07:37:19 -08:00
OrcaWin 02e93251ec test: remove low-value agent status and renderer helper tests (#37490) 2026-11-02 07:23:39 -08:00
OrcaWin bb3ce94b4f test: remove low-value renderer helper and agent launch tests (#37487) 2026-11-02 07:00:03 -08:00
OrcaWin 2b21c904a8 test: remove low-value renderer hook wiring and metadata suites (#37483) 2026-11-02 06:39:14 -08:00
OrcaWin 8535ac09cf test: remove low-value renderer hook replays and thin adapters (#37479) 2026-11-02 06:13:58 -08:00
OrcaWin 8cd6a7e5ee test: remove low-value renderer policy and inventory tests (#37474) 2026-11-02 05:46:46 -08:00
OrcaWin c9845c5f9c test: remove low-value renderer policy and inventory tests (#37471) 2026-11-02 05:34:42 -08:00
OrcaWin c05ce970eb test: remove low-value renderer and terminal tests (#37465) 2026-11-02 05:11:55 -08:00
OrcaWin c3b7560fb4 test: remove low-value renderer and terminal tests (#37456)
* test: remove low-value renderer and terminal tests

* test: align floating tab geometry with content-fit sizing
2026-11-02 04:50:07 -08:00
Neil 1b15d45a5e refactor: finish direct owner imports and audit cleanup (#37461)
* fix: close module organization audit references

* refactor: import moved bindings from concrete owners
2026-11-02 04:06:56 -08:00
Kelvin Amoaba d967d53fa9 fix(mobile): open each agent row's own tab from the workspace list (#37458)
Top-level agent rows had no press, so a tap opened the workspace's active
tab; and a session the host list opens in-page read the pane only from
the shell route, which never has it.

Fixes #34235
2026-11-02 11:40:45 +00:00
OrcaWinandOrcaWin 8fb8e6ef0f test: remove 30 low-value tests and fix selected-host folder activation (#37421)
* test: remove 25 low-value checks and six complete suites

* Remove deleted startup benchmark from plugin CI routes

* Remove CI route for deleted pet layout smoke suite

* test: repair retained E2E labels and collision lifetimes

* test: remove synthetic activation collision scaffolding

* fix: activate folders opened on the selected runtime

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-02 03:32:08 -08:00
Neil 51cb2f189c refactor: organize native chat input and transcript owners (#37334) 2026-11-02 03:14:58 -08:00
Neil 95d1e9127e fix(wsl-hosts): a stopped distro still lists all its projects after a restart (#37396)
* fix(wsl-hosts): a stopped distro still lists all its projects after a restart

The desktop now keeps each WSL host's last project list (from the repo.list
answers the window already receives) and seeds those rows at startup before any
live host catalog is requested. The first live list replaces them, so projects
deleted on the host disappear on that fetch. Loading the saved list is a desktop
read only: no wsl.exe, no host RPC, no \\wsl.localhost access. The saved list is
cleared when the host is removed.

* fix(wsl-hosts): pin saved project list writes, removal, WSL gate and seed races

- Exempt HostRepoCatalogSnapshotPersistence.environmentId from the id-only
  store write ratchet like the paired-server layout snapshot (the id names the host).
- A live list applied before the startup seed now skips that host's seed, and
  a live answer requested before the seed may still drop seeded rows.
- Tests now count saves, cover remove then re-add, check paired servers in
  storage and in the listing, and cover both seed/live-list orderings.
2026-11-02 03:10:36 -08:00
Neil 6c6e3d93c3 Show a penguin icon for WSL host rows and the stopped-distro notice (#37389)
* WSL hosts: penguin mark for WSL host rows, and on the stopped-distro notice

Sidebar project headers and workspace rows that named a WSL host with a
text badge ("orca-demo (WSL)") now show a small penguin icon instead,
labelled and tooltipped "Runs on WSL: orca-demo (Linux)". The same mark
replaces the host chip in the jump palette. The "<distro> is stopped"
notice leads with the same penguin.

* Wait on the tooltip instead of sleeping in the WSL mark tests

* Redraw the WSL penguin as the classic mascot; focusable tooltip mark; muted token on the stopped notice icon

* Use the classic Linux mascot silhouette for the WSL penguin

* Tolerate unloaded runtime environments in the WSL host mark selector
2026-11-02 03:10:29 -08:00
Neil 499da04f10 fix(wsl-hosts): keep the e2e fake WSL connector out of release builds (#37378)
* fix(wsl-hosts): keep the e2e fake WSL connector out of release builds

The fake WSL host connector was compiled into every build and honored
whenever ORCA_E2E_FAKE_WSL_HOSTS was set. Gate main and preload on
import.meta.env.MODE === 'e2e' (the mode every e2e build already uses),
so other builds fold the branch away and drop the module, and mark its
module-level schemas pure so none of it is retained.

* fix(wsl-hosts): build the e2e fake's zod schemas lazily so release builds drop them

Eager module-level zod chains survived tree-shaking even with a PURE
annotation on the outer call, so the fake's schema construction still
shipped in out/main/index.js.
2026-11-02 03:10:25 -08:00
NeilandClaude ac4a21f3d2 test(e2e): update two WSL specs to the stopped-distro copy and serve-only Settings (#37394)
wsl-host-paired-phone asserted the pre-#36771 'isn't running' copy; it now
asserts the stable remote_runtime_unavailable code and '<distro> is stopped'.

wsl-move-dialog's gate-closed case seeds a saved host, which since #34683 puts
the app in serve-only: the WSL hosts section still lists the host. Assert
instead that Add is hidden and the host row's menu has no move entry.

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 03:10:14 -08:00
Neil 76320e58cf fix(wsl-hosts): remove a freshly installed server that fails its start check (#37388)
* fix(wsl-hosts): remove a freshly installed orcad that fails its start check

A WSL connect that uploaded an orcad build whose candidate then failed its
preflight or readiness check left the complete install in place, so every
later connect reused the same broken bytes. deployOrcad now reports whether
it uploaded the slot and whether the candidate's own start check failed, and
the WSL deploy removes that slot under the same pins, liveness probe and GC
claim the version GC uses (active, rollback target, the serving daemon's
build, journaled transactions), so the next connect re-uploads it.

* fix(wsl-hosts): fence the failed-install removal and keep a slot any process runs from

Review follow-up. The pin check and the delete now run under the
activation fence (a held fence keeps the copy), so a concurrent connect
cannot preflight or launch the slot between them; it waits, finds the
slot gone and re-uploads. Liveness now also scans the process table and
the daemon pid files for anything running from the slot, because a
candidate's stop ends only its server, not a terminal daemon it spawned
there.

* fix(wsl-hosts): match the resolved slot path in the slot process probe

Node realpaths its entry, so a daemon behind a symlinked home or data
root names the resolved slot. The probe now also matches
$(cd slot && pwd -P)/ and answers UNKNOWN (keep) when it cannot resolve.

* test(wsl-hosts): wait for sibling slots to run before proving this slot idle

Replaces a fixed 100 ms sleep (flagged by test-no-real-time-wait) with an
expect.poll until each sibling's own slot probes LIVE, so the DEAD answer
for this slot is meaningful.
2026-11-02 03:10:09 -08:00
OrcaWin 8f2817a4c8 test: remove ten non-gating benchmark cases and obsolete tooling (#37453) 2026-11-02 03:08:09 -08:00
Kelvin Amoabaandagustin2606 47506f3f33 fix(github): link a branch's open PR instead of a newer closed one (#37452)
* fix(github): prefer the open PR when a branch has several

The branch lookup asked GitHub for one PR across all states. GitHub sorts
a branch's PRs newest first, so a closed PR opened after the live one
shadowed it and got linked to the worktree on every checkout.

Fetch a page of the branch's PRs, REST and the `gh pr list` fallback alike,
and take the open one; with none open, keep the newest as before.

* refactor(github): keep branch lookup casts on their own lines

---------

Co-authored-by: agustin2606 <agustinvarela2606@gmail.com>
2026-11-02 10:59:44 +00:00
Kelvin Amoabaandrafael rotiroti a444233103 fix(sidebar): keep folder project roots visible when hiding the default branch (#37444)
* fix(sidebar): keep folder roots visible when hiding default branch

* test(sidebar): trim folder-root hide-default tests to distinct cases

---------

Co-authored-by: rafael rotiroti <rotirotirafa@gmail.com>
2026-11-02 10:47:45 +00:00
OrcaWin 5cca72e605 test: remove 33 low-value tests and obsolete benchmark runner (#37441)
* test: remove 33 low-value tests and obsolete benchmark runner

* test: remove import left unused by test deletion
2026-11-02 02:47:41 -08:00
Brennan Benson 1ce79608a4 Full access Claude chats stop asking for approval (#37246)
* fix(claude): Full access approves Claude's own permission asks in chats

A Claude chat in Full access still showed Allow/Deny cards whenever Claude Code
forwarded an ask it keeps under bypass mode (ask rules, ask-answering hooks,
built-in shell safety checks). Approve those at once while the chat runs with
Full access, read per request; questions and plan approval still go to the user.

* fix(claude): Full access grant comes from the launch; Claude's mode reports restrict it in wire order

Only a process Orca launched with Full access can auto-approve Claude's own
asks; Own settings never does, whatever Claude reports. Claude's init/status
mode reports, read from stdout before the SDK sees them, can suspend and
restore that grant, and each permission request keeps the mode in effect at
its own position in the stream, so a paused journal consumer or a read-ahead
chunk cannot apply a report late or early. Questions, plan approval and
requests Claude flags as needing the person's answer keep their card.

* fix(claude): Full access keeps every request's own wire position and restores after an approved plan

A permission request Orca never saw on stdout no longer inherits a later
mode: each request keeps the first snapshot for its id until the SDK hands
it over, including after a cancel and past any number of unread requests,
and requests resent in initialize's reply are recorded where that reply
arrived. Approving a plan in a Full access chat now reads Claude's mode in
wire order, so the restore is sent even while the chat's presentation still
lags behind the plan report.

* test(claude): narrow contract-pin frames to permission requests with a type guard

* test(claude): count the policy's stdout search work instead of timing it

* test(claude): type the contract-pin frame guard with the fixture frame union

* refactor(claude): let the launch permissions wrap the exit handler, keeping acquisition under its line limit
2026-11-02 02:27:35 -08:00
Kelvin Amoaba 8458e704c4 fix(native-chat): show a terminal's unsent input in the chat composer and replace it on send (#36493)
* fix(native-chat): show a terminal's unsent input in the chat composer and replace it on send

Switching a pane to chat view now seeds the composer with the text left unsent in Claude Code's or Codex's input box, and a chat send clears every line of it instead of one Ctrl+U. The clear is confirmed with the same typed-only read and kept under the 64-byte chunk Claude Code reads as a paste.

* test(native-chat): drop the removed screen-text clear check from the background-rows test

* fix(native-chat): clear a seeded multi-line draft before typing a Codex command from chat

* test(native-chat): expect the typed command's clear argument in composer tests

* fix(native-chat): confirm a seeded draft is cleared before typing a Codex command

* fix(native-chat): find Claude's closing frame past dim suggestion rows

A typed-only read stopped at the suggestion row, so a draft under Claude's hidden caret never reached chat.
2026-11-02 10:22:23 +00:00
OrcaWinandOrcaWin 23c2515586 test: remove 41 low-value test declarations (#37430)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-02 02:12:23 -08:00
Kelvin Amoaba a8ccf3bc68 fix(mobile): paint the chat transcript and tab strip scrollers opaque (#36905)
On a Nothing A065 (Adreno 730) the transparent pixels of these two
scroll layers turn black while a selection handle is dragged. Fill each
with the colour already behind it so the layer has nothing to drop.

Refs #36553
2026-11-02 10:02:47 +00:00
Kelvin Amoaba 016530156c fix(mobile): back from a session lands on its host's session list (#36956)
* fix(mobile): back from a session lands on its host's session list

A session opened from Home's "Jump back in" or a notification replaced the
host list it had just mounted, so Back went to Home. It is now pushed over
that list.

A session opened from the host list lives inside the list's own page, and
the stack holding it has one screen, so the iOS edge swipe belonged to the
parent screen and popped the whole host to Home. While the page claims Back
the parent's swipe is turned off too, and a left-edge pan on the shell view
sends Back to the page.

* fix(mobile): keep the host swipe off until its last page claim ends

Count claims per parent screen instead of guessing whether a shell is its
stack's root, and measure the back edge from the shell's own left edge so
a landscape safe area does not hide it.

* refactor(mobile): share the session route name and write the host swipe once per claim run

* test(mobile): give the catch-all screen mock a parent navigator
2026-11-02 10:01:47 +00:00
Brennan Benson 255401c2a5 Continue chats automatically when a usage limit resets (#36873)
* fix(native-chat): an open chat moves to the account you switch to before its next message

A running chat's agent read its account only when it started, and nothing compared it with the
account a start would use now, so open chats kept answering on the old account after a switch.

The agent a chat runs now records the account its launch used, and the host's replace-before-the-
next-send check replaces an idle one whose account is no longer what a start would use. A chat
mid-reply finishes on the old account first. Claude chats follow; agents whose chats keep the
account they were created on are never compared.

A chat's model-list reads and saves now use the account it runs on, so a moved chat no longer
writes its new account's list under its first account (STA-11281).

Tracked in STA-11211.

* fix(native-chat): declare the launch-account read for the runtime layer that wires the host

* fix(claude): find custom chat history before managed-account resume

* test(claude): assign the complete custom account home

* feat(native-chat): offer account switching and hand-off at usage limits

* fix: track the provider in account-list reload effects

* fix(native-chat): target recovery actions at the chat host and transcript

* fix(native-chat): verify account recovery for each chat on its host

* refactor(native-chat): retain the existing image-support result

* fix(native-chat): withdraw account recovery after failed eligibility reads

* fix(native-chat): leave unavailable recovery facts absent

* Align Japanese usage-limit recovery copy with catalog convention

* Preserve complete chat context through usage-limit recovery

* Keep Continue callback focus optional

* Keep recovery fixtures and account effects type safe

* Keep chat recovery on native sources and native accounts

* Validate native recovery files after path admission

* Use the optional cursor shape in recovery fixture

* fix(native-chat): exclude source CLI family from limit handoff

* Resolve recovery context in the owning workspace directory

* Add the continue-at-usage-limit-reset setting and its chat row lines

* Continue chats automatically after usage limits reset

* Fix automatic continuation fairness, lifecycle and host settings

* fix: bind automatic continuation withdrawal to accepted actions

* fix: withdraw source auto continuation after handoff starts

* Read unopened chats with the saved-record reader for usage-limit continue

Unopened chats were read through the raw-row replay, which no longer sees
chats saved as keyed records, so a usage-limited chat that was not open
was never continued after its reset. Read them the way the rest of the app
reads a chat without opening it. Also use the shared visible-tab check,
keep the ordinary rewind result without a sequence as main does, and adapt
two tests to the current queued-message and saved-status behavior.

* Keep a usage-limited turn idle after any rewind restores it

Rewind completion read the resulting conversation through the raw-row
replay, which no longer sees chats saved as keyed records, and a forked
rewind wrote its completion before the new history's records. So a
limited turn that a rewind brought back was continued automatically
after its reset. The completion now reads the saved result the way the
app reopens a chat, and the forked rewind writes its completion after
the new history in the same transaction.

* Type the usage-limit auto-continue test mock without an assertion

* Fix type errors from main's settings, failure-wording and refusal changes

* Keep ordinary settings replies when the paired host changes mid-call, and list the cancel method in wire contracts

Settings reads and writes that don't carry the automatic-continue choice go
through the common runtime call again, so a reply that completes after the
paired host is removed still merges, as before this change. Only a write of
that choice stays pinned to the host it was made for. The structured method
count and the cross-version method manifest now include the cancel method.

* Keep a stopped turn's automatic continue withdrawn when its usage limit arrives later

A person could Stop a running Codex turn, have the turn then end with a
usage-limit failure, and still get an automatic "Continue where you left
off." after the reset, because Stop had nothing to cancel yet. The journal
write that first reveals a limited turn the latest personal Stop owns now
saves the same exact cancellation in that transaction, and a Stop accepted
just after the limit landed withdraws it too. Resume, deleting a queued card
and restarting keep it withdrawn; manual Continue and later turns are
unaffected.

* Bound the automatic-continue sweep and keep notice rows from re-rendering

The 10-second sweep now does nothing while the setting is off, republishes
only chats with a scheduled continuation, reads at most three unopened chats
per pass, and keeps going when one chat's saved history can't be read (that
chat is retried after the others instead of stopping every chat on the host).
Settings writes republish only when the switch changes. Working out the
usage-limit cut no longer indexes the whole conversation on every streamed
row. The chat's notice rows no longer re-render for status changes they
don't show. Adds operation-count and render-count tests for these bounds.

* Test that streamed journal commits after a Stop scan no history and build no command index

Drives real Codex rows through the host at 20 and 200 history rows: each streamed commit runs the Stop's commit hook and the status projection's cut reader with no newest-turn scan, no render and no full command index; the next turn end scans once and renders nothing.

* Leave a usage limit manual once its reset passed more than a day ago

Turning automatic continue on later no longer sends into chats whose limit reset days ago. Eligibility, which the row's summary, the sweep and the pre-send recheck all read, now requires the reset to be within the last 24 hours; older limits show the usual manual actions and are never continued unasked.

* Show only manual actions for a usage limit Orca can never continue

A limit more than a day past its reset is never continued, but its row still showed the setting link, inviting people to turn on a switch that could not help that chat. One shared check now decides whether a cut can ever be scheduled; the status summary and the sweep's eligibility both use it, so past the bound the row keeps only Continue Now, Hand Off and Add Account. A row already on screen when the day passes drops the line on the shared minute clock; the host alone decides sends.

* List every journal row kind in the Stop cut filter

The type-aware lint requires exhaustive switches; epoch, tombstone, submission and queue rows still cannot reveal a cut.

* Type the status-subscription mock instead of casting its handler

The changed-code casting gate rejects type assertions; the mock now carries the real subscription signature, so the recorded handler is typed.

* Open store-less conversations without the Stop withdrawal hook

Acquisition-only opens have no record store, so a person's Stop followed by a limited turn end made the journal commit throw and drop the turn end. Install the withdrawal only when a store exists; without one there is no continuation to withdraw. Also narrow the status summary before reading it and type the sweep test's send mock.
2026-11-02 01:52:02 -08:00
Brennan Benson c1641a8d7d Show the open Orchestration panel as a floating card (#37412)
* Show the open orchestration panel as a floating card

The open panel now floats in the closed tab's corner as a card as tall as
its rows. In chats it stops above the composer (the transcript frame
already ends there); in terminals it keeps the bottom quarter clear for
the CLI's prompt and recent output. Past that it scrolls inside.

* Keep the orchestration card's collapse button reachable in tiny panes

A terminal split can be 50px high, leaving the card no room under the 75%
limit, so its header and collapse button were clipped away. The card is
now never shorter than its header.

* Keep the orchestration card's collapse button inside narrow cards

In a narrow split the card is 20px narrower than the pane and its title
didn't truncate, so the collapse button was pushed past the card's edge.
The title now truncates and the header's side padding gives way before
the button, down to the 50px pane minimum.
2026-11-02 01:50:54 -08:00
Brennan Benson 10a623b910 Launch an agent with a first prompt from its setup panel (#36659)
* Launch an agent with a first prompt from its setup panel

The agent setup panel in the new-tab menu gets an optional prompt box above
its Launch buttons. It is the chat composer in a compact launch layout: one
line that grows to six, Attach as its only control, / listing the launch
workspace's skills and commands and @ finding its files. Enter launches the
panel's default way, either Launch button sends the prompt its own way, and
with nothing typed both launch exactly as before. The prompt rides the
existing launch prompt field and is kept in memory only until the launch.

* Preserve launch prompt input across submission and refusal

* Retain scoped composer submissions through launch ownership

* Keep launch prompt tests deterministic during collection and persistence checks

* Retire launch source drafts at committed qualified removals

* Retain workspace launch setup through ordinary rich drafts

* Preserve rich draft authority through accepted setup handoffs

* Keep setup prompt moves within current rich draft memory

* Create setup drafts on first input instead of on row render

Rendering an agent row in the launch menu or search no longer creates a
setup record. The row derives its scope from its workspace, host and
agent without touching session state; the record is created by the first
typed prompt, option change or pending attachment, matching main, which
kept only authored setups. Catalog applies, readoptions and renames now
visit authored setups only.

Option listeners use the existing per-scope draft listeners and subscribe
only while the setup popover is open. Also return the runtime-status
files to main, which only carried leftovers from a removed hook.

* Return group-delete draft revocation to main and repair launch tests

Deleting a project group no longer retires in-flight setup submissions
for its folders: folder keys are never derived again, so it changed
nothing users could see. The group mutation, its removal state and the
prompt-delivery type widening go back to main's content, with the test
that exercised the revocation.

Test fixtures catch up with the setup prompt composer: the TabBar window
stubs gain event listeners, the picker inventory's mock store gains agent
status, create-rejection handbacks expect inComposer, and the folder
removal test expects a same-ID survivor's chip to stay, as on main.

* Keep each search preset's setup options in its own slot

Opening a search result's setup no longer writes its preset over the
workspace's setup. As on main, each preset keeps its own options slot,
now inside the workspace/host/agent setup, keyed by what the search
parsed rather than by defaults; the plain row keeps its own slot. Only a
real change saves, into that entry's slot, and creates the setup then.
The typed prompt stays one per workspace, host and agent.

* Fix the moved agent profiles import and merge duplicate imports

Main moved the native chat agent profiles module under shared/native-chat,
so the setup prompt composer imports it from there. Files that imported
one module twice now import it once; nothing else changes.

* Fix the web typecheck for the setup prompt changes

The catalog continuity test no longer imports the main process's SSH
target reassignment, which pulled the whole main graph into the web
program; it builds the reassigned folder inline. Test fixtures and spies
now match current types, the edit-session tests pass a composer ref as
production does, and the setup panel again accepts callers that return
no launch answer. The pending-chip owner filter drops an unused name.
No shipped behavior changes.

* Show the setup prompt's skill and file lists above the setup panel

In the agent setup popover, the / and @ lists opened underneath the
panel, so they could not be seen or clicked. A list opened inside a
popover now takes the menu layer that selects and dropdowns already use
above popovers; an ordinary chat's lists keep their container and layer.

The prompt placeholder is translated in every locale, and folder draft
continuity takes the fetched catalog itself instead of reading its
folder list field.

* Fit the setup prompt box to a placeholder that wraps

With a longer translation, the empty setup prompt's placeholder wrapped
to a second line that the one-line box cut off. The empty launch prompt
now lets its placeholder's wrapped height count, so the box fits it;
English still fits one line, and an ordinary chat's box is unchanged.

* Type the submit test's pending sends as the boolean main now returns

* Show the dictation button in the agent setup prompt

* Update draft test handle for agent references
2026-11-02 01:27:02 -08:00
Neil 2541edc98e feat(settings): import Kitty configs through a shared terminal config import pipeline (#37375)
* feat(settings): import Kitty configs through a shared terminal config import pipeline

* fix(settings): harden Kitty include and value parsing

* fix(settings): match Kitty globs linearly, skip read-only system configs, report non-family font selectors

* refactor(settings): read current settings through a typed map when diffing imports

* style: format Ghostty importer

* fix(settings): type the import hook stub and let dialog primitives own their typography
2026-11-02 01:11:26 -08:00
Neil 36f17a04a7 plugins: Box layout container for components panels (catalog 4) (#37420)
- Box (ui.catalog 4, since 1.4.248): direction, gap/padding/paddingX/
  paddingY/margin on the gap scale, align, justify, wrap, grow, shrink,
  width/height/min/max (px up to 4096 or whole percents), columns,
  scroll, border (true or a tone), radius, background (theme surfaces or
  tone tints). Strict props: hex colours, CSS lengths and unknown props
  are dropped with a warning like other components.
- Renderer maps props to theme tokens through data attributes; sizes
  reach inline style only as validated px or percents.
- Typings, docs, skill references, gallery Layout tab; orca/testing
  finds Boxes and summarizes danger or warning Boxes.
2026-11-02 01:05:57 -08:00
Jinjing 81ec82b365 Rename Chat settings to Chat UI (#36613)
* Rename Chat settings section to Chat UI

* Localize Chat UI settings titles

* Update chat settings search fallback to Chat UI
2026-11-02 01:52:17 -07:00
Neil 3fa4a059d0 feat(settings): import Ghostty themes, including light/dark pairs, as per-mode terminal themes (#37368)
* feat(settings): import Ghostty themes, including light/dark pairs, as per-mode terminal themes

* fix(settings): keep Ghostty theme re-imports stable and explicit colors when a theme half is missing

* fix(settings): reuse identical built-in terminal themes and label Ghostty variants

* fix(settings): keep same-named Ghostty theme files apart, import theme divider colors, follow Ghostty lookup order for picked configs
2026-11-02 00:50:40 -08:00
Brennan Benson 3aa633d389 Mention an agent from the orchestration panel with one click (#34836)
* Add scoped terminal identity acquisition and preserve crew source wakes

* Share raw crew identity inputs through scoped production readers

* Exercise crew generation retirement through actual source owners

* Retire crew inputs on consumed ownership and visibility writes

* Use typed crew mutation and fixture access

* fix: use owned crew styles and committed render counters

* Repair crew fixture and RPC type contracts

* Align crew fixtures with pane and mention contracts

* Count crew consumer render attempts in the fixture

* Localize crew panel labels and details

* Align crew integration fixtures and RPC parameter contracts

* Keep mention contracts within their compiler boundaries

* Encapsulate terminal identity mutations and captured reader contracts

* Seed terminal identity fixtures through canonical mutations

* Complete crew panel English catalog entries

* Fix terminal identity fixture return type

* Cover terminal identity lifecycle schedules

* Align terminal fixtures with canonical identity sources

* Repair runtime fixture source contracts

* Use checked database fixtures for federation contracts

* Update crew source inventories and exit fixtures

* Preserve crew setup outcomes at existing subscription owners

* Match managed restore fixture to its nullable async return type

* Keep absent setup observations distinct from undefined failures

* Drive pending Crew questions from existing metadata

* Preserve nested pairing repair outcomes for shared callers

* Route attached workers to explicit local recipients

* Type Crew pending-question measurement receipts

* Match SSH repair fixture target absence to store contract

* Repair composer fixture and consolidate crew English catalog

* Add finite crew subscription boundary candidates

* Isolate crew portal in terminal file drop fixture

* test: use checked property access for crew owner assertions

* Consolidate web runtime auth type imports

* test: type crew API legacy arguments and pending results

* Bound cold terminal layout construction and finite pane acquisition

* test: use public runtime identity in pane acquisition fixture

* Follow image reference module relocation in mention serializer

* Avoid repeated searches in cold workspace layout loading

* Verify cold loader fault identity and hook claimant effects

* Revert "Route attached workers to explicit local recipients"

This reverts commit f1335d1c06.

Keep attached workers on the existing Run-home routing path for this change.

* Omit crew peer addresses outside the active home route

* Align crew disclosure and availability with shared UI

* Keep crew retries on the verified runtime session

* Bound cold layout retirement and recorded-key construction

* Verify original cold layout failure identity

* fix: preserve surviving layout split references

* test: use typed retirement instrumentation properties

* Keep crew overlay inside narrow panes

* Resume Crew streams on verified runtime sessions

* test: preserve pane and retirement fixture contracts with checked types

* Prepare Crew record admission and wake identity changes

* Derive Crew recipient actions from current target owners

* Keep nested Crew process facts within selected acquisition

* Defer Crew legacy facts to consumers and complete raw coverage on success

* Use deterministic time in Crew command fixtures

* Restore pane-local Crew menu dismissal focus

* Document schema-owned Dispatch row assertions

* test: align Crew authority fixtures with typed project boundaries

* Cover menu agent mentions through production insertion paths

* test: place Crew CLI integration in cross-surface project

* Type retained identity test meters with canonical source maps

* test: adapt mounted Crew fixture to Run unbind contract

* Document suffix Dispatch row boundary and preserve fixture unbinding

* Close crew menus when their terminal pane hides

* Remove unused structured activity component

* test: migrate Crew authority arguments and mailbox observations

* Forward native pane visibility to crew menus

* Keep rich draft offsets aligned with agent references

* Preserve later explicit pane selection after Mention delivery

* test: check the complete overlay focus host fixture

* test: use the DOM containment contract for menu focus

* Fix pointer dismissal enrollment and modal permission

* Remove shared menu primitive patches

* Reuse message avatars in the crew panel

* Focus the captured input when Mention is pressed

* Test the exact Mention all worker selection

* Derive Crew attention and actions from complete recipient authority

* test: repair Crew avatar store fixture and operation accounting

* Keep selected references structural during paste projection

* Fix Crew public-command fixture type contracts

* Align Crew fixtures with runtime reader and routing contracts

* Keep shared message avatar glyphs at their declared size

* fix: preserve existing native mention separators

* Narrow receiving fixture calls to unary RPC methods

* test: load crew Open sender before test execution

* test: consolidate pasted text value imports

* test: supply crew avatar panel mention contract

* Age pending question fixtures from every actual answer timestamp

* test: give mounted mention fixture a portable return type

* Complete Crew public-command workspace fixture result

* Test delegated helper follow-up through Crew advertised address

* Qualify Crew follow-up addresses through shared command admission

* Complete finite follow-up authority and lifetime evidence

* Assert exact remote authority acquisition error identity

* Consolidate Crew SQL test fixture imports

* Trim Crew panel tests to the high-impact set

Keep one mounted test per panel flow, the review-found regressions (avatar glyph size and attribution, stable labels, unavailable sending, hidden-pane menus, navigation remedies), the real producer-to-hook contract, cross-version refusal and recovery, and one N vs 10N contract per scaling piece. Remove permutation matrices, focus-timing proofs, and the duplicated web API and attempt suites.

* Trim Crew Mention tests to the high-impact set

Keep the native and terminal Mention flows, the review-found regressions (send and Goal serialization, label collisions, offsets and handback, Mention-all membership, press-time focus, late write responses, the native double space), the provider delivery contract, and the serializer N vs 10N bound. Remove menu and boundary permutation matrices, panel duplicates, recall and paste cases covered elsewhere, and the retained-group selection fixture. Panel-test cuts mirror the lower PR's so the stack merges cleanly.

* Trim Crew read-model tests to the high-impact set

Keep the real CLI/RPC/database command paths, one regression per review-found bug, the cross-version contracts and one N vs 10N operation contract per scaling piece. Drop permutation matrices, equivalence oracles, near-duplicate scenarios and diagnostic output, and return the SSH, managed-server and WSL test files to main, since their production changes were reverted earlier in this PR.

* Drop diagnostic output and a duplicate error case from Crew tests

Remove two leftover console.log diagnostics, an unused 2x2 sample matrix and unused return fields in the follow-up cost contract, and the subscription AbortError serialization case that the subscription identity and preload tests already cover.

* Pass the recorded-leaf reader in main's check-details loader test

* Build the approved orchestration panel design

Closed tab: panel icon, lineage icon with the worker count, then agents
grouped by status (needs you, working, idle, failed) with the sidebar's
status icon, up to three overlapping agent icons and +n. Rows are one
card with the task, the latest message or question, the relative time
and Details, Open, More. Rows sort by latest message. The open panel
reaches the pane top under the title strip. No user-visible 'crew'
text; counts use plurals. One store subscription resolves every row's
live sender state so the tab and the rows agree.

* Keep pane title buttons above the orchestration panel; tick row times

The open panel now sits just below the pane title strip in stacking
order and starts at the pane top in every host, so the strip's buttons
draw over its top band and no chat or terminal text shows above it. An
open panel lifts its pane's drag strip above it. Row times re-render on
the sidebar's shared 30s clock. Each status group keeps one fixed icon,
and the panel's needs-you count has its own plural.

* Move the orchestration row into its own file

* List every status case in the orchestration icon switches

* Name the orchestration row 'Mention <agent>:' while keeping its status, task and message

* Use the outline xs Button as is for Mention all

* Subscribe the memoized orchestration row to language changes; type the listener count

* Fit the orchestration tab and avatar stack to main's Button and key lint rules

* Ship the orchestration panel's plural counts in the runtime English catalog

* Subscribe the memoized crew row to language changes; read the nullable listener count

* Ship the orchestration panel's plural labels in the boot catalog

* End the chat's orchestration panel above the composer

The panel overlaid the whole chat body, so with it open the composer's
send button sat underneath it. The frame now wraps only the transcript;
the queued drafts, prompt cards and composer stay where main puts them.

* Skip escalations when choosing a crew row's latest message

Orca writes its failure notices (a worker stopped without reporting, a
chat agent error, a terminal exit) as the worker's own escalation, with
terminal, task and dispatch IDs and CLI syntax meant for the coordinator
agent. The panel showed that text as the row's second line. Only the
panel reads this query, so escalations are skipped there and the row
shows the agent's last real message. An agent's own Blocked escalation
is skipped too; it still reaches the coordinator's inbox.

* Point Mention's tests at the modules main moved

Main moved the composer command, send mutation and Claude dispatch
content modules; two of this PR's test files still imported the old
paths and failed to load. Also drop a mock of a module main removed.

* Say why a crew row's agent can't be opened

Opening a row whose agent is gone showed "This agent is no longer
available." Use the existing reasons instead: the chat is no longer on
this host, or the terminal has exited.

* End the panel above the composer in terminal-hosted chats too

A terminal's chat view still mounted the orchestration panel over the
whole chat, so it covered that view's composer and send button. Both
chat hosts now wrap their transcript in the same frame, which takes the
panel's props.

* Show only an agent's own words as a crew row's latest message

Besides failure notices, the latest line could pick up an empty setup
receipt (a blank line that also moved the row) or a lifecycle message
Orca rewrote to "Orca rejected this worker_done: ...". The panel's
query now admits only conversational types with a body and without the
lifecycle rejection marker, before choosing each peer's latest.

* Keep worker launch stages out of crew rows and Details

A row with no message fell back to the worker's internal launch stage
("input accepted", "worker report queued") as its second line, and
Details repeated it as Progress. The row now has no second line until
the agent says something, and Details drops Progress; the status icon
already shows the state.

* Fit both chat hosts under the line limit after the frame merge

Name each host's existing Mention availability once and pass it in the
frame's one-line crew props.

* Mention each agent once per chat draft

Mention all after a row Mention added a second chip for the same agent.
Inserting references now skips agents already in the draft or repeated
in the list; a repeat row click just focuses the composer. Terminal
Mention types text and is unchanged.

* Test a row Mention followed by Mention all

The QA sequence is two separate inserts; cover the draft scan that keeps
the first agent from being added again.

* Give the recipient-authority test's history message a body

The panel no longer admits empty-body messages as a row's latest; the
test's history message now carries the words a peer would send.

* Clip the chat's orchestration panel to its transcript

In a short split or under a tall composer, the transcript can be shorter
than the panel's header, which then painted over the composer. The chat
frame now clips the panel to the transcript; terminals are unchanged.

* Check a terminal's readiness when Mention is pressed

The panel read the terminal's connection once while rendering. A
restored pane connects later without a re-render, so its rows and
Mention all stayed disabled. Mention is now available whenever the pane
has a terminal, and the pane and connection are captured and checked
when the user presses it.

* Keep a row's status at full strength when it can't be mentioned

A row that couldn't be mentioned dimmed everything on it, including
another agent's "Waiting for you" line. Its content now stays as is;
only the hover highlight and pointer cursor go away.

* Translate the crew row Open failure toasts

The crew's Open failures were English literals. They now go through
translation, and a gone or outdated chat uses main's existing texts.

* Translate the crew row Open fallback for agents without a target

* Put the Orchestration panel behind an experimental setting, default off

Settings > Experimental > Orchestration panel (experimentalOrchestrationPanel).
Off mounts nothing: the chat frame, the terminal-hosted chat's identity lookup
and the terminal pane portals all gate where they mount, and toggling applies
live without remounting the transcript.

* Give the terminal-hosted chat's panel its own module

* Leave the setting-off path exactly as on main

The message card's avatar and its single-sender hook are back to main's code;
the panel keeps its own list hook. The panel's code now loads only when it
first mounts, behind the setting.

* Leave /goal and ordinary sends exactly as on main

A typed multi-line /goal is prose again, as on main; only Mention's own
routing lines after a one-line /goal join its objective. A draft with no
agent reference skips the reference serializer, so its send text is projected
once, as before. The routing line format now lives with the other reference
formats.

* Keep main's abort reason and send-failure handling for every web subscription

* Build the panel tests' settings from defaults instead of a cast

* Load the panel with plain lazy so a failed load never retries or reloads the app

* Keep main's /goal parser and put a goal's Mention notes on its one line

The shared command parser is main's code again, so any typed or pasted text
parses as before. A typed /goal or Goal-mode objective with mentions carries
its routing notes on the same line instead.

* Let a failed panel load try again the next time the panel mounts

* Type the queued-edit test's pending send as main's boolean result

* Keep a mention's routing notes in Goal mode on hosts without goals

There /goal goes to the agent as a message, so its notes keep their own lines,
as a typed /goal there already does. A draft with no mention sends main's text.

* Give the lazy panel test the Mention props this branch's panel requires
2026-11-02 00:41:40 -08:00
OrcaWinandOrcaWin fe78cff1aa test: remove 20 low-value tests across 11 files (#37404)
* test: remove 20 low-value test declarations

* test: prune allowances for removed Git profiling suite

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-02 00:37:15 -08:00
Rayyan34andNeil e1ff15ee91 feat(settings): preview each font in its own typeface in font pickers (#33254)
* feat(settings): preview each font in its own typeface in font pickers

* perf(settings): skip offscreen font rows so opening the picker loads only visible fonts

* fix(settings): keep symbol font names readable in font pickers

* fix(settings): size skipped font rows by their content box

---------

Co-authored-by: Neil <neil@stably.ai>
2026-11-02 00:31:59 -08:00
Neil adb2d2d2cd feat(settings): delete imported terminal themes from the theme picker (#37356)
* feat(settings): delete imported terminal themes from the theme picker

* fix(settings): theme delete reads latest settings, undo keeps later choices, focus stays in picker

* fix(settings): serialize theme deletes and keep later edits on undo

* fix(settings): theme delete button visibility on a wrapper, not a Button restyle
2026-11-02 00:31:45 -08:00
Brennan Benson c7195a8d50 Show who each agent works with in a panel on its chat or terminal (#34891)
* Nest chat-UI orchestration workers under the agent that started them

Main's lineage projection only walked terminal panes, so workers running
in the chat UI never got a parent link and listed flat in the sidebar.
It now also projects chat workers, keyed by their visible chat row, and
resolves a chat creator or coordinator to that chat's visible row
instead of its handle or private mailbox pane key.

* Fix public worker lineage across assignment and row identities

* Complete terminal lineage provenance and bound active session selection

* Repair lineage test runtime boundaries and SQLite counters

* Provide read-only crew snapshots for each agent

* Batch public lineage verification after exact recency selection

* Derive crew relations once per meaningful host change

* Remove package manager lockfile churn from hook

* Show each pane’s agent crew with open and copy actions

* Use checked runtime values in lineage integration tests

* Preserve host-aware crew navigation remedies

* Document the trusted Dispatch SQL row boundary

* Keep lineage integration imports within their test programs

* Load native lineage fixtures before test execution

* test: complete lineage inputs in runtime and sidebar fixtures

* test: seed benchmark facts from active dispatches

* test: replace partial orchestration DB casts with typed fixtures

* test: complete stale-leaf mailbox fixture session input

* Derive durable crew parents from retained assignment proof

* fix(test): render worker lineage fixture with production list

* fix: preserve crew pane controls and summary identity

* refactor: extract crew row details presentation

* Add scoped terminal identity acquisition and preserve crew source wakes

* Share raw crew identity inputs through scoped production readers

* Exercise crew generation retirement through actual source owners

* Retire crew inputs on consumed ownership and visibility writes

* Use typed crew mutation and fixture access

* fix: use owned crew styles and committed render counters

* Repair crew fixture and RPC type contracts

* Count crew consumer render attempts in the fixture

* Localize crew panel labels and details

* Align crew integration fixtures and RPC parameter contracts

* Encapsulate terminal identity mutations and captured reader contracts

* Seed terminal identity fixtures through canonical mutations

* Complete crew panel English catalog entries

* Fix terminal identity fixture return type

* Cover terminal identity lifecycle schedules

* Align terminal fixtures with canonical identity sources

* Repair runtime fixture source contracts

* Use checked database fixtures for federation contracts

* Update crew source inventories and exit fixtures

* Preserve crew setup outcomes at existing subscription owners

* Match managed restore fixture to its nullable async return type

* Keep absent setup observations distinct from undefined failures

* Drive pending Crew questions from existing metadata

* Preserve nested pairing repair outcomes for shared callers

* Route attached workers to explicit local recipients

* Type Crew pending-question measurement receipts

* Match SSH repair fixture target absence to store contract

* Add finite crew subscription boundary candidates

* Isolate crew portal in terminal file drop fixture

* test: use checked property access for crew owner assertions

* Consolidate web runtime auth type imports

* test: type crew API legacy arguments and pending results

* Bound cold terminal layout construction and finite pane acquisition

* test: use public runtime identity in pane acquisition fixture

* Avoid repeated searches in cold workspace layout loading

* Verify cold loader fault identity and hook claimant effects

* Revert "Route attached workers to explicit local recipients"

This reverts commit f1335d1c06.

Keep attached workers on the existing Run-home routing path for this change.

* Omit crew peer addresses outside the active home route

* Align crew disclosure and availability with shared UI

* Keep crew retries on the verified runtime session

* Bound cold layout retirement and recorded-key construction

* Verify original cold layout failure identity

* fix: preserve surviving layout split references

* test: use typed retirement instrumentation properties

* Keep crew overlay inside narrow panes

* Resume Crew streams on verified runtime sessions

* test: preserve pane and retirement fixture contracts with checked types

* Prepare Crew record admission and wake identity changes

* Derive Crew recipient actions from current target owners

* Keep nested Crew process facts within selected acquisition

* Defer Crew legacy facts to consumers and complete raw coverage on success

* Use deterministic time in Crew command fixtures

* Restore pane-local Crew menu dismissal focus

* Document schema-owned Dispatch row assertions

* test: align Crew authority fixtures with typed project boundaries

* test: place Crew CLI integration in cross-surface project

* Type retained identity test meters with canonical source maps

* test: adapt mounted Crew fixture to Run unbind contract

* Document suffix Dispatch row boundary and preserve fixture unbinding

* Close crew menus when their terminal pane hides

* Remove unused structured activity component

* test: migrate Crew authority arguments and mailbox observations

* Forward native pane visibility to crew menus

* Fix pointer dismissal enrollment and modal permission

* Remove shared menu primitive patches

* Reuse message avatars in the crew panel

* Derive Crew attention and actions from complete recipient authority

* test: repair Crew avatar store fixture and operation accounting

* Fix Crew public-command fixture type contracts

* Align Crew fixtures with runtime reader and routing contracts

* Keep shared message avatar glyphs at their declared size

* Narrow receiving fixture calls to unary RPC methods

* Age pending question fixtures from every actual answer timestamp

* Complete Crew public-command workspace fixture result

* Test delegated helper follow-up through Crew advertised address

* Qualify Crew follow-up addresses through shared command admission

* Complete finite follow-up authority and lifetime evidence

* Assert exact remote authority acquisition error identity

* Consolidate Crew SQL test fixture imports

* Trim Crew panel tests to the high-impact set

Keep one mounted test per panel flow, the review-found regressions (avatar glyph size and attribution, stable labels, unavailable sending, hidden-pane menus, navigation remedies), the real producer-to-hook contract, cross-version refusal and recovery, and one N vs 10N contract per scaling piece. Remove permutation matrices, focus-timing proofs, and the duplicated web API and attempt suites.

* Trim Crew read-model tests to the high-impact set

Keep the real CLI/RPC/database command paths, one regression per review-found bug, the cross-version contracts and one N vs 10N operation contract per scaling piece. Drop permutation matrices, equivalence oracles, near-duplicate scenarios and diagnostic output, and return the SSH, managed-server and WSL test files to main, since their production changes were reverted earlier in this PR.

* Drop diagnostic output and a duplicate error case from Crew tests

Remove two leftover console.log diagnostics, an unused 2x2 sample matrix and unused return fields in the follow-up cost contract, and the subscription AbortError serialization case that the subscription identity and preload tests already cover.

* Pass the recorded-leaf reader in main's check-details loader test

* Build the approved orchestration panel design

Closed tab: panel icon, lineage icon with the worker count, then agents
grouped by status (needs you, working, idle, failed) with the sidebar's
status icon, up to three overlapping agent icons and +n. Rows are one
card with the task, the latest message or question, the relative time
and Details, Open, More. Rows sort by latest message. The open panel
reaches the pane top under the title strip. No user-visible 'crew'
text; counts use plurals. One store subscription resolves every row's
live sender state so the tab and the rows agree.

* Keep pane title buttons above the orchestration panel; tick row times

The open panel now sits just below the pane title strip in stacking
order and starts at the pane top in every host, so the strip's buttons
draw over its top band and no chat or terminal text shows above it. An
open panel lifts its pane's drag strip above it. Row times re-render on
the sidebar's shared 30s clock. Each status group keeps one fixed icon,
and the panel's needs-you count has its own plural.

* Move the orchestration row into its own file

* List every status case in the orchestration icon switches

* Fit the orchestration tab and avatar stack to main's Button and key lint rules

* Subscribe the memoized crew row to language changes; read the nullable listener count

* Ship the orchestration panel's plural labels in the boot catalog

* End the chat's orchestration panel above the composer

The panel overlaid the whole chat body, so with it open the composer's
send button sat underneath it. The frame now wraps only the transcript;
the queued drafts, prompt cards and composer stay where main puts them.

* Skip escalations when choosing a crew row's latest message

Orca writes its failure notices (a worker stopped without reporting, a
chat agent error, a terminal exit) as the worker's own escalation, with
terminal, task and dispatch IDs and CLI syntax meant for the coordinator
agent. The panel showed that text as the row's second line. Only the
panel reads this query, so escalations are skipped there and the row
shows the agent's last real message. An agent's own Blocked escalation
is skipped too; it still reaches the coordinator's inbox.

* Say why a crew row's agent can't be opened

Opening a row whose agent is gone showed "This agent is no longer
available." Use the existing reasons instead: the chat is no longer on
this host, or the terminal has exited.

* End the panel above the composer in terminal-hosted chats too

A terminal's chat view still mounted the orchestration panel over the
whole chat, so it covered that view's composer and send button. Both
chat hosts now wrap their transcript in the same frame, which takes the
panel's props.

* Show only an agent's own words as a crew row's latest message

Besides failure notices, the latest line could pick up an empty setup
receipt (a blank line that also moved the row) or a lifecycle message
Orca rewrote to "Orca rejected this worker_done: ...". The panel's
query now admits only conversational types with a body and without the
lifecycle rejection marker, before choosing each peer's latest.

* Keep worker launch stages out of crew rows and Details

A row with no message fell back to the worker's internal launch stage
("input accepted", "worker report queued") as its second line, and
Details repeated it as Progress. The row now has no second line until
the agent says something, and Details drops Progress; the status icon
already shows the state.

* Give the recipient-authority test's history message a body

The panel no longer admits empty-body messages as a row's latest; the
test's history message now carries the words a peer would send.

* Clip the chat's orchestration panel to its transcript

In a short split or under a tall composer, the transcript can be shorter
than the panel's header, which then painted over the composer. The chat
frame now clips the panel to the transcript; terminals are unchanged.

* Translate the crew row Open failure toasts

The crew's Open failures were English literals. They now go through
translation, and a gone or outdated chat uses main's existing texts.

* Translate the crew row Open fallback for agents without a target

* Put the Orchestration panel behind an experimental setting, default off

Settings > Experimental > Orchestration panel (experimentalOrchestrationPanel).
Off mounts nothing: the chat frame, the terminal-hosted chat's identity lookup
and the terminal pane portals all gate where they mount, and toggling applies
live without remounting the transcript.

* Give the terminal-hosted chat's panel its own module

* Leave the setting-off path exactly as on main

The message card's avatar and its single-sender hook are back to main's code;
the panel keeps its own list hook. The panel's code now loads only when it
first mounts, behind the setting.

* Keep main's abort reason and send-failure handling for every web subscription

* Build the panel tests' settings from defaults instead of a cast

* Load the panel with plain lazy so a failed load never retries or reloads the app

* Let a failed panel load try again the next time the panel mounts
2026-11-02 00:21:42 -08:00
Neil 9d22b026de feat(settings): let the Ghostty import read a config file you pick (#37353)
* feat(settings): let the Ghostty import read a config file you pick

* fix(settings): guard Ghostty file-pick races and non-regular files
2026-11-02 00:12:22 -08:00