A COMMIT failure always latched the journal writer as indeterminate, even
when SQLite had rejected the COMMIT and the rollback was confirmed, so later
chat history writes failed until restart. An SQLITE_FULL that rolled back the
whole transaction also replaced the real cause with a missing-savepoint error.
Only latch when the COMMIT outcome is genuinely unknown or the rollback
failed, keep the original error when SQLite already ended the transaction,
and carry the cause's message in the batch error for the worker transport.
Fixes#43555
Co-authored-by: 修雨 <huyizhou@alibaba-inc.com>
Co-authored-by: Neil <neil@stably.ai>
With host sections, the project header pins beneath the pinned host card, so the
one-header reveal inset left revealed worktree titles hidden under the stack.
Derive the inset from the same layout rule for the DOM reveal and the virtualizer.
Strings kept from streamed session documents (root/projected metadata and
model ids from Gemini, Cline and Devin messages) could be V8 slices of the
large decoded chunk that also held discarded message bodies, keeping those
chunks alive and pushing the scanner helper into heap OOM on large
histories. Copy those retained strings with ownRetainedString so the chunks
can be collected.
Fixes#43523
Co-authored-by: Neil <neil@stably.ai>
Co-authored-by: yao <yao2534591207@gmail.com>
* refactor: organize renderer store and agent status modules
* test: remove global timer counting from coordinator cleanup
* test: retire queued quit timing case and preserve main graph coverage
A wide ES-module import level could exceed the 32 in-flight cap of an
orca-plugin-frame session; the extra imports got a silent 503, which
fails the frame's whole module graph.
Buffered requests past the cap now wait FIFO for one of 32 slots, with
up to 1024 queued for at most 10 s each before a 503. Streamed media
bodies get their own cap of 32 and are refused at once, so held-open
streams never fill the slots buffered requests wait for. The plugin is
re-resolved after admission, and refusals are logged once per burst per
lane.
Fixes#43532
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Reopen Codex chats archived in Codex and never silently replace a used conversation
A Codex conversation archived in Codex itself could no longer be opened from its Orca chat: Codex refuses to resume an archived thread and Orca showed that error. Orca now unarchives the thread and reopens the same conversation, once, the way the common pattern does.
A Codex chat whose saved conversation went missing silently started a brand-new Codex conversation whenever Orca had created the thread, even if the chat had already exchanged turns: the old messages stayed on screen but Codex no longer knew them. Orca now replaces a created thread only when the chat's journal holds no turn or accepted send for it (the same check ACP chats already use). A used chat keeps its conversation and shows the existing "Codex couldn't find this chat's saved conversation" failure; Hand Off to Another Agent stays available to continue.
Tracked in STA-11506 and STA-13231. Rebuilds the cause-level part of #31973.
* Keep an archived Codex thread when its reopen still fails
An archived thread was saved, so a missing rollout after unarchiving now shows the missing-conversation failure instead of starting a new thread. A thread already unarchived elsewhere is simply reopened, and any other unarchive failure reports the original archived error with the unarchive failure as its cause.
* Count a Codex turn that started before its message was saved
A turn row names its opening user item, which carries the thread, so a chat whose Codex turn started but whose message echo never reached the journal still counts as used and is never silently replaced.
* Count every Codex turn written since the thread was created
A turn can open from Orca's own send when Codex answers turn/start before echoing the message, and that turn row names no thread. Every turn written at or after the fence that created the head thread ran on that thread, so the replacement check now counts them, instead of matching the opener's key.
* Read only the newest turn row and skip Orca's command turns
The fence check reads the newest visible provider turn row instead of every turn in the chat, and a /compact Orca recorded on an empty conversation no longer counts as an exchanged turn.
* Index the newest provider turn so reopening never walks command turns
Adds a partial index on visible provider turn rows (no user_version change, like the async-question indexes) so the replacement check seeks the newest provider turn directly instead of stepping over trailing /compact rows.
* Drop the query-plan test that copied the production SQL
The production read forces the index, so a predicate drift already fails the hasProviderTurn test that runs it.
* Read a bounded run of newest turns instead of building an index at startup
On a real 22 GB journal (1.56M rows) building the partial index took 84 s before the journal reported ready, on the first open after upgrading. The check now reads at most 64 of the newest visible turn rows through the existing kind index (about 1 ms on that journal) and takes the first that isn't an Orca /compact; if all 64 are command turns it doesn't treat the thread as unused, so nothing is replaced.
* fix(wsl): reclaim a dead installer's orcad lock in seconds via a guest kernel lock
* fix(wsl): fall back when the install lock holder cannot start, report the real wait, and name a takeover
- A holder that fails to start or never confirms leaves an unmarked lock on the age rules; the install keeps going, still fenced.
- While a contender sees a live holder it no longer promises a 20-minute takeover; once the holder reads gone it reports seconds.
- A fenced command that exits 75 now fails with a plain message that another Orca window took over.
- A flock-backed lock is never taken by age while its holder runs, and the owner's own release waits for its fenced commands to end.
* fix(wsl): keep the 20-minute takeover for install locks whose holder still runs
A frozen but alive Orca window must not block other windows. Fenced install commands already stop the old install cleanly if a waiter takes over by age, so the live-holder veto and its holder-only lock file are removed. The wait text keeps the age countdown while the holder runs and reports seconds once it reads gone.
* fix(wsl): keep install-lock ownership proof, name a lost holder, and say when takeover is seconds away
- A release gate that times out now fails, so the owner keeps its token instead of forgetting it.
- Losing the lock holder mid-install surfaces its own reason instead of a generic cancel.
- The wait text follows every holder probe and says Orca takes over in a few seconds once the holder is gone, in every locale.
- A holder that outlives the unmark wait is killed before the mark is cleared, so it cannot mark the lock late.
* fix(wsl): only kill an unconfirmed install lock holder whose pid is still that holder
The holder now stays one shell for its whole life, with a tag and its lock token in its command line. The unmark checks /proc/<pid>/cmdline for both before the kill and skips it on a mismatch, a reused pid, or an unreadable /proc.
* test(wsl): give the real-shell install lock tests reasons for their wall-clock waits
* fix(wsl): recover a takeover whose reply was lost, skip the release wait on a successor's lock, and stop when an abandoned holder's mark cannot be cleared
- A takeover steal that failed without an answer is checked on the next probe; a lock that already names this install's token counts as acquired.
- The release gate returns at once when the lock already names another owner.
- If clearing an unconfirmed holder's mark fails twice, the install stops and its cleanup removes the lock, instead of installing beside a mark with no holder.
- The lost-holder error reads plainly and only replaces a generic cancel, so a more specific failure keeps its own message.
* fix(uninstall): name the serve row after the orca serve command it came from
* fix(uninstall): stop the terminal daemon as the last uninstall step
Uninstall now ends Orca's terminal daemon (every protocol generation of this
profile) so terminals do not keep running after the app is deleted. In the app
the daemon provider is disposed first, which closes respawn for the rest of the
session; orca uninstall goes through the running app when one answers.
* fix(uninstall): end open panes as an operator close so they don't try to reconnect
Search cycles reuse the indexed stat of transcripts untouched for a day in
directories whose mtime is unchanged, and restat everything on scheduled
sweeps. Codex hardlink aliases are compared only within same-name groups.
Deferred reads repeat discovery with reused stats and no retention purge,
and the read budget starts after discovery.
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Radix flips the dropdown on its first measured height, which depends on async
pane content; then it stays capped to that side. Pick the side from the field's
position at open, cap the card to that side's room, and let only the model list
shrink so effort and Open as stay visible.
* Send messages between agents through Orca mail, not terminal input
* Point the inject refusal at commands that work; qualify mail receipts
* Keep the refused terminal's workspace in the inject recovery
* Describe chat mail as delivered whole, terminal mail as a pointer
* Describe chat coordinator wakes and terminal mail notes precisely
* Describe the terminal-mailbox warning as agents see it
* Name the full send command and the check command the wake gives
* Tell agents how to find a tab's agent, and that mail isn't the user's answer
* Cover chat tabs, ambiguous tabs and an unset handle when finding an agent
* fix(agents): name agents kept on their own surface when the feature tip changes the default
Turning Chat UI on (or off) from the launch tip saved the new default but only said "Chat UI is now the default", so agents with their own Chat/CLI choice silently kept opening the other way. The tip now shows the same notice Settings shows: it names those agents and offers "Set all to Chat" / "Set all to Terminal". The notice body moved into one module both entry points use; Settings keeps its mounted/unmount dismissal, the tip uses a fixed toast id.
Tracked in STA-13605.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(agents): close the Chat UI corner card when the named notice reports the change
When agents keep their own CLI choice, the corner card's "New agents will open in Chat UI" note contradicted the toast naming them. The card now closes and leaves the named notice as the single confirmation, like the tip dialog. A tip write superseded by a later default change no longer confirms anything.
Tracked in STA-13605.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(agents): keep plural count visible to localization extraction; drop test cast
Tracked in STA-13605.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(native-chat): retain skill scopes in the slash picker
Port the scope-aware skill budget from #16462 into the shared composer. Keep provider-reported availability, relevance ordering, the command cap and explicit unlimited mobile catalogs. Tracked in STA-4402.
Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
* refactor(native-chat): keep skill selection in its own module
* fix(native-chat): retain the picker source type import
* Drop the Jira e2e route whose only spec was deleted
Main removed tests/e2e/jira-panel-layout.spec.ts but kept its route, so every PR touching Jira sources failed the changed e2e specs job looking for the missing file.
* Drop the other e2e routes whose specs were deleted and refuse routes to untracked specs
Test cleanups deleted the onboarding, diff-note-layout, issue-12656-terminal-link-tooltip, plugin-components-gallery and ssh-orcad-paired-phone-projects specs but kept their routes, so later PRs touching those sources fail the changed e2e job. Route selection now exits with the offending routes when any route names a spec git does not track, so the PR that deletes a spec fails instead of every later PR.
* Drop the GitHub project board e2e route whose spec was deleted
#43070 deleted tests/e2e/github-project-board.spec.ts; the new route guard caught the route left behind.
* perf(runtime): stop rebuilding sender history and resending orchestration on unchanged graph replies
The window counts as a sender consumer while it holds the graph, so each graph
reply no longer drops and cold-rebuilds sender worker history. The orchestration
projection rides the reply only when it changed since the window's applied
revision, and status evidence for the projection no longer composes each
Dispatch a second time for a binding nothing reads.
* test(runtime): unchanged orchestration replies keep the window's projection
* fix(runtime): release sender history when the window's graph fails without recovering
* fix(renderer): read the applied orchestration revision only when one exists
Antigravity listed its models only from a finished chat, so a new user's
agent picker said the models had not loaded. Model discovery now picks the
listing method from the install a new chat launches on:
- the host's agy lists with `agy models`, grouping each family's levels the
way a chat's model menu does;
- Orca's managed Antigravity server lists in a throwaway session in a private
folder, then removes that session's files, since the server cannot delete
sessions. Starting that server is heavy, so it lists only when a picker asks,
never in startup warm-up.
Catalog reads remember the host-or-managed choice for five minutes (retired by
an Orca sign-in change), so opening a picker starts no host checks.
The picker drops "close and reopen" for a short reason plus a Retry button
that reads the agent's models again in place.
Cursor and Copilot now declare the project files that can set their model, so
a new chat's default model is recorded for them as it is for other agents.
* fix(terminal): keep restored output in view after a cold restore outside Windows
* fix(terminal): start the fresh shell on a new last row, and blank while a remote owner's OS is unknown
* fix(terminal): forget a re-resolved owner's backend and check the screen, not the cursor, for an empty pane
* test(terminal): give the mock pane buffer an empty getLine
* fix(terminal): only skip the fresh-shell start on a blank pane with its cursor home; pin the owner reset
* test(terminal): pin the macOS cold-restore rows and format
The CLI's default 'full' report calls count_tokens once per category on a
fresh process, so resuming several chats at once burst 20-31 calls each.
'summary' answers from the last response's usage and local estimates.
Tracked in #43104.
Co-authored-by: 김윤진 <yunjin.kim@merakiplace.kr>
* perf(worktrees): resolve one workspace without projecting every workspace in its repo
A runtime call that names a worktree resolves it through the scoped catalog
path whenever the 1 s fleet snapshot is stale. That path projected every
checkout in the owning repo (metadata reads, merge, path canonicalization)
to pick one row, so on a 1,800-worktree repo each lookup cost the main
thread a full repo projection.
Scan once, project only the rows equivalent to the target to find it, and
then only the rows in its lineage-connected component (the only rows a
lineage edge can reference), in the owner repo and in related repos.
* perf(worktrees): keep scoped lookup side effects and stop copying the metadata map
- A scoped lookup still stamps checkouts that were never saved, so a stalled
scan's stored-row fallback keeps finding them.
- A folder target with lineage reuses its one folder listing.
- joinRepoWorktreeRows overlays only the rows it stamps instead of copying
the whole metadata map for each repo that has one.
* perf(worktrees): scoped lookup still host-migrates legacy rows a full join would
A saved row without a host or instance stamp is migrated by the full join's
per-row read; admit it so a stalled multi-host scan's stored fallback still
finds it. Absent rows join only for a single-owner repo, where the full join
would stamp them.
* perf(worktrees): stamp the whole scan, narrow only the projection (council ruling B)
The scoped lookup now runs the unchanged per-row stamping loop, shared with
the full join, over every scanned checkout of the owner and related repos,
so durable identity stamping and legacy host migration match a full join by
construction. Only the projection is limited to the target's equivalent
rows and lineage component. needsDiscoveryJoin is gone.
The scoped resolver moves to scoped-worktree-row-resolution.ts to keep the
row-resolution module under the line limit.
* Publish agent status only when the shown status changes and skip version-only repeats on the desktop
* Send a status row again only when it changed since the last one sent
* Sweep removed-workspace cursors only when membership changes; guard the desktop version-only skip
* Decide frame-drawn ownership only for frames that reconcile; drop a test that cannot fail
* Read workspace records through the catalog selectors
* fix(execution-host): a non-string saved host id no longer crashes the terminal workbench
Crash d1e50ca3 (1.4.259, Windows): rendering a chat name passed a non-string
executionHostId into normalizeHostPart, which threw 'e?.trim is not a function'
and took down the terminal workbench boundary. Treat it as absent, as blank is.
* fix(execution-host): take unknown at the host-id parse boundary instead of casting in the test
* fix(execution-host): a repo with a non-string host id no longer proves it is local
* fix(native-chat): guard only the chat-name host lookup, not the shared host-id parser
Reviewers found that making the shared parser read a non-string as absent turns it
into 'local' for worktree removal and trash cleanup, which could act on this
machine's disk. Restore the shared parser and check the type at the one render path
the crash report hit.
* feat(workspace-cleanup): split settings into Manual and Automatic cleanup sections
Manual cleanup gets its own section with a Review workspaces button. The rules
section is headed Automatic cleanup with an On/Off pill, a status line and Run
rules now (only while a rule is on). Turning a rule on shows its check in the
switch and under the rule, with an inline Try again when the check fails.
* fix(workspace-cleanup): move pending switch look into Switch and wrap the manual row
* fix(workspace-cleanup): narrow layouts for Activity, rule titles, Advanced and the Automatic heading
* fix(workspace-cleanup): announce a cleanup run starting and finishing to screen readers
* fix(workspace-cleanup): keep the Automatic cleanup search target and mark a pending switch unavailable
* fix(workspace-cleanup): announce every finished run, even when worded like the last one
* fix(workspace-cleanup): announce a run's result and the next start together when they arrive at once; keep main's disclosure summary
* fix(i18n): retire Simplified Chinese strings the Workspace Cleanup page no longer uses
* chore(i18n): sync protected-copy keys for the Workspace Cleanup page
* test(workspace-cleanup): check the joined result and start announcement text directly
* fix(i18n): update Simplified Chinese for the Workspace Cleanup page layout
* fix(agent-picker): wheel-scroll agent rail, warm tooltips, Blank Terminal tile
- A vertical mouse wheel scrolls the overflowing agent rail sideways.
- The rail shows a thin scrollbar on hover instead of hiding it.
- Rail tooltips share a provider with a skip delay, so moving across tabs shows labels at once.
- Blank Terminal is a tile ahead of the agents instead of a row under the card; when it is current, the dropdown opens on it with one checked row.
* fix(agent-picker): thinner rail scrollbar thumb
* fix(agent-picker): drop unused import after rebase
* test: remove low-value permission and worker projections
* test: isolate coordinator mail setup from the system heartbeat
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
The install status only looked for Orca's own Antigravity runtime, so a new chat that would run the user's agy showed the install screen until its session status arrived. Count a ready host program as found on this host.