Commit Graph
4649 Commits
Author SHA1 Message Date
Brennan BensonandNarry 7fbb47e713 fix(omp): use OMP model roles, selectors and effort in chats and workers (#38713)
* fix(omp): launch OMP chats with their saved model and accept OMP effort

OMP's Chat UI model option names only listed provider/id values, so a
worker started with an OMP role or provider/model:level selector failed
before its first message. OMP resolves those on its launch line, so the
chat's saved model now rides 'omp acp --model', and a new session counts
it as applied. OMP's launch catalog gains its thinking levels, so
--effort is accepted and applied (--thinking in a terminal, the session's
thinking option in a chat).

Tracked in STA-13562.

* fix(omp): keep OMP role chats working after a restart

OMP's ACP model option takes listed provider/id values only, and a load restores the conversation's own model, so a role-started chat failed with "Unknown ACP model" on its first send after an Orca restart.

- New chats keep the saved model on OMP's launch line; resumed chats no longer pass it, so a renamed role cannot stop a good conversation from opening.
- When OMP's model option refuses a value as unknown, Orca applies it through OMP's own /model, the resolver --model uses, as a hidden send-time command. It counts as applied only on OMP's "Model set to" reply and a normal end; cancel or timeout retires the process.
- The command's reply and title notices never reach the chat, its status or unread state.
- Proof from the launch line or /model is retired when OMP changes its model or thinking itself; ordinary model-option proof keeps its existing rule.
- A refusal names the agent and the next step; on OMP older than 18.1.9, whose /model takes ids only, it also names the release to update to, carried on the modelUnavailable fact.

Tracked in STA-13562.

Co-authored-by: Narry <3047793+NarryG@users.noreply.github.com>

* fix(omp): keep role steers in order and say when OMP has no model

- A role steer that OMP's model option refuses now holds its place among queued steers: answers ahead of it are cancelled as they start, and a Stop or teardown while it waits withdraws it without sending /model or the message.
- OMP's "No model selected" (an unresolved launch role, or signed out) is reported as its own failure, "OMP has no model selected. Check your model selection and OMP sign-in, then send again.", instead of a sign-in failure; the next send applies the selection again.
- A cancelled model command reads as not sent, and an option write settles once.

Tracked in STA-13562.

Co-authored-by: Narry <3047793+NarryG@users.noreply.github.com>

* fix(omp): keep OMP's no-model text in the log and test a late /model answer

Tracked in STA-13562.

Co-authored-by: Narry <3047793+NarryG@users.noreply.github.com>

* fix(omp): a Stop still withdraws a waiting role steer after main's turn changes

Main now clears stopAt when a turn finishes, so reserveSteer counts Stops
instead of reading stopAt. Refusal wording moves to acpPromptRejection to
keep the turns file within its line budget; behaviour is unchanged.

Co-authored-by: Narry <3047793+NarryG@users.noreply.github.com>

* fix(omp): a Stop withdraws a role message anywhere in its preparation

A message that falls back to OMP's /model now counts as a held steer from
before its option writes until it is admitted. A Stop in that window
withdraws it unsent, even with no turn running; ordinary messages keep
their Stop behaviour. Restores the launch-role no-resend test main's file
removal dropped.

Co-authored-by: Narry <3047793+NarryG@users.noreply.github.com>

* fix(omp): a Stop before OMP refuses /model reads as a withdrawn message

A Stop the role message already took outranks OMP's own refusal of the
model command, so the message reads as cancelled and never sent rather
than as a model failure. Pins that a Stop with no turn running is still
refused while an idle send's first model-option write is pending: the hold
starts when the send falls back, not before its option writes (the host's
Stop aborts the send's signal there).

Co-authored-by: Narry <3047793+NarryG@users.noreply.github.com>

* test(omp): put the cast's safety note on the line above the cast

* test(omp): cover the new failure copy on phone and desktop, and OMP's thinking levels

Tests the no-model sentence and the update hint in English and one
translation on each surface, every level omp --thinking takes, and that a
missing model classifies as the agent's own refusal.

* test(omp): import the launch module once in the catalog test

---------

Co-authored-by: Narry <3047793+NarryG@users.noreply.github.com>
2026-11-06 02:21:09 -08:00
Brennan BensonandClaude Opus 5.5 2648941358 Fork a Chat UI chat from any finished response (#38326)
* feat(chat): shared contract for forking a chat from a response

Adds the create-time fork source, the host fork capability, the agent fork
level, the forked-from record relationship and the forked-from divider row.

* feat(chat): advertise each agent's fork level and a chat's fork support

* feat(chat): carry a fork source through chat launch, reload and retry

A launch with forkFrom {sessionId, throughItemId} keeps it on the create call,
the saved launch record, reload, retry and its holders, sends no new-chat
options, and is refused before create on a host that does not advertise forks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(chat): fork a native chat from a finished response on desktop

Finished root responses offer "Fork from this response" where the host and
agent can fork: disabled while support is unknown or a fork is opening, opened
in a new tab right after the source, with one toast naming the agent on
failure. The forked-from row draws as a divider linking to its source.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(mobile): fork a chat from a response in the message actions sheet

The sheet offers "Fork from this response" with the desktop's eligibility and
host capability, creates the fork through the phone's chat create, and draws
the forked-from divider with a link to the source chat.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(chat): a fork create replays only as the same fork

* Add native conversation copy adapters

* Create native chat forks with derived source markers

* fix(chat): offer a fork only on rows that show the agent's own message

A displayed row can be a tool call or a status projected as a plan while
reading as a response; both clients now check the journal row's own kind.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): open phone and paired-desktop forks right after their source

The phone names its source tab as the create's placement and the host takes
that tab's group; a paired desktop sends the address captured at the click
when the fork has no tab of its own yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): float a mid-turn response's fork action instead of adding a line

The action on a response the turn continues past hangs from a line of no
height, as the reply controls hang into the gap, so tool-heavy turns keep
their spacing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): follow the chat's own fork verdict on both clients

The options read already says whether the installed agent forks; an observed
no hides the action, an unanswered read keeps it disabled, and yes enables it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Preserve native copy boundaries and rewind behavior

* Preserve imported fork tips and serialize create replays

* fix(mobile): open a fork's source through the session's own chat opener

The forked-from link now asks the controller's existing opener for the source
by history id, so it follows that opener's host, selection and reveal rules
instead of navigating on its own.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Project fork markers from touched journal groups

* Retain fork group restoration for delayed readers

* fix(chat): keep a mid-turn response's fork in its own right gutter

The floated action covered the start of the next row. It now sits beside the
response's last line, in a gutter as tall as the prose, so it adds no line and
never reaches the following row.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Preserve native fork chain boundaries and durable streamed copies

* Place phone forks beside their source in window publications

* fix(tabs): adopt a host's new tab where the host placed it

First adoption put every unseen tab at the end of its group, so a fork the host
published after its source landed last. A new tab now follows its nearest host
predecessor when that tab is here; tabs already adopted keep the user's order.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): reserve the fork gutter on every root response from the first frame

The gutter came and went with the fork offer, so prose reflowed when a turn
finished or support resolved. A pane that draws forks now keeps it on all root
responses, and the fork sits only there, not also beside Copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Return Codex copies without automatic provider renaming

* Resolve chat placement once at the current layout owner

* Preserve chat publication when saved opens are skipped

* Retry chat opens when queued placement changes

* Bound stale chat placement retries

* test: expect the OpenCode reader's imported fork tip

* perf(chat): keep the fork offer stable while a chat streams

Every stream commit made a new forkable-id set, so the fork context changed and
every offered response re-rendered. The set is reused while its members hold,
and rows get an action object that changes only with support or pending.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: keep the fork params and Claude fork worker inside main's new lint limits

* Test fork copy and source refresh scaling

* fix: merge duplicate imports and stringify the OpenCode fork tip id for main's lint rules

* Keep fork placement behind session tab projection boundaries

* test: annotate the Claude copy test's hoisted account homes instead of asserting

* fix: add the fork action and forked-from strings to the English catalogs

* test: give fixtures the fork copy their agents declare; add the forked-from string to the boot catalog

* test: keep registry fixtures consistent with the fork copy their agents declare

* fix(orcad): ship the Claude fork worker with the server; update tests for fork fields

* Test saved fork selections through import and first send

* Preserve ordinary chat publication while saving placement

* Show fork beside the copy button on phone chat responses

Long-press opens text selection on every current phone, so the actions sheet that held fork never opened. The fork button now sits next to each response's copy button.

* Keep the phone fork slot fixed and offer it on every forkable response

The fork slot is now held by the row's own kind, as desktop's gutter is, so finishing a turn or learning the host's support never moves the timestamp. Responses with no copyable text (a visual only) still get fork, and each button re-renders only when its own offer changes.

* Follow main's moved runtime modules in fork code and tests

* test: build the phone response-actions fixture without type casts

* Let the phone read the host's agents so its fork action can turn on

Phone QA found the fork button always disabled: the phone asks the host which agents can fork, and the host refused that read from paired phones.

* Retry the phone's agent-list read, and read again after a reconnect

A read lost to a dropped connection or a timeout left Fork disabled until the chat was reopened.

* Own the phone's agent-list retry timer in its own effect

CI's effect-cleanup check could not see a timer set inside the read's callback; each retry is now a state change with an effect that sets and clears one timer.

* Give each phone connection its own agent-list retries

A count left over from an earlier connection could leave a new one with no retries, so one failed read kept Fork disabled after the transport moved.

* Scope the phone's agent-list retries to each spell of discovery

When the host's fork support dropped and came back on the same connection, the earlier failures carried over, so one more failure got no retry. Each stretch of discovery now owns its reads, failures and retry timer.

* Keep the forked-from source link reachable by screen readers

The divider's separator role and row label hid the source chat button inside it; the rules are now decorative and the text and button read normally.

* Keep fork names owned by adopted chat records

* Use the fork icon for Fork from this response

* Show the phone meta actions only when a row has one

An empty actions group still shifted the time by the icons' edge margin on rows with no copy, fork or rewind.

* fix(chat): put Fork beside Copy in the response's hover row

The fork button sat alone in a right gutter far from the other row actions.
It now joins the response's existing hover controls next to Copy, where those
controls show, and the gutter is gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): keep a finished turn's actions on its last words and hold the Fork slot

A turn whose last prose was followed by tool or thought rows showed no Copy
and no Fork anywhere until it was collapsed. The actions now belong to the
turn's last prose row, decided when the transcript's rows are built, and keep
the gap below it whole so they never cover the next row. Root responses also
keep an empty Fork slot when not offered, so resolving support never moves
the row's other actions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): give a turn's actions only to a reply with words

An image-only reply after the turn's text took the response actions but could
not draw them, so the text lost Copy and Fork. Slot construction now picks the
turn's last reply by the same words the row draws and copies.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): let an image-only response hold a turn's actions when its text is folded

A collapsed turn that ends in an image hides its earlier text, so no drawn row
could show the response actions and Fork vanished. Each turn's actions now go
to its last drawn response with words, else its last with images. Copy and its
context-menu target appear only where there are words to copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Fix Claude fork cuts after local commands

* Extract the conversation copy input contract

* Preserve caller results at Claude fork boundaries

* test: check the copied fork for the wake answer without a type assertion

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-06 02:08:24 -08:00
Brennan Benson 0b93cef445 One chat's status change wakes only that chat (#38883)
* perf(native-chat): one chat's status change wakes only that chat

The renderer status feed copied every retained summary and called every
listener on each one-session update, and the status bridge walked every
open tab. Adopt the common keyed-entity pattern: update the session in
place, wake only readers registered for that session, and give the bridge
a session-to-tabs index. Option state now reads only the runtime
permission answer, so a reply preview no longer re-renders the chat.

* fix(native-chat): keep the phone's permission projection and prune stale retry members

Restore projectRuntimePermission for the phone app, ignore a malformed
conversation-name list as the names fold does, drop superseded bridge
members from the retry set, key resume-run ids by the run's start, and
update the continuation test mock.

* perf(native-chat): retry and resume-run checks look only at the touched host and chats

Keep the bridge's retry set per host so another host's update never scans
it, and check only the resume-run entries an update touched.

* test: give the launch create-message feed fake the per-chat subscription

* test: drop call-count assertions from the bridge contact-loss test

Keep the behavior it guards: no throw, revocation applied, later listeners
still notified, and the reconnect snapshot projects.
2026-11-06 02:06:50 -08:00
Brennan Benson 5b1ade1e0e Count paired-phone chat and launches in usage stats (#38847)
* Count paired-phone chat sends, launches and tab opens in usage stats

The host already knows when a request comes from a paired phone, so it
records the phone's chat sends, agent launches and opened tabs with the
same opt-out as the desktop's own counts. The desktop chat box tags its
sends as desktop.

* Count the views a phone opens and skip replayed sends

A phone picks chat or terminal view on its own, so the opened count now
comes from the stream it opens (chat transcript or full terminal), not
from tab activation. Replayed sends no longer count twice, and phone
sends report an unknown runtime.

* Count a phone's view only once its stream is open

A terminal counts after its snapshot reaches the phone, and a chat
transcript the host cannot read is not counted.

* Tag phone launches where the terminal launch is built

Keeps the launch and runtime identity files within their line budget:
the existing pane-agent reader is public instead of wrapped, and the
phone launch tag is applied where the launch reaches the terminal.

* Keep the phone launch tag when a launch creates a workspace

* Use type guards instead of casts in phone usage counts

* Never let a phone view count end the stream it observes

The agent is read only for a view not yet counted today, inside a guard.
Launch tests that check a caller's own label use a desktop caller, and a
phone launch that creates a workspace is checked to stay tagged mobile.
2026-11-06 02:04:43 -08:00
Neil dbb13c2c38 fix(codex): keep the clipboard SSH marker out of commands Codex runs (#38914)
Orca sets a synthetic SSH_CONNECTION so Codex forwards copies over OSC 52
for remote viewers. Codex's shell tool inherited it, so agy launched from
Codex treated the local host as remote and ignored its keyring login.
The wrapper now blanks only Orca's sentinel in Codex's shell environment
policy; genuine SSH metadata is untouched.

Fixes #37723 (STA-13596)
2026-11-06 01:28:04 -08:00
OrcaWinandOrcaWin 687b0ee252 test: remove 52 low-value plugin, checks, and runtime tests (#38909)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-06 00:17:38 -08:00
Brennan Benson c5f1c59009 Let users hide the changed files card in chat (#38756)
* feat(native-chat): let users hide the per-turn changed files card

Adds a Changed files summary setting under Settings > Chat > Behavior (on by
default) and a Hide button on the card that turns it off everywhere, with a
toast linking back to the setting.

* fix(native-chat): confirm Hide only after the setting saves

Show Hidden only once the setting is saved and report a failed save instead;
keep the card header one line tall; cover saved settings without the key.

* test(native-chat): import getDefaultSettings from shared constants

* feat(native-chat): reveal Hide on card hover and move the setting to Appearance

The card's Hide control is now an icon with a Hide tooltip that appears on
hover or keyboard focus, and the Changed files summary switch lives in
Settings > Chat UI > Appearance, where Reset restores it.

* fix(native-chat): put the Hide reveal classes on a wrapper, not the Button

Button owns its effects; the hover and keyboard-focus reveal now lives on a
wrapper span, as other row actions do.
2026-11-06 00:05:16 -08:00
Brennan Benson 9c68fc1d20 Show when each check ran and how long it took (#38731)
* feat(checks): show when each check ran and how long it took

Check rows in the right-sidebar Checks panel now show how long a
finished check took and how long ago it finished (or started, while it
runs), with exact start and finish times on hover. GitHub check runs,
legacy commit statuses and GitLab jobs carry provider run times; rows
without times show nothing.

A GitLab pipeline that ran on a commit the merge request has since moved
past says so. The GitHub rollup read keys its 60s cache by the expected
head, so a push never serves the previous head's checks.

* test(checks): bound the clock work of check time labels

* perf(checks): rebuild check time text only when its data changes

Clock ticks now move only each row's age; exact times, duration and copy
are built once per data or language change. Move the run-time mapping
tests to the mapping layer to keep the client test file within budget.

* fix(checks): annotate the gh pr checks reply instead of casting it

* fix(checks): say when a running check started; key the rollup cache by a query comment

A running row reads 'started 5m ago' so its age isn't read as when it
ran. The expected head now rides in a GraphQL comment, which servers
ignore but gh's cache key includes. Add the new copy to the English
catalog and test behavior rather than formatted copy.

* fix(checks): let check times truncate before names in a narrow sidebar

At the narrowest sidebar the time text never shrank, squeezing check
names to nothing and pushing status labels out of their rows. The time
now sits beside the name, gives up width first, and the name keeps a
minimum width.

* fix(checks): rebuild check time copy when translation catalogs change

* fix(checks): reserve room for a running check's growing start age

* test(checks): keep REST check-run times covered through the schema

* fix(checks): read the checks rollup without gh's disk cache

gh's cache key ignores the PR head, so after a push it answered with the
previous head's checks, and it never evicts expired entries. Orca's own
head-keyed checks cache and read coalescing already bound the requests.

* fix(checks): hide check times in rows too narrow to show them

Below a 17rem row the time text is hidden, so the narrowest sidebar keeps
main's name, status and link layout; wider rows truncate the time before
the name, which keeps a 36px minimum.

* fix(checks): truncate a check's duration before its age

The age answers when a check ran, so in a tight row the duration now
gives up its width first.

* test(checks): type the rollup fixture

* fix(checks): show check times only in rows with room for them

Between a 17rem and 19rem row the times squeezed names to their minimum
and clipped; hold them back until 19rem, which the default 350px sidebar
clears.

* fix(checks): keep a minimum name width only while check times show

Rows too narrow for times, including the narrower folder-workspace parent
PR rows, now lay out exactly as before.

* fix(checks): show a running check's elapsed time instead of its start age

'started 10m ago' reserved so much room that running check names shrank
to a few characters at the default sidebar width; beside a running status
the elapsed time ('10m') says the same thing in a quarter of the space.

* test(checks): use a type import for the mocked module
2026-11-05 23:34:53 -08:00
Brennan BensonandYash Kakade 0ce6c7b61f feat(gitlab): filter Tasks merge requests to ones you wrote or review (#38766)
* feat(gitlab): filter Tasks merge requests to ones you wrote or review

Tasks > GitLab > MRs could only filter by state, so on busy projects you
had to scan every open MR to find yours. A second set of chips (Everyone,
Mine, Needs review) now combines with the state chips, so "my merged MRs"
works too.

The filter runs on the host that owns the repo's GitLab sign-in, looks up
the signed-in user fresh on the project's own host, and filters by
author_id or reviewer_id in one request per project. A failed lookup
shows an error instead of everyone's MRs, and older paired servers that
would drop the filter ask to be updated.

Co-authored-by: Yash Kakade <yashkakade2015@gmail.com>

* fix(gitlab): keep filtered MR lists honest while loading and on old servers

- The reviewer chip reads "Reviewing": GitLab lists MRs you were asked to
  review even after you reviewed them, so "Needs review" overpromised.
- Rows belong to the query that loaded them: after a chip change the list
  shows loading, never the previous filter's rows with Start enabled.
- A refresh checks each paired server's filter support once, not once per
  project; failed checks show the real error instead of "update the server",
  and the web client sends the filtered list to the runtime it checked.
- Signed-out GitLab gets a sign-in message, and an unresolved SSH project
  under a filter shows an error instead of an empty list.

Co-authored-by: Yash Kakade <yashkakade2015@gmail.com>

* fix(gitlab): pin filtered MR lists to the server that confirmed support

A refresh now shares one support check per paired server and pairing, and
the filtered list is sent to the exact runtime and pairing that answered,
so a server replaced mid-refresh can't serve "Mine" unchecked. The web
client scopes its shared check to the current pairing and reuses the
existing result unwrapping. The capability test now counts real status
probes: one per server per refresh for 12 or 120 projects.

Co-authored-by: Yash Kakade <yashkakade2015@gmail.com>

* fix(gitlab): discard filter-support answers from a replaced pairing

A paired server re-paired while Orca was asking whether it supports the
MR filter no longer leaves "update the server" from the old pairing's
answer; the check fails with the usual pairing-changed error instead.
Signed-out detection no longer matches a 401 inside a host or port.

Co-authored-by: Yash Kakade <yashkakade2015@gmail.com>

* test(gitlab): type the filter-change test's props without a cast

---------

Co-authored-by: Yash Kakade <yashkakade2015@gmail.com>
2026-11-05 23:33:39 -08:00
NeilandBing.Z 8ea884135e fix(runtime): bind serve-host terminals to their workspace at create (#38864)
Terminals a paired desktop or mobile client opened on a headless serve
host got a workspace-less serve-<uuid> session id, so the host inferred
their owner from the cwd. Folder workspaces that share a path then traded
those terminals whenever one was listed, and deleting a workspace stopped
terminals shown in another.

Serve ids now carry the workspace like every other daemon id. Inventory
refresh keeps a persisted layout binding even when a targeted listing does
not include its workspace, so restored serve-<uuid> terminals stay put.
A cwd guess is recorded as such and never drives a worktree-scoped stop.

Fixes #36716

Reported-by: Guy Shechter (@shechter)

Co-authored-by: Bing.Z <zzb@gxsmjx.com>
2026-11-05 22:53:21 -08:00
Brennan Bensonandagustin2606 e92552a413 Keep Claude plugin UI out of chat and recover blocked replies (#37965)
Keep Claude plugin status and toast frames out of native chat, and give terminal-input requests an actionable failure with safe conversation recovery. Preserve genuine outside replies while hiding internal repair content.

Tracked in STA-13468. Built on #37480 by @agustin2606.

Co-authored-by: agustin2606 <agustinvarela2606@gmail.com>
2026-11-05 22:34:16 -08:00
Neilandggbdpq ce7f68f7c0 fix(workspace): give recipe VM wakes one owner, serialized with suspends (#38842)
* fix(workspace): wake a suspended recipe VM on the host when the workspace activates

Sleeping a recipe VM workspace already runs on the host: the sleep
execution calls the platform's suspendVm, which runs the recipe's
suspend. Waking it did not — the recipe's resume only ran through the
window IPC handler `ephemeralVm:resumeWorkspace`, which the host's own
desktop renderer calls when a sleeping workspace is clicked. So a
slept VM workspace could not be woken from a headless `orca serve`
(no window), a paired client (whose renderer calls its own machine's
IPC), or the CLI; the phone hit the same wall (#34679).

Extract the wake core into `resumeEphemeralVmWorkspace` (mirroring the
host-side `suspendEphemeralVmWorkspace`), keep the window IPC a thin
caller, add the pairing `resumeVm` to WorkspaceSleepPlatform next to
`suspendVm`, and fire a queued VM wake from `activateManagedWorktree`,
the activation path every caller shares. The wake goes through the
workspace lifecycle queue like any wake: a sleep still running sees
the reopen and keeps the VM up, and a wake behind an already-finished
suspend resumes it. The wake is fire-and-forget — a recipe resume can
outlast activation timeouts — so failures land in the log and the
runtime status (resume_failed), and the next activation retries.

Desktop windows keep their IPC path; a host-side wake and a window
resume can overlap only when a phone/web/CLI activation races a window
click, the same double-resume exposure a sidebar double-click already
had.

Refs #36923

Generated-by: GLM-5.3-Flash (ZCode)

* fix(workspace): give recipe VM wakes one owner and serialize them with suspends

The window's resume IPC now goes through the runtime's WorkspaceSleepCoordinator.wakeVm.
A wake already waiting or running is joined, so one reopening runs the recipe's resume
once, and each workspace's VM suspends and resumes one at a time: opening a workspace
while its sleep is still suspending the VM now resumes it afterwards instead of racing
the suspend and leaving it asleep. Lifecycle queueing alone could not give this, since
it is off in shipped builds.

The activation-path wake is dropped: recipe VM workspaces are owned by the VM's own
server, so the host's worktree.activate never resolves them. Waking on remote
activation is a follow-up at the environment-forwarding layer.

Refs #36923

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* test(workspace): a click after a suspend started wakes the VM again

Refs #36923

* fix(workspace): serialize recipe VM wakes instead of joining them

A click could join a wake that ran before a sleep the user asked for after it,
so the VM ended up suspended though the last action was opening it. Each wake
now queues behind the VM operations before it; the recipe's resume only runs
on a suspended VM, so a wake behind another finds it already up.

Refs #36923

* fix(workspace): wake a recipe VM outside the lifecycle queue; a sleep's reopen check starts at its request

The lifecycle queue waits to observe the workspace's host before running a
command, and a suspended VM is that host, so a queued wake could never resume
it. VM operations are already serialized per workspace, so the wake runs
outside the queue. A sleep now notes reopens from the moment it is requested,
so opening the workspace while that sleep waits its turn keeps the VM up.

Refs #36923

* fix(workspace): check for a reopen when a queued VM suspend actually runs

A suspend waiting behind a resume had already checked for reopens, so opening
a slept pane during that wait still suspended the VM. The sleep now hands its
reopen check to the serialized suspend, which checks it right before it runs.

Refs #36923

---------

Co-authored-by: ggbdpq <ggbdpq@gmail.com>
2026-11-05 22:31:37 -08:00
Neil 99e750805c fix(agent-sleep): a tab a paired client is showing or typing into is in use (#38768)
Agent sleep only treated the host window's own foreground tabs and phone
driver locks as in use. A paired desktop showing a tab, or anyone typing
into it from another client, never reached the planner, so the host slept
the tab the user was looking at.

The runtime now answers "is this PTY in use elsewhere": a remote view
that reports hidden panes (it pauses output while hidden) and is not
paused, a phone driver, and the last user input from any client. The host
window asks its main process over IPC for its own PTYs; a client planning
runtime-hosted tabs gets the same facts from terminal.list
(includeAttention). The planner treats a shown PTY like a phone-driven one
and folds remote input into its input guard.

Clients too old to report hidden panes never count as showing a tab, and
hosts too old to report attention leave sleep as it was, so a missing
signal never turns into never-sleep.

Fixes #36427
2026-11-05 21:55:59 -08:00
Jinwoo Hong a57c19aa91 Resolve workspace lineage parents in one shared module (#38835)
Inert refactor: move the same-store parent rule and merged resolver into src/shared/worktree/workspace-lineage-graph.ts and add one row identity rule. No behaviour change.
2026-11-06 00:49:05 -05:00
1038adb786 fix(browser): larger tunnel windows for high-latency links, bounded by connection credit (#38839)
* fix(browser): negotiate a larger tunnel flow-control window for high-latency links

Embedded-browser tabs routed through a paired runtime (e.g. another Mac over
Tailscale) were capped by a fixed 256 KB per-stream flow-control window. That
window also bounds per-stream throughput to window / RTT: on a ~90 ms link the
ceiling is ~2.9 MB/s per connection regardless of real bandwidth, while on a
sub-millisecond LAN the same window allows ~256 MB/s, so the limit is invisible
locally and dominant remotely.

The window value is validated symmetrically on both ends (each side rejects a
credit grant above its own constant), so simply raising the constant would break
browsing between mismatched Orca versions. Instead negotiate it: each side
advertises its maximum (client in the attach params, host in the ready event)
and both use min(own, peer), falling back to the legacy 256 KB window whenever
either side does not advertise. Advertising peers settle on a 2 MB window (~8x
the high-RTT ceiling). Retained buffers and the outbound memory budget scale to
cover the larger window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(browser): track granted receive credit and scale the session retained limit

Review fixes for the window negotiation: both ends still initialized
receiveCredit to the legacy 256 KB constant while announcing the negotiated
window, so a peer legitimately using the announced 2 MB window tripped credit
validation — the client closed the tunnel and the session treated the traffic
as a protocol violation. Initialize credit to zero and assign it where the
grant is announced, so tracking always matches the announcement; a conformance
test now drives a full negotiated window in both directions unsettled.

Also scale the per-session retained-byte limit with the negotiated window
(16 windows, floored at the previous fixed 8 MB) so concurrent streams on a
slow link keep their stream-count headroom instead of being shed at four.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(browser): scale the pending-chunk cap with the negotiated window

The 256-chunk pending caps paired with the legacy 256 KB window at 1 KiB
frames. Under a negotiated 2 MB window, more than 256 small unsettled frames
fit inside the byte credit, and the receiver treated that permitted traffic
as an overflow — the session closed on the destination write path and the
client fenced the whole tunnel on the receive path. Derive the cap from the
maximum window at the same 1 KiB-per-chunk pairing (2048), keeping the flood
bound for tinier frames. The conformance regression now drives a full
negotiated window of 1 KiB frames in both directions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(browser): size claim capacity to the byte budget at chunk granularity

Each retained chunk consumes one claim, so the fixed 16,384-claim host limit
exhausted at eight stalled 2 MB windows of 1 KiB frames — 16 MiB of a 64 MiB
byte budget — and shed the next stream as a receive-buffer overflow. Derive
the claim caps from the byte budgets at the same 1 KiB-per-chunk pairing the
pending caps use, so claim exhaustion never precedes byte exhaustion for
in-protocol frames. Claims are counters, not stored entries, so the higher
caps retain no extra memory.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(browser): bound larger tunnel windows with connection-level credit

Fixes #38053

Rework the window negotiation onto a window.v2 capability: the client
advertises network.browserTunnel.window.v2 and the host echoes it on
ready. v2 tunnels add a connection window per direction (16 MiB to the
client, 4 MiB to the host) acknowledged on receipt over stream 0, so the
queued bytes on either WebSocket stay well below its overflow cap however
many streams grow, and a stalled reader cannot starve other streams.
Older peers keep the legacy 256 KiB / 256-chunk bounds.

Streams start at the legacy 256 KiB window and grow toward 2 MiB by the
bytes their reader consumes, drawing on the connection window. Growth is
charged only while a stream holds unread data: it is released when the
reader drains and recharged when data arrives again, so idle keep-alive
sockets don't hold a fresh download at legacy speed. Connection
acknowledgements are sent after the Data frame is dispatched, so a
synchronous peer cannot reorder its next frame ahead.

Tradeoff: because idle streams are not charged, an idle grown stream that
wakes and then stalls can exceed the growth pool by its own growth. The
per-stream memory budgets still fail that stream rather than the tunnel.

Co-authored-by: jeky22 <38278199+jeky22@users.noreply.github.com>

* fix(browser): keep grown tunnel windows charged until a stream is genuinely idle

Fixes #38053

Growth was released whenever a reader drained, and Chromium drains at
once, so the connection pool barely bounded growth: 16 grown downloads
that stalled together reached the 32 MiB client budget and were reset,
and 8 stalled uploads passed the host's 12 MiB retained limit.

Growth now stays charged while a stream holds it. A stream gives its
charge up only once it is idle (drained, nothing received for 1 s) and
another stream needs the pool, so kept-alive sockets still don't slow a
fresh download. A woken idle stream is charged again; while that
overcommits the pool, consuming streams withhold credit to shrink back
toward the legacy window. Zero-credit updates are not sent.

* fix(browser): charge each tunnel frame a credit floor and complete empty writes

Fixes #38053

The WebSocket queues cap frames as well as bytes, so a connection window
spent on 1 KiB frames could queue 4,096 frames and close a paired
transport capped at 2,048. Each DATA frame now costs at least 8 KiB of
connection credit on both sides, bounding queued data frames to 2,048
toward the client and 512 toward the host.

An empty write found no credit to spend and waited forever, blocking
every later write; it now completes at once.

---------

Co-authored-by: jeky22 <38278199+jeky22@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-11-05 21:47:22 -08:00
OrcaWinandOrcaWin a4cad3766b test: remove 1296 low-value mock and projection tests (#38837)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 21:39:35 -08:00
Brennan BensonandMichael Schaecher 25d677f7ad Keep app shortcuts working from the chat message editor (#38724)
* fix(shortcuts): keep app commands available from the chat composer

Resolve app shortcuts against the prompt's actual editing ownership and
preserve that ownership before native workspace-delete interception.
Keep existing custom navigation, input composition and clipboard behavior.

Co-authored-by: Michael Schaecher <276865230+big-sheq@users.noreply.github.com>

* test(shortcuts): type native input fixtures

* test(shortcuts): colocate prompt dispatcher regression

* test(shortcuts): document controlled fixture type boundaries

* test(shortcuts): use complete translation module during dispatcher setup

* test(shortcuts): commit mocked keybinding updates before dispatch

* test(shortcuts): use existing cross-process typecheck project

* fix(shortcuts): respect logical editing keys on remapped layouts

---------

Co-authored-by: Michael Schaecher <276865230+big-sheq@users.noreply.github.com>
2026-11-05 21:24:08 -08:00
Kelvin Amoaba 4f19002962 feat(mobile): render GitHub alerts, task boxes, inline tags and images in Markdown (#38809)
* feat(mobile): render GitHub alerts, task boxes, inline tags, images and footnotes

GitHub text on the phone now draws what desktop and github.com do:
> [!NOTE]-style alerts (desktop's marker rule, shared), read-only task
boxes, <sub>/<sup>/<kbd>/<ins> and <b>/<i>/<del>/<code> inline tags, https
<img> and Markdown images at their authored width, raised footnote numbers,
and #123 links in the PR view into the PR's own repository.

* fix(mobile): keep linked badges and commented images, read only pixel widths

An <a href> around inline content becomes a link, so a badge keeps its
target; images inside links, comments, icons by height, and percentage
widths stay as before. Footnote numbers follow the text scale.

* fix(mobile): keep images inside headings and styles in place, read link hrefs as HTML does

Only images that a p, div, picture or center places are cut out of HTML,
in one pass; an image in a heading, link or bold stays in its element.
Inline <a> hrefs use the shared attribute reader (quotes and entities),
<code> keeps only the text of tags inside it, and alert titles follow the
text scale.
2026-11-06 05:12:28 +00:00
Kelvin Amoaba a4e24a9e5a feat(mobile): show automatic continue and Switch Account on chat usage-limit notices (#38298)
* feat(mobile): usage-limit card with the host's automatic continue, Continue and Switch Account

* refactor(mobile): give the notice disclosure its own file to fit the usage-limit status

* fix(mobile): drop the cancel failure once the host shows the cut cancelled

* fix(mobile): keep the usage-limit status up while a later re-ask is pending

A re-ask at a new journal cursor no longer blanks the reset line and pills;
the cut keeps its last answer. Don't continue reports its disabled state.
2026-11-06 05:12:00 +00:00
Brennan Benson 6acdb0535c fix(github-project): use content values for built-in grouping and sorting (#38818)
* fix(github-project): derive built-in field display and ordering from content

* fix(i18n): register linked PR summary overflow fallback

* fix: satisfy project projection static checks

* test(github-project): cover normalized phone metadata and update field contracts

* fix(github-project): narrow optional grouping values explicitly

* test(github-project): place fixture safety rationale at assertion start

* test(github-project): isolate Node and native regression boundaries
2026-11-05 21:09:14 -08:00
Brennan BensonandMadhur 2c45641de2 fix: display Claude server tools in chat and history (#38811)
* fix: display Claude server tools in chat and history

Co-authored-by: Madhur <madhurbhawsar7@gmail.com>

* test: remove redundant fixed-output card cases

* fix: narrow Claude content guard types accurately

---------

Co-authored-by: Madhur <madhurbhawsar7@gmail.com>
2026-11-05 21:07:28 -08:00
Brennan Benson 45a468894d Show proposed files and collapsible details in Codex approvals (#37960)
Show Codex file-change proposals in approval cards and keep verbose operation details collapsed by default on desktop and phone, with reason, access and answer choices visible.

Preserve approval identity and answer behavior, keyboard focus, and scroll position when details expand or collapse.
2026-11-05 20:32:50 -08:00
Neil ac203854bf fix(cli): point positional terminal handles at --terminal (#38793)
`orca terminal read term_abc` failed with a bare "Unknown command" because the
handle landed in the command path. When a term_/structworker_ handle follows a
command that accepts a target --terminal flag, suggest the flag form instead.
Caller-identity --terminal commands are skipped. The terminal-handle prefix
check moves to a dependency-light shared leaf reused by the session-address
codec.

Fixes #38312
2026-11-05 20:20:03 -08:00
Brennan Benson b53db37643 Refuse unsafe branch switches and share one check across phone and desktop (#38744)
* fix(git): refuse unsafe branch switches in an existing workspace

The phone's Switch branch ran `git checkout` with no checks: uncommitted
files moved to the other branch, and a switch could land under a working
agent or mid-rebase. One host check now covers every client: it refuses,
with a plain reason, when files are uncommitted, a merge/rebase/
cherry-pick/revert is in progress, HEAD is detached or unborn, another
git action is running, or an agent in the checkout is working or waiting
for approval. Checks and the checkout run under a per-checkout lock.

After a switch the host clears the old branch's review links and push
target and tells every client, so a phone-only host stays correct, and
records that the user chose the branch so first-work naming never
renames it. The open Commits list follows the new branch.

* fix(git): review round 1 repairs for the guarded branch switch

- check out through the provider so the user's switch keeps the interactive git queue
- a landed switch that Windows left files behind on now tells the user instead of reporting success
- never let a Windows yes/no prompt hold the switch lock
- refuse submodule edits that submodule ignore config hides from status
- record the switch on the target host's metadata row and never fail a landed switch on bookkeeping
- read workspace paths from their ids instead of scanning the catalog on every switch
- admit agent rows like the sidebar roster (listed tab, or a live terminal by pane, tab or handle)
- move the host-side switch hooks into their own module

* test: type the new switch test fakes instead of casting them

* fix(git): second repair round for the guarded branch switch

- report files Windows left behind from git's own unlink warnings, not a status re-read, so
  ordinary branch differences and submodule commit changes are never called failures
- the phone refreshes its branch and files after a switch that landed with a warning
- refuse only edits inside a submodule its ignore config hides, never a commit mismatch alone,
  reading status without optional locks in the interactive queue
- read the agent process probe when a switch runs, not while the runtime is constructed
- check the agent's checkout path before terminal liveness and build the tab list once per switch
- the runtime wiring test no longer reaches real git

* fix(git): scope the switch's agent check to the checkout and keep landed-switch outcomes honest

- find candidate agents by checkout path first; build terminal liveness once, only from this
  checkout's terminals and its workspaces' saved tabs; probe candidates together and re-read
  the snapshot once; no work for unrelated workspaces (contract test at N and 10N)
- a checkout that fails after HEAD moved is recorded as landed; files left behind are named only
  when git reports it could not replace them, otherwise git's own error is shown
- parse git's unlink warnings for paths with apostrophes
- the phone keeps the refusal or warning visible while it reloads the branch
- cover a submodule that is only at another commit

* fix(git): name git's own error when a switch lands after a failing hook; use the shared unlink parser

* fix(git): keep the switch's agent check flat for unrelated folder workspaces

- read folder workspace directories once per switch instead of a linear search per row and terminal
- re-read each candidate's current status by pane key instead of rebuilding the whole snapshot
- skip the hidden-submodule status pass in repos without submodules
- the cost contract covers folder workspaces, many in-checkout agents and PTY passes
- a real-git test covers a switch that lands before a failing post-checkout hook

* fix(git): never quote git's progress line as a landed switch's error; fixed clock in the cost test

* fix(git): decide the hidden-submodule check from the index, not a visible .gitmodules

* perf(git): read only index modes for the submodule shortcut so large repos stay under the output cap
2026-11-05 20:16:50 -08:00
Rahul GavandeandKelvin Amoaba 8391d2e42f fix(browser): ask for Full Disk Access when macOS blocks a cookie import (#38497)
On macOS, privacy protection can stop Orca from copying another browser's
cookie database. The copy fails with EPERM, and Orca told the user to close
the browser, which does not help. Chromium and Firefox imports now show the
Full Disk Access hint that Safari imports already had.

Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
2026-11-06 04:15:30 +00:00
Kelvin Amoaba 345c326a91 feat(cli): rename a chat with orca chat rename (#38719)
Fixes #38556
2026-11-06 03:44:40 +00:00
Neil 5159aff2e2 fix(ssh): say when a managed host now serves a different Orca server, and drop the Tailscale hint on SSH tunnels (#38745)
A saved pairing refused by this host's own server (it now publishes a different key, e.g. after
the SSH User changed) now says so, names the exact recovery (Forget the server, then Connect the
host), and stops retrying, instead of blaming another Orca on the port. Servers reached through
an SSH tunnel are their own host kind, so connection failures there no longer suggest Tailscale.

Refs #37766
2026-11-05 18:29:50 -08:00
Neil 3cb4853187 Keep dropped-macOS updaters on their last compatible build and explain why (#38777)
* Keep dropped-macOS updaters on their last compatible build and explain why

Stamp minimumSystemVersion into every mac update manifest from the built
app's LSMinimumSystemVersion, and refuse to publish an ungated release.
When the updater withholds a newer release for this macOS, show a one-time
notice and say so in Settings and the update card.

* Trim the unsupported-Mac notice copy
2026-11-05 18:29:16 -08:00
NeilandcoolwindX d938f33139 fix(browser): ask a connected desktop to host when open-url finds no browser host (#38762)
A server learns of a desktop that can host its browser pages only after that
desktop opens a browser tab, so open-url failed until one existed. Desktops now
opt in on their client-events subscription. When a server-initiated page needs
a host and no lease exists, the server asks the newest such desktop to start
hosting and places the page on the lease it names. Only an explicit decline
moves on to the next desktop, so a slow desktop can never leave two leases; a
desktop that stays silent is named in the error.

When several desktops already host, the page goes to the one showing this
workspace's pages, then the newest lease, instead of failing as ambiguous, and
no desktop without a lease is asked.

Managed SSH desktops do not opt in, so their hosts keep using the desktop
browser bridge. Leases stay lazy, so an idle desktop holds none and bridge and
tab-query routing are unchanged.

Fixes #35066

Co-authored-by: coolwindX <45729206+coolwindX@users.noreply.github.com>
2026-11-05 18:19:35 -08:00
NeilandBlue Thunder Somogyi 66695b1e9d Route federation ack and import over the shared control connection (#38735)
* fix(runtime-environments): route federation ack and import over shared control

The one-second federation sync pulls over the retained shared-control
connection but sent orchestration.federationAck and
orchestration.federationImport on a fresh one-shot socket, closed on the
main thread after every tick that carries progress. On a Mac whose
network content filter holds each TCP close for about a second, that
close froze keystroke relay for the whole app.

Allowlist the two relay mutations in shouldUseSharedControlEnvelope so
they take the same support-routed path as federationPull, including the
one-shot fallback for hosts without shared control. Both handlers are
synchronous and idempotent by request id and cursor. Long-running
mutations such as orchestration.workerStart stay one-shot, and
ORCHESTRATION_MUTATION_METHODS is unchanged.

* test(runtime-environments): pin federation relay transport to shared control

Cover the transport of one federation sync tick so a change that
reintroduces a per-tick one-shot socket fails a test:

- a pull, ack and import for one dispatch open no one-shot socket beyond
  the initial status.get when the host advertises shared control, and
  keep all three on one-shot sockets when it does not
- federationAck and federationImport fall back to one-shot with their
  envelope intact when shared control is unavailable
- shouldUseSharedControlEnvelope shares control for the relay reads and
  the two allowlisted mutations, and keeps orchestration.workerStart and
  other mutations on one-shot

* fix(orchestration): prove the worker server contract once per host incarnation

Every federation mutation without caller-proven contract first fetched
status.get to check the orchestration contract capability, then sent the
mutation as a separate call. The contract is now proven once per host
incarnation (runtime id) and each later mutation is pinned to that
incarnation through the existing expectedRuntimeId routing. A restarted host
answers runtime_environment_changed before any effect; the new incarnation is
proved and the mutation resent. A downgraded restart without the contract
receives no mutation, closing the window the old probe left between its check
and the send.

Fixes #37516

* fix(remote-runtime): honour request preparation on shared control

Federation import selects the prefix of its relay batch that fits the
host's inbound request bound through prepareRequest. That preparation was
only applied on one-shot sockets, so once import moved to shared control
its full batch was sent unprepared. Shared-control requests now serialize
through the same preparation step as one-shot requests, and every route an
import can take (shared or one-shot, pinned to a runtime or not) carries it.
The orchestration transport takes prepareRequest and expectedRuntimeId as
one send-options object.

Fixes #37516

---------

Co-authored-by: Blue Thunder Somogyi <bluethunder.somogyi@bastion.com>
2026-11-05 18:19:16 -08:00
dağhan tektepe 6b9af049b4 fix(github-project): group by Parent issue using the row's parent (#38212)
GitHub returns no field value for the built-in Parent issue field, so
grouping by it put every row in "No Parent issue". Group by
row.content.parentIssue (keyed by URL so multi-repo projects with the
same issue number stay separate) and order groups by issue number.

Fixes #38099
2026-11-05 18:09:08 -08:00
Guderlilian 5ac627732c fix(editor): recognize .razor files as Razor (#38442)
Monaco registers only .cshtml for the Razor language, so Blazor .razor
components opened as plaintext. Add .razor to the Razor registration in
the association generator and regenerate the shared associations JSON.

Fixes #38380
2026-11-05 18:08:59 -08:00
gsxdsmandNeil 219dca09d0 fix(cli): refuse oversized local requests before dispatch (#37734)
The CLI now measures the serialized runtime request against the shared
1 MiB local transport limit before writing any bytes. Oversized requests
fail with invalid_argument and requestSent=false instead of being cut off
by the server mid-frame, and the client skips mutation recovery for these
unsent requests so it never suggests resending the same payload.

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-11-05 18:08:51 -08:00
Kelvin Amoaba c8c620cd21 feat(mobile): rename a workspace from the workspace menu (#38728)
* feat(mobile): rename a workspace from the workspace menu

The phone's workspace menu gets a Rename row that swaps the drawer to the
text sheet, prefilled and selected. Saving writes worktree.set displayName at
the row's owner, so server rows work too; an empty name returns the label to
its automatic branch or folder name, as desktop's Workspace details does. A
failed save keeps the sheet and text, shows the host's error and offers Retry.

* refactor: share the automatic workspace name rule with the phone's rename sheet
2026-11-06 01:52:38 +00:00
EdgerHaoandNeil 554a16f328 fix(agent-hooks): keep CodeBuddy PermissionRequest from reporting waiting (#38009)
CodeBuddy fires PermissionRequest even when its auto-review approves the
tool, so the pane flashed "waiting" for calls that never needed the user.
Real prompts still arrive as Notification(permission_prompt), so drop
PermissionRequest for CodeBuddy only; Qoder keeps the existing mapping.

Co-authored-by: Neil <neil@stably.ai>
2026-11-05 17:35:57 -08:00
Kelvin Amoaba 6bd548ba5c feat(mobile): render math in chat and PR descriptions, with GitHub's line-count table (#38682)
* feat(mobile): render math in Markdown with desktop chat's delimiter rules

Move the price, citation, closer and display rules plus the KaTeX settings
to src/shared/markdown-math-rules and point desktop chat at them. Mobile's
markdown-it gets the same grammar, and pages typeset formulas with KaTeX,
whose fonts ship as page assets. Mermaid's engine leaves katex external so
both share one katex chunk.

* build(mobile): count KaTeX fonts in the page budget and keep math to one chunk

Only the licensed terminal font keeps its own allowance; KaTeX's fonts
count toward the budget like code. The typesetter imports katex itself,
sharing mermaid's chunk, so math adds one chunk instead of four.

* fix(mobile): draw the PR line-count table's +/− glyphs at GitHub's size

github.com draws \Huge at \Large (1.44em), so the line-count table's
glyphs sit inline at text height. Cap the larger size commands the same
way, and let inline math take its height from KaTeX's struts so rows keep
normal height and numbers stay on the text baseline.

* test(mobile): pin math delimiters to desktop chat's results

* refactor(mobile): drop type assertions from the math tree nodes

* chore(mobile): register the math mdast nodes beside <details>

* fix(mobile): read bracket math only in chat, keep math parsing linear

GitHub text (PRs, Tasks, files) reads $ and $$ only, so \[Bug\] stays a
bracket; chat rows opt into desktop chat's \( and \[ too. Remember failed
block scans and skip dollar-run tails so hostile input stays linear, leave
unfinished math out of remend like desktop, bound the formula cache by bytes,
retry a failed KaTeX load, and count symbol commands in table widths.

* fix(mobile): copy formulas as TeX and keep GitHub's unclosed $$ as text

Share desktop's selection-to-TeX reader so a copied selection carries each
formula once, as its source. An unclosed $$ in GitHub text stays a
paragraph, chat's math delimiters reach HTML-derived Markdown and summaries,
failed block scans only skip openers inside the lines they read, unfinished
math anywhere in the streaming tail skips remend, and table widths no
longer spread every command into Math.max.

* refactor(mobile): share the formula copy handler and cap sizes only in GitHub text

Desktop and mobile copy through one shared handler. GitHub surfaces draw
\Huge as github.com does while chat keeps desktop chat's sizes, PR and file
text skip bracket scanning entirely, and the dollar-run scan and token
alias live in one place.

* chore(mobile): stop tracking the generated KaTeX stylesheet

#38611 committed it by mistake; postinstall writes it and .gitignore now
lists it.

* fix(mobile): follow desktop chat's new dollar rule through the shared module

#38651 changed desktop chat's inline $ rule (shell variables and prices stay
text, a single $ can span lines, $5+2$ is math). Move those checks into
src/shared/markdown-math-rules, point desktop at them, and give mobile's
markdown-it rule the same behaviour.
2026-11-06 00:53:54 +00:00
Neil 4aeda96176 Move automation run history out of the signed SSH migration manifest (#38718)
* fix(ssh): move automation run history beside the migration manifest

A host whose automations kept a lot of run output overflowed the 768 KiB
signed migration manifest, so every Connect was refused and the host was
locked out. Run history now travels as a capability-gated
`automation-run-history` blob: the manifest signs only its sha256 and
size, the destination imports the runs atomically with the catalog at
commit, and a host without the capability is refused before anything is
sent instead of importing automations without their runs. Journals and
manifests signed with inline runs are still accepted. The oversize error
now names the largest section with an action that trims it.

Fixes #37051

* refactor(ssh): read migration capabilities from their own client module

Keeps orcad-migration-catalog-client.ts within its line budget.

Refs #37051
2026-11-05 16:50:32 -08:00
Neil 2d9d71f72f fix(terminal): give remote Windows panes the ConPTY resize model (#38715)
* fix(terminal): give remote Windows panes the ConPTY resize model

A pane's xterm took ConPTY's resize rule only when the PTY was local. A
paired server or SSH target on Windows runs every PTY, WSL shells included,
through its own ConPTY, but the client grew such panes the Unix way and
pulled history into the screen. ConPTY repaints only what it believes
changed, so stale TUI frames (e.g. Claude Code's inline prompt) stayed
stranded mid-screen after a resize.

Decide the model from the OS of the machine that owns the PTY: the paired
server's status hostPlatform or the SSH target's remotePlatform. The
renderer applies it at mount and again at PTY bind, because a restored pane
can mount before the server's status arrives. Main's copy of an SSH pane
follows the same rule.

* fix(terminal): resolve the PTY owner from the bound transport and apply a late OS once

A paired server's mirrored pane can be that server's SSH target, so the
bound transport's host names the owner. A remote owner's OS can arrive
after bind; the pane stays on the Unix model and watches the store until
it is known, then applies it once.

* fix(terminal): fall back to the pane's SSH owner and stop watching owners that can't be named

When a paired server's transport can't name its host yet, the pane's own
ssh: owner decides the OS instead of the server's. A pane with no
nameable remote owner keeps its creation-time model instead of watching
the store forever. Local-owner detection lives in one helper; an
undefined connection id still means unresolved, not local.

* fix(terminal): re-resolve a pane's resize model when its transport learns the PTY's host

A reattached mirror on a paired server binds before attach metadata says
the PTY belongs to the server's SSH target, so the pane took the
server's model and stopped looking. The remote transport now notifies
when its execution host is learned or changes, and the pane re-resolves
then.

* test(terminal): justify the partial RuntimeStatus fixture with a SAFETY disable
2026-11-05 16:49:34 -08:00
Neil c0b2df5d8d fix(ssh): leave an unlinked host disconnected, and name it when a project needs its server (#38746)
Forget and Stop removed the managed server but left the SSH host's transport up with nothing
serving it, so project setup offered the host and then failed with the raw connection id.
The unlink now hangs up the host's transport inside its lifecycle, so every surface offers
Connect (which sets a server up again) and a Connect queued behind the unlink still wins.
The setup error names the host and its toast offers Connect, and the forget/stop help says
the host is disconnected.

Fixes #37767
2026-11-05 16:44:40 -08:00
Jinwoo Hong a9ba59c944 Nest workspaces under parents on other machines (#38740)
* feat(lineage): store cross-store parent links beside same-store lineage (inert)

A workspace's parent can live in another Orca store. Save that link in the
child's store under a new top-level key, crossStoreLineageByChildKey, so older
builds' same-store cleanup never reads it. Nothing writes records yet.

- Types, load normalization (malformed entries dropped one by one), section label.
- Store get/set/remove by child; a child keeps at most one parent record.
- Every maintenance path acts by the child only: deletion and missing-worktree
  pruning, repo removal and deregistered-repo residue, identity migration,
  profile project transfer, WSL move projection and UNC drive conversion, and
  the orcad migration dormant payload (export, validation, import, subtraction).

* fix(lineage): gate cross-store links on host capability; one parent per child

- Migration stage/commit carrying crossStoreLineage requires the new
  orcad.migration-cross-store-lineage.v1 capability; older hosts are refused
  before staging instead of silently dropping the links. Empty arrays are omitted.
- Payload validation and destination prepare reject a child that has both a
  cross-store and a same-store parent, through one shared conflict check.
- Saved entries stay on disk as written; the map is Record<string, unknown> and
  readers go through validCrossStoreLineage. Re-keying moves unreadable entries unchanged.
- Tests: literal expectations; drop touched mock-call and work-count assertions.

* test(lineage): drop clone and save work-count assertions from project group removal test

* feat(lineage): resolve cross-store parents into the sidebar parent map (inert)

- One resolver: a saved record nests its child under the single visible
  row whose store reports the parent's installationId and whose instance
  matches; copied installs, unknown stores and stale instances stay standalone.
- getSidebarLineageParentsByIdentity merges resolved cross-store parents with
  same-store edges before cycle breaking; a valid same-store edge wins.
- Workspace delete collects descendants only from the parent's own store.
- Store identity: paired stores from their verified status hostDescriptor;
  this store from the published descriptor, else host-installation.json.
- Nothing passes a view or writes records yet, so the sidebar is unchanged.

* fix(lineage): import WorkspaceKey from workspace-scope after main move

* fix(lineage): resolve sidebar parents once over complete rows; keep unowned rows' delete rule

- resolveSidebarLineageParentIdentities resolves same-store edges and cross-store
  records once over every visible store's unfiltered rows, then drops cycles.
  Ancestor injection and nesting reuse that map, so a filtered-out twin still
  makes a parent ambiguous.
- Removed, retired or refusing paired servers leave the view: their records stay
  saved and their children standalone. Offline servers keep their last-known id.
- A row with no owner is unknown, not ours: it never resolves, and delete only
  excludes descendants whose store is known and differs from the parent's.

* fix(lineage): refuse UNC rekey collisions and transfers giving a child two parents

The UNC drive conversion rekeys cross-store child keys through the shared
collision merge, so a UNC key and its drive key with different records throw
instead of one silently overwriting the other. Profile project transfer runs the
shared child-key conflict check before writing the target.

* feat(lineage): write, carry and nest cross-machine parents

- Capability worktree.lineage.crossMachine on the child's store; the CLI
  refuses before any request when the server lacks it.
- worktree.set / worktree.create accept crossStoreParent
  { installationId, workspaceKey, instanceId } and write only
  crossStoreLineageByChildKey (refused when it names this store, or the
  child has no identity). Remove Parent clears both.
- worktree.crossStoreParentRef: the parent's own store names it with its
  installationId; reparent refuses a parent whose chain already reaches
  another store. Same-store Set Parent refuses the same.
- worktree.ps rows and lineage lists carry the records; same-store lineage
  fields stay null so older readers show the child standalone.
- The desktop sidebar resolves parents over its own and paired stores'
  records (PR 2's resolver) at the visible-worktree and row-plan call sites.
- CLI: active/current or an inferred terminal parent against a server is
  sent as a cross-store parent.

* fix(lineage): read worktree rows through the record selector; mark the test runtime cast

* fix(lineage): hydrate every store, fence refreshes, honest CLI fallback

- Each host's catalog hydration fetches its lineage snapshot, so this
  desktop's identity and records load whichever store is focused.
- Cross-store records join the per-child request-start fence: a stale
  lineage list can't restore a removed record or override a newer one.
- A failed inferred cross-store parent sends noParent instead of
  forwarding the selector a server could match to a same-store twin.
- Inferred cross-store creates record env-workspace/inferred capture.
- The writer states its trust contract; the chain rule runs at the mint.

* feat(lineage): cross-machine parents on the phone, pickers, chat resume and labels

- Phone: the list nests a child under a parent on another machine, from the
  records rows already carry and the store identities its host verified
  (status.get descriptor; relayed servers' installationId on the host list).
- Set Parent popover, context menu and the composer's parent picker offer
  parents in other visible stores. The parent's own store names it
  (worktree.crossStoreParentRef); the window checks it against that store's
  verified installationId and the child store's capability before any write.
  Remove Parent and Open parent cover cross-machine links.
- Native chat resume ancestors follow resolved cross-machine parents.
- Host sections keep a nested child under its parent and keep its own
  machine label.
- Main sidebar feed resolves cross-store parents (rows carry records; desktop
  facts and paired-host facts carry identities); paired web windows read
  their host's installationId; reveal without an occurrence plan resolves
  them; `worktree create --agent` names a parent on another machine.

* test(lineage): type the mint test's parent row through unknown

* test(lineage): give the cross-machine tests' partial-row casts their SAFETY reasons

* fix(cli): worktree set names a parent on another machine

* feat(lineage): name the machine of parent candidates on another machine

* fix(lineage): Set Parent and Remove Parent act on the clicked row's own host

* fix(lineage): phone resolves parents over every row before the repo filter

* fix(lineage): chat resume nests by host-qualified identity across machines

* fix(lineage): local create refuses a same-install parent before checkout and shares the RPC recorder

* fix(lineage): name parent machines without a focus read; keep create's probes synchronous

* fix(lineage): chat resume keys offers by their own machine; only cross-machine parents leave a section

* fix(lineage): name an older parent server before asking it for a cross-machine ref

* fix(lineage): an app-picked parent on another machine records as manual

* fix(lineage): chat resume keeps base grouping; only resolved cross-store parents move a chat

* revert(lineage): drop chat resume from cross-machine parents; it groups by machine as before

* refactor(lineage): CLI builds cross-machine parents; explicit only

- Drop worktree.crossStoreParentRef and its reparent chain walk: the CLI
  builds the ref from this desktop's installationId (worktree.lineageList
  now reports it) and the parent row it reads. Cross-machine chains are
  allowed; same-store cycle validation and same-install refusal stay.
- No inferred cross-machine parent: remove crossStoreParentInferred and
  the fallback states. Against a server, this machine's terminal, cwd and
  env context is never sent; the CLI prints how to nest explicitly.

* refactor(lineage): build cross-machine parent refs from verified ids; pickers hide only loops; one desktop install id source

* refactor(lineage): refuse moving a linked workspace instead of carrying the link

Orcad migration and profile project transfer now refuse, before any staging or
write, when a workspace in the move has a cross-store parent record (raw entries,
readable or not). Remove the carry machinery: the dormant crossStoreLineage
field, its runtime capability and destination gate, import/subtract/claim code,
transfer carry and the two-parent conflict checker. Also drop the unused
removeCrossStoreWorkspaceLineage.

* docs(lineage): describe cross-store parent refs without the removed mint RPC

* test(lineage): drop the RPC call-list assertion from the cross-store ref test

* fix(lineage): refuse linked moves before any write and for shared-repo children

- Migration refusal passes the child's own host stamp to the scope matcher and
  refuses an unstamped key whose shared repo id the move includes, so such a
  child can't move while its link stays behind.
- Profile transfer checks the read-only source snapshot before pending-move
  recovery or storage migration; the payload check stays as the final guard.

* fix(lineage): refuse a linked profile move before the profile lookup can restore the index

* fix(lineage): startup hydration of other stores loads only cross-machine links

* fix(lineage): list the child's own machine first in the parent picker

* fix(lineage): keep profile argument errors ahead of the linked-move preflight

* fix(worktrees): let the first listing replace a restored server workspace stub

A restored active server workspace starts as a session stub with no head.
If git status fills in its branch before the first listing lands, the
listing merge took that as a concurrent branch switch and kept the stub,
dropping the catalog row (instance id, lineage, provenance). The workspace
then showed standalone until the next listing.

* fix(worktrees): accept a headless row's listing only when it confirms git status

A stale listing could otherwise roll back a branch switch git status saw on
an empty-head row (e.g. an SSH fallback row) during the first connected listing.

* feat(lineage): CLI nests a create on another machine under the caller workspace

- No parent flag and no --no-parent against a server: the caller's workspace
  on this machine (env, else cwd) is sent as an inferred cross-store parent,
  the way --parent-worktree active builds it. The host records it as
  inferred from environment or cwd.
- A server without worktree.lineage.crossMachine, or a caller workspace that
  can't be linked, still creates unnested and prints one note.
- An inferred parent falls away for folder targets, as same-machine folder
  creates record none.

* fix(lineage): CLI cross-machine inference reads the caller terminal and suppresses fallbacks

- The caller terminal's workspace joins env and cwd as an inferred parent,
  with same-machine precedence: env and terminal must agree, cwd only alone.
- A fallback (old server, unlinkable or unresolved caller, ambiguous cwd)
  prints one note and sends noParent, so the server's own create-time
  inference can't nest what the CLI reported as not nested.

* feat(sidebar): drag a workspace onto one on another machine to nest it

Dropping a workspace on a workspace from another machine now sets the
parent through the same cross-machine path as Set Parent: same eligibility
(loops, older servers), same refusal messages. Drop targets carry host
identity so the child's own copy is the one written.

* refactor(lineage): this machine's Orca resolves the caller parent for a create on another machine

- New read-only worktree.resolveCallerParent runs the same-machine create
  resolver over the caller's env, terminal and cwd context, so stale
  contexts are skipped and only validated parents can conflict, and returns
  the cross-store ref or a reason.
- The CLI's own precedence and terminal lookup are removed; it keeps the
  capability gate, one note with noParent on any fallback, and silence with
  no Orca context.

* feat(orchestration): remote worker-start --worktree new-child nests under the coordinator's workspace

worker-start --on <server> --worktree new-child creates the server's worktree
under the coordinator's workspace on this machine, using the same verified
cross-machine parent ref as the CLI's caller auto-nest. A server without
cross-machine parents still starts the worker, top-level, with a warning in
the receipt. Guide, CLI help and docs describe it.

* fix(lineage): resolveCallerParent reads this store's identity without creating it

- Uses the published host descriptor's installationId, else the existing
  host-installation.json; never creates or repairs it. Missing identity
  returns a reason, so the CLI creates unnested with its note.
- Drops the read-only wording: parent resolution does the same catalog
  upkeep a same-machine create does.

* fix(sidebar): validate every cross-machine parent before a multi-select drop writes

A drop of several workspaces builds every cross-machine parent ref first, so an
older server's refusal leaves the whole selection unchanged. Drops the touched
preview-timing test cases.

* refactor(orchestration): build the remote new-child parent ref with the shared caller resolver

Orchestration still picks the caller workspace; resolveCallerParentForAnotherStore
verifies it and builds the ref, and both read the installationId the same way.
Drops the copy and mock-call tests.

* fix(lineage): narrow the inferred source with a guard instead of casts

* fix(lineage): a composer parent picked on another machine nests normally once the destination is that machine

The retained host-qualified pick is classified against the current destination:
same host gives the ordinary parent fields, another store the cross-machine ref.
Also corrects two stale comments.

* perf(lineage): read only the requested child's cross-store entry

* perf(lineage): request each store's lineage list once at startup

* perf(lineage): cap optional caller-parent inference at 3 s and skip a timed-out local Orca

* perf(lineage): return cached sidebar parents when selector inputs are unchanged

* fix(lineage): snapshot selector inputs without a type assertion

* Route startup lineage and the sidebar lineage memo through their owners
2026-11-05 19:42:19 -05:00
Neil 61803ba8ba fix(orcad): a supervised server does not start without its terminal daemon, and orcad defends its instance lock (#38709)
* fix(orcad): yield a lost instance lock and refuse non-durable terminals under a supervisor

Fixes #37605

* fix(orcad): treat an unstattable lock as unproven; scope supervised help to orcad

Fixes #37605

* fix(daemon): report fresh-terminal ownership from current spawn routing

Fixes #37605

* fix(daemon): narrow fresh-spawn routing check to degraded providers

Fixes #37605

* test(orcad): cover lock-loss yield and fix stale test paths after rebase

Fixes #37605
2026-11-05 16:41:49 -08:00
Neil 6077bbaf7a Download a granted host file in pages instead of whole (#38693)
* fix(files): download a granted host file in pages instead of whole

A paired host serves a file outside every workspace only through its
terminal grant, whose read is whole-file, text-only and size-capped, so
Shift-click and "Download & open with default app" on such a file opened
it in Orca with "too large" or "binary" errors instead of downloading.
Hosts now page a granted file through files.readTerminalArtifactChunk,
behind a capability, and downloads stream through it like workspace files.

Refs #35968

* fix(files): pin a granted file's ctime so a large download can't mix versions

Files above the digest cap are pinned by stat alone, and utimes can put a
rewritten file's mtime back. ctime moves on every write and can't be reset,
so a same-size in-place rewrite now makes the grant stale.

Refs #35968

* fix(terminal): let a newer link click win over a granted download's host check

Refs #35968

* fix(terminal): drop a superseded granted download whatever the host answers

Refs #35968

* test(files): wait out a coarse ctime tick before rewriting a granted file

On filesystems that stamp ctime in coarse ticks, a rewrite right after the
grant could keep the granted ctime and make the stale-page test flaky. The
test now rewrites until the ctime moves. Also corrects a comment that said a
grant can't be downloaded.

Refs #35968

* style(files): format the granted chunk capability constant

Refs #35968
2026-11-05 16:35:12 -08:00
Brennan Bensonandggbdpq ca971bba2e Clear a Claude permission wait when Claude ends the request itself (#38648)
* Clear a Claude permission wait when its tool batch ends

When Claude ends a permission request itself (prompt timeout, built-in
safety check, non-interactive denial), no Post* hook fires, so the
terminal kept showing "needs permission" for the rest of the turn while
Claude kept working.

Claude 2.1.118+ sends PostToolBatch once every call of a model step has
resolved, listing each call's tool_use_id. Install it (not for
OpenClaude), name each PermissionRequest's request from the matching
PreToolUse in the listener, and settle a held wait only when its own
batch lists that request, locally and over SSH/WSL relays (live and on
reconnect replay). Elicitation dialogs, unnamed waits, newer prompts and
finished turns are left alone. The offline hook spool skips the batch
event, which carries every call's output.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* Name a permission from its open call and keep held prompts across sibling results

Parallel calls interleave their hooks, so a PermissionRequest is named
from the one open PreToolUse it matches rather than the latest one. A
subagent's sibling result no longer restates its wait over a held
prompt row, a subagent's settled request can't clear the lead's own
open prompt, and retention reads only the entries the history keeps.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* Keep the pane waiting while any other permission request is open

The listener's single wait slot holds only the newest prompt, so a
batch now settles a wait only when no other open call still has a
pending permission request. This replaces the missing-saved-state
guess, which missed two concurrent subagents and stranded a subagent's
wait after a relay restart. A fresh session start, not compaction or a
child, retires open calls, and a batch's id list is read once.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* Skip a spaced batch event in the offline spool and pin batch-read cost

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* Settle a self-denied wait only while no other prompt is open

Orca keeps one wait per pane, so overlapping prompts can't be settled
one by one yet. A batch now leaves every held row alone while another
call still waits on the user: a permission request, or a question from
its PreToolUse. A stopped subagent's calls retire, and a call that waits
on the user is never evicted by the open-call bound. Overlapping prompts
keep today's behaviour and never show working while one is open.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* Count open MCP dialogs and unmatched requests as waiting on the user

An Elicitation now waits in the open-call registry until its
ElicitationResult (matched by elicitation_id), and a PermissionRequest
that matches no observed call still records an entry that waits until
its owner stops or the turn ends. Either keeps a batch from clearing
the pane while that prompt is still on screen.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* Keep tool calls apart from waits Orca cannot identify

An MCP dialog is now identified by its owner, server and elicitation id, so a result ends only that dialog. A dialog without an id, or a permission request whose call was never seen, is an unidentified wait that only a stop, turn end or fresh session retires. Only real tool calls name a request or settle by id, so an internal key never reaches the status row.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* End a call only from its own agent and keep lead prompts across task notifications

A tool result or batch now ends only a call opened by the same agent, so a reused id cannot end another agent's prompt. An injected task notification is not a new user turn, so it no longer retires the lead's open prompts.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

* Show the offline spool skips Claude tool batches

Co-authored-by: ggbdpq <ggbdpq@gmail.com>

---------

Co-authored-by: ggbdpq <ggbdpq@gmail.com>
2026-11-05 16:31:58 -08:00
Brennan Benson c7eae748d8 fix(tabs): a session's own name replaces a quick-command tab name (#38677)
* fix(tabs): a session's own name replaces a quick-command tab name

* fix(tabs): only a session's own name replaces a quick-command tab name

Session titles now say whether they are the session's own name (a rename
or a provider-generated name) or a stand-in such as the first prompt. A
quick-command tab keeps its label until the session has a name; a name
typed on the tab still wins. Titles from older hosts and saved tabs with
no kind keep the label; old saved titles are asked for once.

* fix(tabs): classify History-cached titles for session-id-only title requests

* fix(tabs): keep a cached session title when its transcript cannot be reread

* fix(tabs): keep a session title when its classification reread fails

* fix(tabs): keep the transcript for an unclassified cached session title

* test(tabs): keep the cached-title fixture's agent literal
2026-11-05 16:30:03 -08:00
Brennan Benson 64ad230648 Open a terminal when splitting a Chat UI pane (#37984)
* Open a terminal when splitting a chat pane

* Clean empty terminal splits after remote creation settles

* Align retained menu test with terminal split labels

* Verify translated terminal split rejection messages

* Load remote regression dependencies in suite setup

* Keep split actions searchable by chat context and terminal terms

* Preserve later workspace selection when splitting into a terminal

* Use the existing group argument in terminal creation control

* Preserve existing split searches when opening terminals

* Rank eligible palette actions before checking split results

* Describe terminal splits accurately in the chat tour
2026-11-05 16:23:58 -08:00
Jinwoo Hong 611feba7cc fix(terminal): press Enter once the composer shows the pasted prompt (#38401)
Press Enter once the composer shows exactly the pasted prompt, instead of waiting for a quiet screen that background work never gives.
2026-11-05 19:13:10 -05:00
Jinwoo Hong 0fe7a0beed fix(orchestration): hold mail behind a draft typed into OpenCode (#38451)
Hold orchestration mail behind a draft typed into an OpenCode composer (1.x and 2.x).
2026-11-05 19:09:51 -05:00
Brennan Bensonandyu.xia 369e23b084 fix(git): keep the agent-terminal credential guard scalar-only so env scrubs can't break git (#38716)
* fix(git): keep the agent-terminal credential guard scalar-only so env scrubs can't break git

Agents that scrub env names matching KEY/TOKEN/... (DeepSeek Harness) dropped
GIT_CONFIG_KEY_n but kept GIT_CONFIG_COUNT, so every git command in those
terminals failed with "missing config key GIT_CONFIG_KEY_0". GCM_INTERACTIVE
already carries credential.interactive and suppresses GCM's GUI, so the guard
now emits only scalar variables. Tracked in #26594.

Co-authored-by: yu.xia <yuxianice@163.com>

* chore(git): drop stale indexed-config comments and a dead WSL forward branch

---------

Co-authored-by: yu.xia <yuxianice@163.com>
2026-11-05 16:04:25 -08:00
Kelvin Amoaba 9b2427b958 fix(mobile): say why an agent set to Chat opened as a terminal (#38696)
* fix(mobile): say why a chat launch started a terminal instead

When the host falls back to a terminal for an agent the user set to Chat
(for example Antigravity without its chat runtime installed), show the
host's reason in the launch toast instead of opening a CLI silently.

* fix(mobile): skip the fallback notice for agents that have no chat

* fix(mobile): keep the launch notice toast up long enough to read

* refactor(agent-launch): own the chat-fallback rule in the launch contract
2026-11-05 23:48:01 +00:00
Neil 71d4e9be16 fix(ai-vault-search): let a paired desktop resume session search hits (#38707)
A paired desktop (client kind 'runtime') was classified with phones as an
untrusted relay caller, so the host stripped resumeCommand and filePath
from search hits and the desktop stripped them again on receipt. The same
pairing already returns those fields from the session list, so Resume in
New Tab worked from the list but was disabled for the same search hit.

Classify by client kind once: phones keep the redacted view, paired
desktops get the same fields the session list gives them.

Fixes #38555
Reported by @ArtemMakaryev
2026-11-05 15:16:36 -08:00