Commit Graph
20254 Commits
Author SHA1 Message Date
Jinwoo Hong e8d7da029c An e2e test cuts the window's layout feed mid-session and checks it recovers and survives a restart (dark, layout-owner build only) (#30574)
* test(layout): an e2e ends the window's layout stream mid-session and checks the reopen and a relaunch (dark, layout-owner build only)

* test(layout): the stream-loss e2e covers main's change during the gap deterministically and reuses the shared pane-tree and frame readers (dark, layout-owner build only)

* test(layout): the stream-loss e2e names how long main's create took when it misses the reopen window (dark, layout-owner build only)
2026-10-19 01:45:27 -04:00
Brennan Benson 3ef5a46061 Revert "fix(native-chat): Claude, Pi and ACP chats are Working only while the agent holds the send (#30134)" (#30572)
This reverts commit fc925c3e9b until the real fix for STA-11160 lands.
With it, `orca orchestration worker-start --agent claude` shuts a new Claude
chat worker down right after Claude acknowledges its task: between the echo
and the accepted row the send reads as no longer held, settlement reports it
unknown, and worker-start tears the session down.

Conflicts with #29150 were formatting only; resolved to the pre-#30134 code.
2026-10-18 22:40:49 -07:00
Neil f48123e89a feat(agent-status): show OSC 7501 program status in rows and tabs (#30262)
Builds on the program-status core:

- A determinate progress ring replaces the working spinner when a program
  reports progress (rows and tabs; percent only in tooltip/aria), in the
  attention tone while blocked. The working color becomes the
  --agent-working token.
- Non-agent programs (brew, terraform, …) get their first letter as icon.
- The program's own one-line message shows as the row preview, a failed
  program reads "Failed: <message>", and a block such as sign-in that the
  row's state does not show raises attention.
- A finished program's result outlives its exit until the next keypress or
  command in that pane, as the protocol asks; real agents are unchanged.
2026-10-18 22:36:33 -07:00
Neil 07bf286c7b build: use the shared pnpm store on Windows by default (#30565)
Without the symlink privilege pnpm links the global virtual store with junctions,
which standard users can create. Verified on Windows 10.0.26200 at medium
integrity with no SeCreateSymbolicLinkPrivilege and Developer Mode off: the
install, both native runtime checks, a ConPTY spawn and windows-process-tree all
pass. ORCA_PNPM_GLOBAL_VIRTUAL_STORE=0 still opts out; CI stays off.
2026-10-18 22:32:45 -07:00
Jinwoo Hong 3051b7b671 One background-process read of "Notify About Hidden Workspaces" for phone pushes and the host unread flag (#30571)
* refactor(notifications): one host read of Notify About Hidden Workspaces, used by phone pushes and the host unread flag

* fix(notifications): folder chat phone pushes read the folder's name; skip the hidden check with no Filters switch on
2026-10-19 01:30:52 -04:00
Brennan Benson 62975d6bfe fix(sidebar): run previous and next worktree shortcuts from a text field (#28891)
* fix(sidebar): run previous and next worktree shortcuts from a text field

The worktree list swallowed every key while a text field was focused, so the bound shortcut did nothing in chat, markdown, and the code editor.

* fix(sidebar): keep the default worktree chord with text fields

Previous/next worktree now carries a text-field rule in its keybinding definition. In a text field the default Cmd/Ctrl+Shift+Up/Down keeps its select-to-start/end meaning, while a chord the user bound still switches worktrees from chat, markdown and the code editor. Option and AltGr chords that type a character stay with the field.

* fix(sidebar): let user-bound Option arrow chords leave text fields

On Mac only Option chords that type a character or dead key stay with a focused text field, so a bound Option+Down now switches worktrees from chat, markdown and the code editor.
2026-10-18 22:26:24 -07:00
Brennan Benson 05688e7856 fix(git): stop starting Git in deleted project folders and for removed projects (#28822)
* fix(worktrees): skip Git sweeps for missing repo folders

* fix(worktrees): skip missing roots in headless scans

* fix(worktrees): check missing roots at Git listing boundary

* test(git): treat branch removal fixture as existing repo

* test(git): keep mocked worktree roots present for Git cases

* test(git): await host preflight in scan sharing fixtures

* revert(worktrees): drop the listing pre-check for missing repo folders

Reverts 82ccf05a4d, 13854fd3dc, c19604012a, 3f1b7ef64c, a868225608
and 962d9218c2. The reader-level stat ran in the wrong WSL distro, added
a wsl.exe spawn per listing, and only covered git worktree list. The next
commits replace it with a gate at the shared Git runner.

* fix(git): stop spawning Git in deleted native project folders

A registered project whose folder was deleted spawned a failing Git
process (spawn git ENOENT) on every sweep: git worktree list and the
git remote probes. The shared async Git runner now remembers, in memory,
a native cwd once a spawn ENOENT is followed by a definitive lstat
absence. Later calls for that cwd re-check with lstat before admission
and, while it is still absent, reject with the same spawn ENOENT shape
without starting a process. The entry is dropped as soon as the folder
exists again. WSL routes and UNC paths are never recorded, so their
behavior is unchanged.

The fenced-output readers move unchanged to captured-git-output.ts so
git-exec-file.ts stays under the file-length limit.

* fix(github): skip queued PR refreshes for removed projects

A PR-status refresh queued before its project was removed still ran
and probed Git (git remote) against the removed path. The drainer now
re-checks registration for each entry before any Git or GitHub call,
using the same predicate the refresh IPC entry points use, so every
removal path (sidebar, CLI, phone, closed window) and the rate-limit
re-queue are covered. The skip mirrors the existing not-visible skip,
so there is no new skip reason on the wire.

* fix(git,github): skip missing folders without a span; pure refresh registration

Round-2 review fixes.

- The known-missing-folder check now runs before withGitSpan in both
  async runners, so a skipped call starts no process and writes no
  git.exec span. The command is resolved lazily, only for a cwd already
  recorded, and the git.known_missing_cwd attribute is gone.
- The gate uses stat, which follows symlinks the way spawn's chdir does,
  so a symlinked project root whose target is gone is recorded too.
- The Set is re-checked after the stat, so concurrent first failures
  record and warn once.
- The PR-refresh drain check is now a pure predicate: is a project still
  registered at the candidate's path on its execution host. It reads the
  store each time and no longer resolves runtime Git options, which could
  throw inside the drain loop. Matching by path and host, not repo id,
  keeps a re-added project's coalesced refresh from being dropped.

* refactor(git,github): one wrapper per Git runner; drainer holds its check

Tripwire re-plan cuts, no behavior change except one Windows edge.

- The missing-folder gate is a single wrapper around each exported async
  runner (gitExecFileAsync outside the fetch-head lock, and
  gitExecFileAsyncBuffer). It decides "native" from the call's inputs
  (cwd set, not UNC, and no WSL distro on Windows) for both recording and
  checking, so the early command resolution and the second filter are
  gone. The span bodies are back to main's code.
- A Windows WSL project's linked worktree that runs host Git on a drive
  path is no longer recorded; before, it was recorded but never gated.
- The synthesized error is built from constants (spawn git ENOENT, empty
  stdout and stderr). Nothing reads spawnargs, and the buffer runner's
  only caller reads code and message.
- The drainer holds the registration check the way the event publisher
  holds its outcome observer, and the registration skip shares the
  existing not-visible skip.
2026-10-18 22:25:27 -07:00
Brennan Benson 8250c93f3e fix(sidebar): show the project name on ungrouped compact cards (#28890)
* fix(sidebar): show the project name on ungrouped compact cards

Compact and new-card layouts kept the project in an icon chip, with the
name only in a tooltip. The chip now shows the project name when the
sidebar is not grouped by project.

* fix(sidebar): show the project name on pinned chips too, muted and lowercase

* docs(sidebar): describe repo identity placement, not the chip's contents

* fix(sidebar): keep emoji project icons inside the chip
2026-10-18 22:24:47 -07:00
Brennan Benson 80e2c68058 fix(mobile): one button style for the session header and tab strip; size tabs to titles (#29222)
* fix(mobile): put the session tabs in the top bar on a landscape phone

A sideways phone is about 390pt tall and the session header spent two rows
on it. On a landscape phone the tab strip now shares the top bar with the
back button, title and panel icons. Portrait and tablet layouts are unchanged.

* fix(mobile): give session tabs side borders and a filled active tab

In the landscape top bar the tabs sat between the title and the panel
icons with nothing marking where one tab ended. Each tab now has a 1pt
border on its sides, running the full height of the bar, and the active
tab gets the raised fill, as the desktop tab strip draws them. The same
strip is used in portrait, so both orientations match.

* fix(mobile): one button style for the session header and tab strip; size tabs to titles

The header had three button sizes and the new-tab and quick-commands
buttons were bare 16pt glyphs in a 40x36 area with no extra touch room,
so "+" was hard to hit. Every header and tab-strip button now uses the
same 36pt rounded button with an 18pt icon and a 44pt touch area. Tabs
size to their titles (44 to 128pt) instead of a fixed 128pt, the strip
row is 44pt, terminal tabs get a terminal icon, and tabs expose the tab
role and selected state to screen readers.

* fix(mobile): reset tab strip measurements on view attachment

* style(mobile): format tab strip ref dependencies

* fix(mobile): reserve independent header button touch targets

* fix(mobile): type header button test against its component

* fix(mobile): keep two header rows in landscape windows too narrow for top-bar tabs

A short, narrow window (a ~390x350 web window) is wider than tall, so it
counted as a landscape phone and moved the tabs into a top bar that has no
width left for them. Top-bar tabs now also need at least 568pt of width,
the narrowest landscape phone.

* fix(mobile): give the landscape top-bar tab strip a fixed left edge so scrolled tabs never read as part of the title

* chore: recompute mergeability after retarget to main
2026-10-18 22:20:15 -07:00
Neil d45894c280 test(floating-terminal): mock the bulk-close confirmation the panel suite cannot render (#30568) 2026-10-18 22:13:10 -07:00
Neil e3c9370da4 feat(agent-status): read OSC 7501 program status beside hooks (#30261)
Programs can tell Orca what they are doing through the Program Status
Protocol (OSC 7501); Claude Code, Codex, Grok, pi and oh-my-pi already do.
Orca answers the protocol's feature-detection probe (visible xterm and the
hidden-pane emulator), parses reports from PTY output on the execution host
(src/shared/program-status/), and keeps two lanes:

- Lifecycle state keeps one owner per pane. Hooks win; OSC 7501 drives the
  row when hooks are off, missing, or silent on a state the program has
  left (server/program-status/hook-precedence).
- The program's own report (progress, its one-line message, blocks such as
  sign-in) is a live-only `programStatus` facet kept per pane
  (server/program-status/facet-store), stitched onto rows at publish time
  and carried to the renderer store, mobile, paired clients and
  `worktree ps`. Facet-only changes patch just the facet.

Title-driven readers (idle edges, delivery, tui-idle, exit inference)
classify by the program's OSC 7501 activity while it reports one and fall
back to title glyphs only for agents that report nothing explicit, so they
keep working when Claude stops painting its title glyph after the probe.
2026-10-18 22:12:37 -07:00
Jinwoo HongandClaude 70d00aa8c5 refactor(agent-status): one live agent transition detector in main, read by the sort stamps (#30532)
* refactor(agent-status): one live agent transition detector in main, read by the sort stamps

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

* fix(agent-status): isolate transition readers from each other; doc touch-ups

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

* chore: rewrap the stamps producer doc; restore the console spy in a finally

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

* test(sort-stamps): name the title-to-hook handover gap the flip must close

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

* fix(agent-status): forward every hook observation so the stamps hand title panes to hooks as before

The stamps producer applied only the detector's transitions, so a pane its title
showed as Working kept that tier when its first hook row was a finish, a stop, or
had no workspace. The detector now reports each live look at a pane's hook rows;
the producer applies those exactly as it applied store reads. One workspace type
and comparison. Startup-test fakes gain the runtime's new members.

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

* test(sort-stamps): pin the title-pane preconditions and a no-workspace row at attach; doc wording

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

* refactor(runtime): move the agent transition wiring into its own runtime layer; one workspace type

orca-runtime.ts was over the max-lines limit. The detector and attachAgentStatusStore
now live in OrcaRuntimeWithAgentTransitions, and the sidebar layer overrides the
attach to subscribe its producers first. Sort-stamp records use AgentPaneWorkspace.

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

* chore(runtime): name the new base in sidebarFactsRuntime; accurate attach comment

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 00:45:08 -04:00
NeilandClaude Opus 5.5 c54e9fb497 fix(wsl): repair main typecheck after ssh-connection-utils split (#30566)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 21:42:09 -07:00
Brennan Benson fc0d3d2f8f feat(native-chat): /resume in a structured chat opens Agent Session History (#28133)
* Give Session History's rows one decision for open and resume

A session row decided "can ▶ resume this" twice: once for the button's
disabled state and again inside its click handler, and the chat/CLI and
switch-to-pane offers were each gated inline. A second caller of those
offers would have had to copy the same conditions again.

- One projection, resolveAiVaultSessionRowChatActions, now decides every
  open/resume offer a row makes; ▶'s greyed-out state and its target come
  from the same value.
- The panel's host-scope menu and per-session resume lookups move into
  their own hooks unchanged, and the session-list request reads the
  panel's workspace through one selector.

The sidebar behaves exactly as before.

* Let Session History host a chat-bound panel with keyboard selection

A second Session History panel (the /resume dialog that follows) needs
to describe a chat's own workspace rather than the active one, and to
let ↑/↓/Enter pick a row. Mounting it beside the sidebar also exposed
a place where two panels stepped on each other.

- AiVaultPanel takes an optional workspace, an initial query, a header
  action slot, a small search handle, and onSessionOpened, which also
  turns on row keys. A thin sidebar wrapper now owns Settings' "focus
  the search" request, so only the sidebar widens to All.
- Keyboard rows store the chosen row, its session and the search text;
  a session listed twice no longer traps the arrows, and editing the
  search starts again at the top match. Enter takes the row's best
  offer: switch to it if open, else open it as a chat, else the row's
  own ▶, else show details. A clicked row moves focus to the panel, so the
  keys keep working, and a row scrolled into view stops below the
  pinned group header.
- Switching to an open session reports whether it found something to switch to.
- Mounted panels share one copy of the saved view options, so a filter
  changed in one is not undone by the other.

* Make /resume in a structured native chat open Agent Session History

Resuming a past session was only reachable from the Agents sidebar, so
people in a chat had no way to find it. In a structured native chat,
/resume [search] now opens Agent Session History for the chat's own
workspace in a dialog, with the search filled in.

- The dialog lives in the app's modal slot: a dialog rendered inside a
  chat would bubble its key and pointer events through the chat's own
  capture handlers. It closes once the tab on screen changes or a
  switch to an open session succeeds; a failed action leaves it open.
  Focus goes back to the chat unless the user was taken elsewhere.
- /resume is an ordinary row in the structured chat's / menu, in place
  of an agent command of that name, or last when there is none. A skill
  named resume keeps its own row and a picked skill still goes to the
  agent. Typing it in any case opens the dialog; attachments stay.
- Terminal-backed chats (SSH, WSL runtimes, custom start folders,
  reused terminals, older hosts) are unchanged: /resume reaches the
  agent as before. The phone is unchanged too.

* Start /resume's Session History on the chat's own agent

The dialog's agent filter starts on the agent recorded for the chat, the
same one its tab icon shows, and stays local to the dialog: the sidebar's
saved filter is never read or written by it. Sort, grouping and limit stay
shared. An agent the filter doesn't list leaves every agent shown.

* Start an OpenCode chat's Session History on both OpenCode names

A structured OpenCode chat records its provider as opencode, but the
scanner lists current OpenCode sessions as opencode2, so filtering on the
recorded name alone hid every OpenCode row, the chat's own included.

* feat(native-chat): /resume rows resume the conversation in place of the chat

In the /resume dialog a row is now only a "resume here" target: clicking it
or pressing Enter opens the picked conversation as a chat right after the
chat /resume was typed in, and closes that chat once the new one is
confirmed and the old one is idle. A conversation already open elsewhere is
switched to, the chat's own conversation just closes the dialog, a closed
chat of this workspace and agent is reopened in its place, and anything else
only expands its details. A failed resume closes its own tab and leaves the
old chat as it was.

Dialog rows drop every other action (overflow and context menus, title drag,
hover buttons, detail and subagent buttons); the chevron still shows the
details. The dialog widens from 480px to 560px. The sidebar's Session
History panel is unchanged.

* test(native-chat): type the launch-plan mock in the /resume flow test

* fix(native-chat): find the reopened chat by its tab, typed test settlement

* fix(native-chat): /resume picker review fixes (R5)

- Subagent lines in a picker row offer no View Log either (resume null switches them off).
- An unsaved row in the picker drops the "open the log" hint, since the picker has no log button.
- The sidebar title drag handler is restored, so a row whose resume is disabled still blocks text drags.
- Only a failed resume closes its new tab; an unknown outcome keeps both tabs (the new one has its own badge and Retry).
- The replaced chat closes only when its last turn finished, its composer draft is empty, and it is not pinned.
- One pick at a time: a pick is ignored while an earlier one is still settling.

* fix(native-chat): a new, empty chat is idle for /resume replacement

A chat with no status entry closes when its launch has finished and its host,
observed live, reports no message and no provider still starting. Still-starting
and unobservable chats stay open.

* fix(native-chat): /resume knows a stale row's open chat; no Copy in picker details

- A row listed before its chat took the conversation over has no ownership link.
  The pick now also reads each open chat's own record (its host status feed's
  provider session, else the conversation its launch resumes): the chat /resume
  was typed in just closes the dialog, and another open chat is switched to,
  instead of trying the takeover again and failing.
- The first prompt's Copy button is hidden in picker rows (same switch).

* fix(native-chat): act on the host's ownership verdict for stale /resume rows

Drop the renderer's own "which chat holds this conversation" lookup: it keyed on
the record's head handle, which differs from the host's ownership key (Pi rows,
older chain links). Instead, when a resume-here launch is refused because the
conversation is held elsewhere, the refusal's owner decides: this chat closes the
picker, another chat is switched to, the temporary tab closes, and no failure
toast is shown. Rows with an ownership link keep the existing fast path.

* refactor(native-chat): share the composer editor setters with the /resume hook

Keeps NativeChatComposer under its line cap once current main is merged in.

* feat(native-chat): /resume replaces its chat, asking first only when the agent is busy

Picking a row now always closes the chat /resume was typed in once the picked
conversation's chat is confirmed, pinned or not; the unsent-draft and
finished-turn checks are gone. When that chat's agent is replying, waiting on an
approval or question, or still starting, Session History closes and a small
"Replace this chat?" prompt asks first; Cancel or Esc changes nothing.

The prompt reuses the shared confirmation dialog with a new compact look
matching the close prompts.

* fix(ui): compact confirmation look through dialog title/description sizes

The primitives own their typography, so the short close-prompt look is a size
variant on DialogTitle and DialogDescription rather than class overrides.

* fix(native-chat): command picker takes the full structured transport

* fix(ui): compact confirmation width through a DialogContent size

The /resume replace prompt matches the close prompts width (max-w-sm) via a
compact size on the primitive; callers that pass no size render as before.

* fix(editor): pan-zoom dialog props keep their own image size

DialogContent now has a size prop; the pan-zoom dialog s size means the image, so
it is omitted from the inherited props.

* fix(native-chat): /resume asks when the chat's state is unknown; prompt ignores the opening gesture

- R8-1: a chat whose host isn't observed live (old host without the status feed,
  lost contact, no host stamped on the tab) counts as busy, so replacing it asks.
- R8-2: the confirmation dialog takes ignoresOpeningGesture: an outside press
  doesn't dismiss it, a repeated Enter doesn't confirm, and a double-click's second
  click doesn't press Replace. Other callers are unchanged.

* Point the resume-command test at the moved picker-items module

* Reopen a closed owner in place of the chat on a refused /resume

A row listed before its conversation was adopted has no structured link, so /resume launches a new chat and the host refuses it, naming the closed chat that holds the conversation. That branch reopened the owner but never closed the source chat. Both the reveal path and the refusal path now share one reveal-in-place step; an owner open in another tab is still switched to and the source kept.

* Put a reopened chat in the replaced chat's slot

Reveal appends the reopened tab to the end of its group, so a /resume that reopened a closed chat left it after unrelated tabs. Move it right after the source with the existing anchor-insertion helper before the source closes, the way a new chat lands.

* Keep the typed search when the /resume row is picked

With the caret right after /resume and a search typed past it, picking the menu row opened Session History with an empty search. Read the search from the draft, as a typed send does.
2026-10-18 21:38:28 -07:00
Jinwoo Hong 535e995565 fix(relay): log controls a cell closes after host proof but before wiring (#30559)
* fix(relay): log controls a cell closes after host proof but before wiring

* fix(relay): log a pre-refusal hang-up as the hang-up and share printableCloseReason

* refactor(relay): move printableCloseReason into its own module to break the import cycle

* test(relay): assemble the fake pg URL at runtime so the secret scan passes
2026-10-19 00:36:10 -04:00
Brennan Benson 9a662c3980 Native chat: rewind works at any chat length (#30394)
* fix(native-chat): rewind works at any chat length

Rewind copied the kept part of the chat into its saved record and, for
Codex, re-read and re-translated the whole provider history before and
after the revert. Both were bounded (10,000 rows / 2 MB host, 1,024
entries / 2 MB Codex), so long chats were refused with "too long to go
back in".

The record now names the cut; the kept rows are derived from the
journal, which keeps the old epoch until the rewind completes. Codex
reads only the turns it undoes and trusts thread/revert; recovery
proves an applied revert from the newest turn alone and never
truncates otherwise.

* test(codex): type the rewind fixture's page params instead of asserting them

* fix(native-chat): rewind recovery reads the provider handle only from a record that exists

* test: run the rewind cut test in the SQLite runtime project

* fix(native-chat): omit rejected submissions from rewound history
2026-10-18 21:35:31 -07:00
Jinjing 43a6cfe538 Confirm before bulk-closing tabs (#30551)
* Confirm bulk tab closes before closing tabs

Close Others, Close Tabs to the Left/Right, and Close All Editor Tabs now
show a confirmation dialog first, so one misclick or shortcut no longer
closes a group of tabs at once. Pinned tabs are still skipped.

Tabs are selected again after the user confirms. If a tab was pinned, moved,
or removed while the dialog was open, it is left alone. Tabs created after
the request are not closed.

The shared confirmation lives in use-bulk-tab-close-confirmation.ts and is
used by both the tab bar and the tab group. The tab group hook now reads
the store directly instead of taking group and groupTabs as props.

* Confirm bulk tab closes before closing tabs

Close Others, Close Tabs to the Left/Right, and Close All Editor Tabs now
show a confirmation dialog first, so one misclick or shortcut no longer
closes a group of tabs at once. Pinned tabs are still skipped.

Tabs are selected again after the user confirms. If a tab was pinned, moved,
or removed while the dialog was open, it is left alone. Tabs created after
the request are not closed.

The shared confirmation lives in use-bulk-tab-close-confirmation.ts and is
used by both the tab bar and the tab group. The tab group hook now reads
the store directly instead of taking group and groupTabs as props.
2026-10-18 21:33:03 -07:00
Jinjing 81730c0b3d Track usage of closing tabs to left and right (#30557)
* Add telemetry for directional tab close requests

Measure how often people use Close Tabs To The Left and Right, without recording tab titles, paths, or workspace identifiers.

- Sample a stable 10% of installs by hashing the install ID, so membership survives restarts. The app-open event carries the sampled flag so the group can be analysed.
- Cap each direction to one event per app session, tracked in main, so repeated clicks or extra windows cannot inflate volume.
- Count the request before the close flow runs, so cancelled save prompts still count.
- Route both directions through one helper that counts eligible unpinned tabs in visible order.

* Count settings opt-in sessions in tab-close sampling denominator

Enabling telemetry from settings now fires `app_opened` for that session, not only when the opt-in came from the pending banner. Before, settings opt-ins never emitted `app_opened`, so those sessions were missing from the adoption denominator for directional tab close events.

- `trackAppOpenedOnce` now marks the session as tracked only when `track()` accepts the event. An opt-out or environment consent override no longer uses up the session's denominator.
- Tests cover sampling for settings opt-in and the `DO_NOT_TRACK` override.
2026-10-18 21:29:29 -07:00
Brennan Benson 46be7e23ee feat(settings): sign Antigravity chats in from Accounts (#28705)
* feat(accounts): sign Antigravity chats in from the Accounts page

Adds an 'Antigravity chats' row to the Antigravity section of Accounts
(behind the native chat setting, this device only): Sign in starts the
host's chat sign-in, follows it with the Link poll, opens the Google page
once, offers Copy link and Cancel, and shows one status line per phase.
The saved line reflects the sign-in file only, never that it works.

* Keep Antigravity chat sign-in bound to the current view

* feat(settings): put Antigravity chat sign-in under its install row in Chat > Providers and Accounts

The chats' sign-in row now sits directly below the Antigravity install row,
in Settings > Chat > Providers and under the agy section of Accounts, with copy
that says it is separate from the agy account. Its button reads Sign in, Change
account or Retry sign-in by state, and stays visible but disabled while the host
has no runnable server; the install row above says why.

* fix(settings): both Antigravity chat sign-in rows share one sign-in per host and pick up one already running

Settings shows the sign-in row under Chat > Providers and under Accounts at once; each kept its own
flow, so starting one silently cancelled the other and a sign-in nobody watched could not be seen or
cancelled. One entry per host now holds the flow and the saved sign-in for every row, follows the
host's Link poll while a row shows it, and on mount adopts the running flow the host names. Sign in
also waits while an install or Remove runs, read from the same install status.

* fix(settings): a failed sign-in poll re-reads the host so a running sign-in stays cancellable, and only a Remove (not an Update) holds Sign in

* fix(settings): the sign-in rows follow the host's sign-in status through the same loop as install, so an idle page sees another device's sign-in

* refactor(settings): install and sign-in rows share one subscription store; Install and Remove wait for a running sign-in, and Sign in waits for the host's answer

Both stores now follow the host through one generic subscription store
(snapshot, then a frame per newer revision, resubscribe with backoff on loss),
replacing the sign-in store's long-poll of a method the host no longer has.
While a sign-in runs, Install, Update and Remove are disabled (Cancel stays).
The sign-in row keeps Sign in disabled until the host answers, says when the
status could not be read instead of showing signed out, and sends one start or
cancel at a time.

* feat(settings): paste the last sign-in page's address to finish an Antigravity chat sign-in

While a chat sign-in waits on the browser, its row shows a field for the address of the last page after signing in, for when that page doesn't load because the browser is on another computer than the host. Continue sends it to the host, which passes it on to Antigravity; the host's refusal shows under the field. With that, remote hosts offer chat sign-in on the Accounts page too, and the row reads "Finishing sign-in…" while the host completes it.

* test(settings): give each host its own fake sign-in status and stub the new subscription export

The sign-in row tests shared one fake host across every owner, so the first test's finished sign-in made the next row show "Change account" instead of "Sign in", and rows left mounted after that failure doubled the later tests' matches. Each owner now has its own fake host behind the subscription, and every test cleans up its render. The Antigravity accounts section test's client mock also lacked the sign-in exports the status store now reads at import.

* feat(settings): the Antigravity chat sign-in row follows the host's sign-in answer

The host no longer reports whether a sign-in file exists; it reports what the
server last answered (signed in, signed out, or not known yet), and a running
sign-in started by another client arrives without its id.

The row now reads that answer:
- "Signed in on {host}." or "Not signed in on {host}."; no line until the server
  has answered, with Sign in still enabled. Change account shows only when the
  server said signed in.
- A sign-in another client is running reads "Sign-in is in progress in another
  client.", with Sign in disabled and no Cancel, copy link or paste field, since
  only the client that started it can act on it.
- "Finishing sign-in..." also follows a browser sign-in while the host checks it.
- Cancel and paste send only this client's own sign-in; the host's refusals
  show under the row.

* fix(chat): a signed-out Antigravity chat says to sign in under Settings, not what the agent printed

The notice read "Sign in to Antigravity. The agent asked to sign in in a
browser": the second sentence was Orca's own log text for the sign-in prompt the
agent printed, shown as if it were the agent's words, and the notice never said
where to sign in.

The connection now closes with a sign-in prompt error whose message stays in the
logs, so the chat shows only Orca's sign-in sentence. Antigravity gets its own
sentence, in the shape Claude's already has: "Antigravity isn't signed in. Sign
in under Settings → Accounts → Antigravity." Other agents' sign-in words, and
the agent's own words in a sign-in answer, are unchanged.

* fix(chat): a sign-in prompt at chat start keeps Orca's words out of the signed-out notice

A signed-out Antigravity chat still read "... The agent asked to sign in in a
browser". The connection closes with a sign-in prompt error whose message is
Orca's log text, but the request wrapper and session setup re-typed every
sign-in answer by copying its message into a new error. The copy lost the
sign-in prompt type, so its message was quoted as the agent's own words.

Re-typing now keeps a sign-in prompt close as it is, at both the request
wrapper and session setup, so the notice says only where to sign in.

* fix(settings): the Antigravity sign-in row shows the host's answer once a sign-in is cancelled or timed out

After a cancelled or timed-out sign-in the row kept reading "Sign-in
cancelled." even when the host had answered that this computer is not signed
in. A finished sign-in now only stands in until the host answers; then the row
reads "Not signed in on <host>." or "Signed in on <host>.". A running sign-in
still shows its step.

* fix(settings): a wrong pasted sign-in address shows Orca's reason, not the browser's URL bubble

The paste field is a URL input, so the browser's own "Please enter a URL."
check ran before Orca could explain what was wrong with the address. The form
now skips the browser's check and shows the host's refusal sentence.

* style(settings): the Antigravity chat sign-in row reads as a plain row like the install row

The sign-in row sat in its own bordered box, the same bright outline the install
row lost when it became a single grey status line. It now has no box: a
medium-weight "Antigravity chats" title, the description and the grey status
line under it (errors inline in the destructive colour), and its action at the
row's right end. Sign in and Retry are primary buttons, so they stand out like
Install; Change account stays outline and Cancel stays ghost. The paste-the-
address form sits under the row without a box. Copy, keys and behaviour are
unchanged.

* ci: run the PR checks against main after the retarget

* fix(settings): list every sign-in phase in the status line switch

* test(chat): name Antigravity as the chat's agent in its signed-out sentence test

* feat(settings): Antigravity provider row with a ⋯ menu and its own sign-in area

The Providers row's status line now says only the install state. Update,
Reinstall and Remove move into a ⋯ menu beside the switch, shown for a copy
on disk; Remove keeps its confirmation. Sign-in moves into a quiet inset
area under the row, shown once a copy runs, with one sentence and one
action per state. Accounts keeps its sign-in row; its install row gets the
same menu.

* fix(settings): a damaged runtime offers Reinstall as its row's button

A damaged copy's repair is the next step, so it sits where Install does instead of inside the ⋯ menu, which then offers only Remove.
2026-10-18 21:28:43 -07:00
NeilandClaude 24e218c101 refactor(shared): move orcad-migration-* into src/shared/orcad-migration/ (#30536)
Pure git mv plus import and path-literal rewrites. Two files #29339 edits stay put:
orcad-migration-dormant-state-validation.ts and orcad-migration-manifest-contract.test.ts.

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 21:28:03 -07:00
Brennan Benson 829d9448f1 test(wsl): exercise native chat on real WSL2 hosts (#28973)
* test(wsl): exercise structured chat on real guest hosts

* test(wsl): keep chat contract within the module size limit

* test(wsl): use braced conditions in chat lane

* test(wsl): configure the fixture through host launch settings

* test(wsl): keep cancellation assertion at the RPC boundary

* test(wsl): avoid assuming cancelled turn publication timing

* ci(wsl): run guest chat coverage for Claude environment changes

* test(ci): match the WSL lane's merged unit-test exclusion

* ci(wsl): drop lane trigger paths that no longer exist

* ci(wsl): run the WSL lane when the shared process-host package changes
2026-10-18 21:27:10 -07:00
Neil b117a33c1b refactor(renderer): fold launch, paste and terminal-create callers off the deprecated owner resolver; spawn refuses folder twins (#30497)
* refactor(renderer): fold launch, resume, note-send, paste and terminal-create callers off the deprecated owner resolver

Agent launch, AI-vault resume and reveal, note target and send, wake and creation seeds, native chat
owner, the shell menu and active-workspace terminal creation (#22, #31-#42, #44) read the owner
through runtimeEnvironmentIdWithLegacyFallbackUnlessTwin. Paste uploads images to the server its
PTY id names before falling back to the workspace owner. The folder and floating branch of the
terminal spawn route (#53) reads resolveOwnerWithLegacyFallback: spawn refuses a folder twin
instead of following the focused server, and teardown keeps tearing raw ids down locally.
Deprecated importers 31 -> 16.

* test: give the paste-listener and tab-bar probes the fields the folded callers read

* test: note why the folder-twin route fixture is cast

* test: type the paste-owner twin fixture
2026-10-18 21:26:52 -07:00
Brennan Benson e20b9d203f One spawn-options step for both ways Orca opens a terminal, and one first-size rule (#30390)
* refactor(pty): one spawn-options step for both spawn lanes, and one first-size rule

The window lane (pty:spawn) and the host lane (runtime terminal create)
each built the provider's spawn options with their own copy of the same
steps. Both now call one shared assembly for the env deletions and the
shared provider fields; each lane keeps only what is its own (pane
reservation, Antigravity prep, agent-session claims). The duplicated
provisional-size restore moves to the same module, and the window lane
drops its second, identical hidden mark.

A terminal's first size now comes from one rule: the caller's measured
pane, then the measured group, then a lone group, then 120x40. Host
creates accept the caller's measured size for the callers that move
onto them next.

* fix(pty): keep terminal-create under the file-length limit

* fix(pty): preserve hidden replacement and settings timing
2026-10-18 21:24:08 -07:00
Jinjing a7e60f2165 Fix thinking status translations in zh, ja, ko, and fr (#30558)
The live "thinking" status was translated as bare nouns (思维, 考え, 생각, Réflexion) that read as a faculty or a thought rather than an ongoing state. Use present-progressive wording for the status, and add key-specific overrides so the status and the composer option keep distinct labels.
2026-10-18 21:23:49 -07:00
Jinwoo HongandClaude e37d5271cc Main writes a workspace sleep's resume records after the statuses it accepted before the sleep (dark, layout-owner build only) (#30482)
* Main keeps an agent's resume record from the status its hook server accepts (dark, layout-owner build only)

In a layout-owner build, the window's recorder and quit capture kept only
records of tabs the window holds, so an agent in a workspace the window
never opened lost its resume record at quit. Main now applies the window's
rule (moved into src/shared) to every hook status for a pane it holds, and
captures its own panes' agents at quit; the window's quit capture is gone.

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

* Main writes a workspace sleep's resume records after the hook statuses it accepted before the sleep (dark, layout-owner build only)

* A snapshot replay looks up a pane's tab only when its status can leave a resume record

Restores the lookup order the window had before the record builder moved to shared code, and
updates the two handler tests for the quit-records option.

* Note why the status write applies its command directly

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 00:03:42 -04:00
Jinjing a282409d20 fix(i18n): clarify closing all tabs to the left and right (#30535)
* fix(i18n): clarify bulk tab closing in all languages

* Update tab context menu tests for "Close All Tabs" labels

The menu labels were renamed to "Close All Tabs To The Left/Right" in the i18n change, but these two test files still expected the old "Close Tabs To The ..." text. Update the assertions so the tests match the current labels.
2026-10-18 21:01:26 -07:00
Jinjing 4d65c7617d Open HTML file URLs as document previews (#30512)
* Open pasted HTML file:// URLs as document previews

Pasting a file:// URL to an HTML file into the new-tab box used to fall through to the generic URL path, which does not show the document's relative assets. It now routes to the workspace document preview, so the file renders with its local scripts and styles.

- Classify HTML file URLs before the file list loads, so the "Open file" option appears immediately.
- Resolve file URLs and absolute paths only against workspaces on the same host, so an SSH target is never matched to a sibling on another host.
- Reuse an open document on any page of its workspace instead of opening a duplicate preview.
- Keep the preview in the group the user targeted, including for remote hosts.

* Open HTML file:// previews without resolving file-operation context

Opening an HTML file:// URL used to need the worktree and file-operation context before the preview could open. In remote or not-yet-loaded states that lookup can fail, so the preview never appeared. Pass the context as a lazy getter, so it is read only when a file operation actually needs it. The preview path now runs without it, and the dispatch in openTabBarEntry no longer special-cases HTML before the network and file paths.
2026-10-18 20:57:50 -07:00
NeilandClaude 6328a104bd refactor(ssh): split ssh-connection-utils into concretely named modules (#30488)
* refactor(ssh): split ssh-connection-utils into concretely named modules

- classifiers -> ssh-reconnect-error-classification.ts
- retry/timeout constants and sleep -> connection/ssh-connection-timing.ts
- buildConnectConfig -> connection/ssh-connect-config.ts
- credential callbacks -> connection/ssh-connection-callbacks.ts
- exec options and abort error -> connection/ssh-exec-options.ts
- wrapRemoteCommandForPosixShell -> ssh-posix-command-wrapper.ts
- shellEscape and shared/wsl-login-shell-command quotePosixShell (identical) -> shared/shell-argument-quoting.ts quotePosixShell

No re-exports are left behind.

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

* fix: point the WSL git benchmark and the WSL lane route at shell-argument-quoting

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 20:48:05 -07:00
Neil 8908fdeb0c refactor: extract helpers that agent-status files need room for (#30260)
No behavior change. Moves cohesive pieces out of files at their line limit
so the OSC 7501 program-status work on top reads as additions:

- pane-agent-identity: the confirmed-shell tab-title reset
- SortableTab: its activity-status selector, into useTerminalTabActivity
- agent-status-event-applicator: the Pi provider-session partial update
- terminal-derived-agent-facts: resolving a PTY's status target panes
- server-row-ownership: notifying row-mutation listeners
2026-10-18 20:44:24 -07:00
Jinjing 5ee118a908 fix(source-control): clear unavailable branch line totals (#30475) 2026-10-18 20:44:00 -07:00
Jinwoo Hong 19b7a6c838 A first visit resumes a sleeping agent once, in its own pane (dark, layout-owner build only) (#30468)
* fix(terminal): a first visit resumes a sleeping agent once, in its own pane (dark, layout-owner build only)

Main retires a gone terminal's binding before the pane's fresh start, so on
main-owned layouts the activation sweep read the unbound pane as unable to
resume and launched the agent again in a new tab while the pane resumed it in
place. On main's layout the pane that holds the record owns its resume.

* fix(terminal): the sweep defers only to a pane whose own resume is in flight (dark, layout-owner build only)

Counting every unbound pane in main's layout as the record's owner also
covered a mounted pane whose agent died: it never restarts on its own, so
its agent was never resumed. The pane now marks its in-place resume while
the reattach or fresh start that carries it runs, and the sweep defers only
to that mark.

* test(terminal): the in-place resume hold reads only whether the pane is disposed

* refactor(terminal): the in-place resume hold takes the pane's liveness, not the session

* test(e2e): skip the single-resume spec on Windows, as its sibling resume specs do

* test(terminal): both starts that resume a record set the in-place mark

The e2e that would catch a dropped call needs a layout-owner build CI never
makes, so a switch-on unit test drives each start and checks the mark while it
runs and after it settles. Also corrects the mark's comment: a hidden pane's
background wake sets it too.
2026-10-18 23:41:55 -04:00
Jinwoo Hong 88241bcd1e feat(sidebar): the phone reads its workspace list from the sidebar inputs (dark) (#30462)
* feat(mobile): the phone page lists workspaces from the host's sidebar feed (dark)

* fix(mobile): settle pending option changes by latest intent; feed carries the desktop's focused host and host names (dark)

* fix(sidebar): the feed carries the desktop's pinned placement; e2e compares the phone list to the desktop sidebar (dark)

* test(sidebar): the phone list e2e also expands and unpins

* fix(sidebar): phone feed list review fixes (dark)

A collapsed or worktree.ps-failing feed list no longer shows an empty or error state; a queued worktree read uses the latest client; a superseded option change does not report a refusal; the window shadow leaves the focused host to main's test (focus-read ratchet).

* fix(sidebar): phone feed tests typecheck; e2e helper no longer pulls the native runtime types

Mobile test fixtures fill the fields the test project's types require; the feed trigger type lives with the feed reader, so the e2e helper's imports stop dragging react-native globals into the e2e program; React Doctor's two blocking findings.
2026-10-18 23:41:32 -04:00
Neil 4fc1855bda build: share one pnpm virtual store across worktrees (off in CI and on Windows) (#30254)
* build: share one pnpm virtual store across worktrees, off under CI

Each worktree carried a full node_modules; the global virtual store links
one slot per package version instead. pnpm keeps an explicit setting on
under CI, so a pnpmfile hook turns it off there: CI packages from,
caches and verifies a project-local node_modules.

* fix(build): keep shared electron and windows-process-tree dirs untouched under GVS

Every worktree runs Electron from the one shared electron package, so the
per-repo dist cache must not swap that dist and a foreign-arch install must
not land in it. The relay addon builder now repairs and compiles a private
copy instead of the shared windows-process-tree dir.

* fix(build): accept CLI runtime imports reached through an in-artifact store link

Under the global virtual store node_modules/<pkg> realpaths into a store
outside the repo. The check still rejects anything not reached through a
node_modules link inside the artifact, such as a stray ~/node_modules.

* docs: explain the global virtual store layout and the ~/node_modules hazard

* test: compare CLI closure paths with POSIX separators so the suite passes on Windows

* build: keep Windows on the normal pnpm layout unless ORCA_PNPM_GLOBAL_VIRTUAL_STORE=1

Store links are true symlinks on Windows, and installs without admin or
Developer Mode are unverified; CI still forces the normal layout first.

* fix(build): close the remaining shared-slot gaps under the global virtual store

- verify-skills-cli-runtime resolves each import from the importer's realpath,
  as Node does, so an artifact-local copy can't mask a ~/node_modules load.
- A concurrent sibling install of the shared Electron dist is kept, not swapped out.
- rebuild:node goes through ensure-native-runtime, which builds a shared
  node-pty beside the slot instead of node-gyp cleaning its build/ dir.

* fix(build): keep pnpm rebuild:node a forced rebuild

It replaced pnpm rebuild node-pty, which always rebuilt; without --force it
only rebuilt a node-pty that failed to load.

* docs: note that the store switches must stay set, since pnpm run relinks

* build: move the pnpmfile under config/ to keep the repo root allowlisted

pnpm-workspace.yaml points pnpm at it; the lockfile checksum is unchanged
because the content is.

* fix(build): enable the global virtual store from the pnpmfile, not the workspace file

pnpm exec derives NODE_PATH from the file setting, so even with the store
forced off under CI every child process got the root node_modules on its
NODE_PATH; a Windows rebuild fixture then resolved the real
@orca/windows-registry it deliberately omits. The hook now sets the store
both ways, and ORCA_PNPM_GLOBAL_VIRTUAL_STORE=0/1 is the one switch.

* test(pty): keep F3's concurrent spawns on the node-pty mock

Two concurrent first import('node-pty') calls race vitest's mock registry
and the loser loads the real addon under the mocked linux platform. It
passed only where a platform-agnostic build/Release happened to exist,
so it failed on every shared-store worktree.

* ci: fail PRs whose packages need a dependency they never declared

A new dependency_isolation job installs with the global virtual store
forced on (ORCA_PNPM_FORCE_GLOBAL_VIRTUAL_STORE_IN_CI), HOME and the store
in an empty temp dir, then runs pnpm tc and the undeclared-dependency test.
Postinstall now warns when a node_modules above the shared store, such as
~/node_modules, would mask the same class of bug locally.

* ci: set the isolation job's HOME and store through GITHUB_ENV

Job-level env cannot read the runner context, which made pr.yml invalid.
2026-10-18 20:36:24 -07:00
Neil df0c44571b fix(build): shared native packages get one immutable build instead of in-place rebuilds (#30226)
* refactor(build): extract the lock-free shared tree publish from the Electron dist cache

Native builds in package dirs shared across worktrees need the same
stage, validate, rename-into-place publish; one implementation keeps the
never-replace-a-good-entry and quarantine-restore rules in one place.

* fix(build): never rebuild a native addon in a package dir other worktrees load

Under pnpm's global virtual store node_modules/node-pty is one store slot
shared by every worktree, so an in-place node-gyp or @electron/rebuild run
in one worktree replaced the pty.node another was running. A shared
package dir now gets an immutable per-ABI build/orca-napi-<platform>-<arch>
compiled in a scratch copy, load-checked in a fresh process, and published
atomically; a usable entry is reused, never rebuilt. The patched node-pty
and windows-process-tree loaders try that dir before build/Release, and
packaging renames it to build/Release so packaged layouts are unchanged.
Private (non-GVS, CI) installs keep the existing in-place path.

* fix(build): find shared native packages through the project's own node_modules link

require.resolve with paths fell back to another install under Bun, so a
test fixture's private node-pty was judged shared.

* ci: run native checks when the shared native build modules change

* fix(build): pin the shared native slot and keep sibling publishes intact

Resolve the package's physical dir once so a concurrent relink cannot publish
one slot's build into another, verify the quarantined tree is the one judged
unusable before replacing it, and keep in-flight staging/quarantine trees out
of the packaged resource copy.

* fix(build): never move a sibling's fresh native entry, and refuse off-platform builds

Re-check the entry's identity right before quarantining it, and fail instead
of publishing a host-OS binary under another platform's entry name.
2026-10-18 20:21:50 -07:00
Jinwoo HongandClaude 61b30a4933 Main keeps an agent's resume record from the status it receives (dark, layout-owner build only) (#30455)
* Main keeps an agent's resume record from the status its hook server accepts (dark, layout-owner build only)

In a layout-owner build, the window's recorder and quit capture kept only
records of tabs the window holds, so an agent in a workspace the window
never opened lost its resume record at quit. Main now applies the window's
rule (moved into src/shared) to every hook status for a pane it holds, and
captures its own panes' agents at quit; the window's quit capture is gone.

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

* A snapshot replay looks up a pane's tab only when its status can leave a resume record

Restores the lookup order the window had before the record builder moved to shared code, and
updates the two handler tests for the quit-records option.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 23:18:51 -04:00
Neil f951cf44bb refactor(renderer): fold activation mirroring and sort-order persistence off the deprecated owner resolver (#30484)
The eight mirroring callers (#23-#30) read the owner through
runtimeEnvironmentIdWithLegacyFallbackUnlessTwin, so a twin is still not mirrored. Sort-order
persistence (#2) leaves out ids that two hosts publish, and ids whose only server proof is a repo
row (isUnprovenServerSshRoute), instead of writing them to this desktop's or a guessed server's
meta. Deprecated importers 40 -> 31.
2026-10-18 20:16:50 -07:00
Neil 51530bb86c build: declare dependencies that only hoisting supplied (#30225)
* build: declare dependencies that only hoisting supplied

Under pnpm's global virtual store each package sees only its declared
dependencies. Several published packages relied on hoisting:

- jest-dom's vitest matcher augmentation could not find vitest (1645
  TS2339 errors in tc:web), and react libraries' .d.ts could not find
  @types/react, so lucide-react, dnd-kit, cmdk, sonner and others typed
  as `any`. Other .d.ts phantoms (electron, vfile, prosemirror-model,
  d3-selection, type-fest) degraded silently the same way.
- electron-vite resolves electron/package.json and the binary itself.

packageExtensions declares these, which also holds in the hoisted
layout. The markdown alias now resolves decode-named-character-reference
through mdast-util-from-markdown, the package that actually declares it.

* build: let addMissingPeerTypes supply @types/react to react peers

pnpm 12.12 links a peer's @types package next to every package that
peer-depends on it, which replaces the hand-listed @types/react peers.
The regression test now reads pnpm-workspace.yaml, so it checks every
packageExtensions entry instead of a hand-picked seven.
2026-10-18 19:54:51 -07:00
Jinwoo HongandClaude 19e45b7921 feat(sidebar): the desktop window lists main's sidebar inputs behind the build switch (dark) (#30461)
* feat(sidebar): the desktop window lists main's sidebar inputs, with its own writes shown until main does (dark)

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

* fix(sidebar): a newer write wins in the pending layer, created rows hold the stamped record, writes name their host (dark)

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

* chore(sidebar): move the focus-read allowance with the window list model it moved into (dark)

* perf(sidebar): main's sidebar feed publishes a change after a quiet spell at once, not 50 ms later (dark)

* test(e2e): the desktop reads-main spec skips on a switch-off build and waits for a frame after collapse

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 22:49:43 -04:00
Brennan Benson 0322185bdc fix(native-chat): a Claude chat keeps a model its CLI stopped listing (#30436)
* fix(native-chat): a Claude chat keeps a model its CLI stopped listing

Claude Code 2.1.302 stopped listing opus[1m], which still runs, and chats on
it moved to the list's default on the next send, effort remapped. The picker
no longer derives a replacement from the list: the chat's own model shows as
a selected-only entry, its effort read-only, and every send carries both.

A real model_not_found reply still recovers: the options answer shows what
the reset child runs, so the next send records it. A reopened chat's catalog
read lists its own model so older clients that replace one keep it too.

Tracked in STA-10947.

* test(mobile): drop the send-options capability the options hook no longer reads

* test: an unlisted model's saved effort shows read-only at rest, as live, for every agent

* fix(native-chat): round-1 review fixes; a new chat's unlisted remembered model falls back as on main

- The read-only value predicate keys on the effort row, so the phone's legacy
  host Permissions row opens as before.
- The desktop read-only effort row honours a row kept from the previous model.
- A live child with no listing of its own answers with the saved listing's
  ids, so the read-only effort reads the same live and at rest.
- The read-only effort borrows listed rows' effort label and level names.
- The host seeds a new Claude chat from a remembered default the saved listing
  no longer names on that listing's default, effort nearest, as main did; a
  chat's own saved or running model is never replaced.

Tracked in STA-10947.

* test: pin the new-chat seed fallback on its typed helper, with no casts

* fix(native-chat): round-2: a carried effort moves with a fallen-back model; one guard

- An at-rest create carrying an effort but no model, on a remembered model
  the saved listing no longer names, now moves that effort to the nearest
  level the fallback model offers, as main did.
- A create whose own options name no model, and whose merged options carry
  none, reads no listing.
- The seed fallback keeps one guard and no unreachable branch.
- The read-only effort finds its level's name in any listed model's choices.

Tracked in STA-10947.

* fix(native-chat): a live options read with no record borrows no saved ids and never throws
2026-10-18 19:49:22 -07:00
Neilandstevelliu 347d0e46a1 feat(cli): set the title of one terminal pane (#30485)
* feat(cli): set the title of one terminal pane

Adds `orca terminal set-pane-title --terminal <handle> --title <text>`; `--title ""`
clears it. The runtime resolves the live handle to its saved leaf and asks the
desktop window to name that pane through a new optional notifier hook
(`ui:setPaneTitle`). Mounted panes apply it through the same local setter the GUI
uses; parked panes get it in the saved layout their next mount reads. The tab's
own name is never touched.

Rebuilt on current main from #24755.

Co-authored-by: stevelliu <stevelliu@tencent.com>

* fix(renderer): a main-owned layout takes a CLI pane title before the window shows it

* fix(renderer): a CLI pane title reaches a never-mounted tab with a rootless layout

---------

Co-authored-by: stevelliu <stevelliu@tencent.com>
2026-10-18 19:48:36 -07:00
Jinwoo HongandClaude 76f9978880 fix(relay): judge the reserve watch's 503 rule on non-drain 503s, not a host's own re-dials (#30487)
* fix(relay): judge the reserve watch's 503 rule on non-drain 503s, not a host's own re-dials

The watch counted every director 503, and on 2026-10-18 ~98% were host-rate-limited re-dials that
grow with traffic, so it flipped production-gce-c7 back twice with no fault. It now uses the roll
ladder's non-drain measure (request_count 503s less drain-return deferrals and host-rate-limited /
host-in-flight re-dials from the director's runtime metrics) for both the background and the live
samples. A judged minute no runtime-metrics line covers is unverifiable, not zero.

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

* fix(relay): state the reserve watch's metrics coverage honestly and share the metrics read limit

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 22:40:33 -04:00
Neil 5779a07a6a build: pin pnpm 12.14.0 (#30481)
12.10.1 repairs a global-virtual-store slot an interrupted install left
without dependency links (pnpm/pnpm#16642); 12.12 adds addMissingPeerTypes.
The CI store-mode and terminal-perf gates follow the pin they were measured
against, and mobile/ and config/audit-tools record the same pnpm.
2026-10-18 19:27:33 -07:00
NeilandClaude 139bac88b6 refactor(ssh): move the ssh-connection and ssh-target cluster into ssh/connection/ and ssh/targets/ (#30479)
* refactor(ssh): move the ssh-connection and ssh-target cluster into ssh/connection/ and ssh/targets/

Pure git mv plus import and path-literal rewrites. ssh-connection-utils stays put; the next PR splits it.

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

* test(e2e): keep the release-checkout import at the v1.4.218 path

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 19:23:21 -07:00
Neil bf866505e8 refactor(renderer): fold the right-sidebar, hook, native-chat and doc-page readers off the deprecated owner resolver (#30478)
Thirteen read-routing callers (#4, #5, #10-#20 of the round-3 caller list) read the owner through
runtimeEnvironmentIdWithLegacyFallbackUnlessTwin. A workspace two hosts publish is no longer
searched on either host. The focus-read ratchet now counts the legacy-fallback adapter, which
reads the focused runtime inside an object literal its discovery skipped; the five F1 entries
that blind spot pruned come back. Deprecated importers 53 -> 40.
2026-10-18 19:01:49 -07:00
Jinwoo Hong 613c5986e3 Editor records keyed by owner, phone active file, and a bound on frame holds (dark, layout-owner build only) (#30473)
* fix(layout): editor file records keyed by path and owner, so two hosts' files at one path stay apart (layout-owner build only)

Opening a runtime-environment file at a path a local file already held replaced the local record,
the stored-session patch and unsaved drafts matched by path alone, a move took every owner's record
of the path, and closing a bare-path tab removed both owners' records.

* fix(mobile): a windowless host's editor tab under its owned id shows as active, and retiring it clears the active file (layout-owner build only)

* fix(layout): a layout change's tab and pane holds end 15 s after it was sent when main never answers (layout-owner build only)

* fix(layout): main's view reads and prunes keep an active file under its owned id (layout-owner build only)
2026-10-18 21:34:37 -04:00
Jinwoo Hong 8ffd3742ed The terminal server and desktop finish the two-pane terminal repair before startup continues (dark, layout-owner build only) (#30429)
* refactor(orcad): move startOrcad's option and handle types into their own module

Move-only: frees room in orcad-entry.ts for the layout-owner load repair.

* fix(orcad): run main's duplicate-terminal pane repair at orcad startup (layout-owner build only)

orcad builds its own runtime and never called the load-time repair, so an
orcad host kept a terminal drawn in two panes.

* test(orcad): type the hoisted test state without an assertion

* fix(orcad): await the startup pane repair so it lands before reconcile and RPC

* fix(startup): desktop awaits the duplicate-terminal repair before the window and RPC start (layout-owner build only)
2026-10-18 21:25:53 -04:00
Neil 1ad8755fa8 refactor(renderer): fold four lib callers off the deprecated runtime-owner resolver (#30458)
Open-in owner, execution-host platform facts, doc-preview grants and the activation PTY inventory
read the owner through resolveOwnerWithLegacyFallback. Open in now refuses a twin instead of
launching it as this desktop's checkout; the others keep reading a twin as not server-owned. A row
whose only repo row is a server proxying its SSH target routes through that server. The
creation-action policy stays until browser creation folds with it. Deprecated importers 57 -> 53.
2026-10-18 18:09:07 -07:00
NeilandOliver Mee cf460aba5a fix(browser): switch client-hosted profiles by staging the replacement guest (#30452)
* fix(browser): switch client-hosted profiles with staged guest replacement

Squashed from #30351 by @oliver-mee onto the current main.

Fixes #30350

* fix(browser): fence staged profile guests, release switch grants, carry host profile metadata

- A fence during automation retirement now revokes and stops the staged guest.
- A failed or late-settling switch releases its execution-host grant so the page can be recreated.
- Staging cleanup failures before handover stay visible to executor close.
- createPage/restorePage carry host-owned profile metadata to profile-switch-v1 desktops,
  so recovery and restore can rebuild a switched page.

* fix(browser): roll back a switch whose replacement died, and report a lost old guest

* fix(browser): resolve client-hosted pages before the server-local target path when switching profiles

* fix(browser): a staged profile-switch guest owns downloads it starts while loading

* fix(browser): keep the original placement until a timed-out switch settles

* fix(browser): rebind the original guest before releasing a rolled-back staged guest

* test(browser): type the harness guest release mock

* fix(browser): release the replaced generation's download transfers when a switch commits

* fix(browser): admit file transfers from a staged profile-switch guest while its switch is pending

* fix(browser): release only the replaced generation's download transfers after a switch

* refactor(shared): import BrowserNetworkExecutionHost from its own module, no re-export

* fix(browser): adopt a profile switch the client finished after the caller timed out

---------

Co-authored-by: Oliver Mee <102673257+oliver-mee@users.noreply.github.com>
2026-10-18 17:48:57 -07:00
Jinwoo Hong 273068f969 test(e2e): seed the gone-pane resume record on disk so the CLI retention control holds in both layout builds (#30432)
The control record named a pane no window or main holds. A layout-owner build keeps resume
records on main's panes, so a record for no pane only exists when loaded from a profile.
Relaunch instead of reload, seed that record into the stopped profile, and read the CLI
tab's PTY from main's inventory, which both builds report.
2026-10-18 20:37:59 -04:00
Neil a8e90ddc30 refactor(renderer): one owner adapter for the deprecated-resolver folds, pinned by an acceptance table (#30451)
* refactor(renderer): one owner adapter for the deprecated-resolver folds, pinned by an acceptance table

resolveOwnerWithLegacyFallback answers as resolveOwner for a named host and for rows that carry a
host stamp, and keeps the deprecated answer (single focused runtime included) for missing and
unstamped rows. A full-owner acceptance table pins all matrix cases and asserts the only changes
from the deprecated resolver are the designed ones: twins and contested SSH hosts become ambiguous,
and a stale hub stamp routes through the server that names the target.

* refactor(renderer): the fold adapter shares resolveOwner's named-host rule

Clean-code pass: one namedHostForOwnerRef for both resolvers, floating counts as host evidence,
and the acceptance test drops non-null assertions.
2026-10-18 17:36:53 -07:00