Commit Graph
1876 Commits
Author SHA1 Message Date
OrcaWinandOrcaWin cff5a151fc test: remove low-value CLI, browser and E2E checks (#40466)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-09 11:58:10 -08:00
Neil 9a21a515d3 fix(vm-recipes): hide an in-progress VM checkout in every window, the phone and the jump palette (#40373)
* fix(vm-recipes): hide an in-progress VM checkout in every window, the phone and the jump palette

A VM create's checkout was hidden only in the sidebar of the window that
started the create. Windows now publish their pending VM checkouts to the
main process, which shares every window's set with all windows and
filters the paired phone's host workspace list and workspace context.
The jump palette and the sidebar read the shared set, and a grouped VM
project no longer draws an empty-project placeholder while its create
is pending. A window's set is dropped when it closes, crashes or reloads.

* test(project-groups): reset leaked runtime environment revisions between files
2026-11-09 06:51:21 -08:00
Neil f190139f03 fix(vm-recipes): keep a VM's checkout out of the sidebar until its create finishes (#40355)
A recipe VM create registers the VM's project before its environment
checks run, so the VM's primary checkout showed as a normal workspace
next to the pending row while the checks ran or were paused on a
failure. Hide that checkout in both sidebar list models until the
create adopts it (or makes its worktree). A cancelled or failed create
keeps it hidden while its VM is cleaned up; a VM that could not be
cleaned up is shown again so it can be removed.
2026-11-09 05:36:44 -08:00
Neil ef27841e29 refactor: group agent launch, status, and messaging owners (#40313)
* refactor: group agent launch, status, and messaging owners

* refactor: consolidate direct owner imports

* refactor: import pane ownership directly in status listeners
2026-11-09 04:24:18 -08:00
Neil 0ad972974f test(e2e): give the provisioned-root VM a reachable git remote (#40318)
* test(e2e): give the provisioned-root VM a reachable git remote

VM creates now run the environment checks before creating the workspace
(#40152). The fixture VM's origin pointed at a GitHub URL it cannot push
to, so the git push check failed and the create paused on the build
sheet; the spec then read the VM's primary checkout before it was
adopted. Point the VM checkout at a local bare repo so the checks pass.

* test(e2e): wait for the provisioned root's adoption, not its listing

The VM's primary checkout appears under its branch name once its project
is set up, before the environment checks finish and adoption writes
ephemeralVmCheckoutMode. Poll for the adopted row instead.
2026-11-09 04:04:24 -08:00
Neil 715020e871 refactor: group editor browser document and simulator owners (#40273)
* refactor: group editor browser document and simulator owners

* refactor: update active simulator reliability command links

* refactor: preserve upstream editor and emulator test retirements
2026-11-09 03:44:32 -08:00
Neil 2103352d1b test(vm): pin file saves in a recipe-created workspace, across server restart (#11762) (#40275)
* test(vm): pin file saves in a recipe-created Orca server workspace (#11762)

* test(vm): wait for the save round trip, let the app reconnect itself, edit a plain-text file

* test(vm): say why the recipe save spec needs a longer timeout
2026-11-09 02:53:35 -08:00
Neil ccd4592634 refactor: group renderer workspace ownership and navigation (#40230)
* refactor: group renderer workspace ownership and navigation

* refactor: use the defining WSL rewrite store identifier

* refactor: route new upstream consumers to workspace owners

* refactor: consolidate connection owner test imports

* refactor: preserve upstream review-owner test retirement
2026-11-09 02:38:15 -08:00
Neil 920a83889c refactor: move browser contracts and publication to defining owners (#40209)
* refactor: move atomic publication to its filesystem owner

* refactor: group shared browser definitions by feature

* refactor: bind proxy process and session contracts to defining owners

* refactor: consolidate direct session contract type imports

* refactor: retain atomic publication test timing under moved owner

* fix(benchmark): resolve historical tunnel framing source before loading
2026-11-09 00:45:45 -08:00
Neil 0cb357a83c feat(setup): slim the setup-script import card and fit long scripts in review (#40180)
* feat(setup): slim the setup-script prompt and make long imported scripts collapsible

* fix(setup): require the full imported script on screen before saving

* style(setup): use the ghost button colour for the script toggle

* style(setup): keep the source path readable in the narrow prompt card

* feat(setup): title imports, restore the package-manager card, keep the review dialog inside the viewport

* fix(setup): count every script line, keep the e2e import spec in step with the new copy
2026-11-08 23:22:34 -08:00
OrcaWinandOrcaWin 398052f94e test(e2e): hold split toolbar focus before the grab chord (#40182)
The active terminal refits a frame after the browser splits mount and can
refocus xterm after the spec focused the Reload button, so Ctrl+C reached
the shell instead of arming grab. Refocus until the toolbar keeps focus.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 23:01:23 -08:00
Neil 39902f398b refactor: bind browser and remote runtime consumers to concrete owners (#40135)
* refactor: use concrete browser and input owners

* refactor: bind remote runtime callers to concrete transport owners

* Use checked subscription mock argument types

* Type browser lease mock with its subscription contract

* refactor: bind sleeping VM status probe test to socket owner
2026-11-08 21:41:28 -08:00
Neil 803e257954 fix(sidebar): let the divider resize instead of scrolling the workspace list (#40087)
* fix(sidebar): let the divider resize instead of scrolling the workspace list

The 4px scrollbar strip past the seam covered the visible divider pixel, so
grabbing the divider over a scrolling list dragged the scrollbar. Drop the
strip and start the resize handle on the divider; the native scrollbar inside
the sidebar is unchanged.

* fix(sidebar): trim the resize handle's outer reach by 1px
2026-11-08 20:41:06 -08:00
Neil e9f4df2c0f refactor: organize rate-limit providers and remove forwarding modules (#40116)
* refactor: group rate-limit providers under concrete owners

* test: preserve mixed Claude account-switch regression

* refactor: consolidate Antigravity service contract import
2026-11-08 20:29:13 -08:00
Kelvin Amoaba 805ec4ee21 fix(browser): show site favicons on browser tabs running on a remote host (#40049)
* fix(browser): show site favicons on remote host browser tabs

Host-run browser tabs mirrored to a paired client always showed the
globe: the host's session-tab snapshot carried no favicon. Hosts now
publish the active page's icon URL as an optional faviconUrl, capped at
2 KB and dropped when it points at the host's loopback. Headless hosts
pick it up from page-favicon-updated and publish only when it changes;
desktop hosts include it in the existing graph-sync key. Clients keep
their current icon when an older host omits the field.

* fix(browser): publish a remote tab icon on arrival, not on every swap

Read the headless favicon through the agent browser bridge so the
runtime stays free of Electron imports, publish only when a page gains
an icon so animated icons ride later publishes, and drop IPv4-mapped
loopback icon hosts.

* fix(browser): clear a remote tab icon when a cross-origin load starts

A load that fails on the new origin never commits, so clearing only on
did-navigate kept the old site's icon beside the failed URL. Also give
the runtime tests' bridge fakes the new favicon getter.

* test: give the session-tab bridge fakes the favicon getter
2026-11-09 00:59:11 +00:00
OrcaWinandOrcaWin 4eb9606ddb test(notebook): keep polling when the save read lands mid-write (#40031)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 16:00:36 -08:00
Neil c50d4cd3e4 refactor: organize browser guest lifecycle owners (#39996)
* refactor: organize browser guest lifecycle owners

* test: resolve cross-version client owners and pre-ticket baseline

* test: record the released terminal registry path
2026-11-08 15:23:09 -08:00
OrcaWinandOrcaWin a49fca7a98 fix(runtime): keep the restored tab selected after a serve restart; update stale paired e2e specs (#39980)
* fix(runtime): keep a restored tab selected after orca serve restarts

Since #38844 a cold rebuild restores the saved tab groups, and a saved
group's null active tab was kept as an explicit "nothing selected". A
headless server never saves its own selection, so after a restart its
workspaces listed every terminal with none selected. Saved groups now
only declare a null selection when the session also saved an active
group; otherwise the restored tab stays selected, as before.

* test(e2e): bring layout-compat and paired-client specs up to current behavior

- old-phone baseline: phone snapshots carry tabGroupLayout since #38844.
- tab composition: drop onto where the active tab sits once a drag
  undocks it; create the server-placed browser page on the server, since
  a phone's create through the desktop is desktop-hosted (#37705); the
  desktop serves its phone the server page it mirrors (#36447).
- project removal: retry the host's "can't answer yet" terminal list and
  wait for a terminal whose shell has spawned.

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 14:29:52 -08:00
OrcaWinandOrcaWin 9fa526615f fix(browser): validate a guest whose ID is unreadable at dom-ready (#39984)
When dom-ready fired while webview.getWebContentsId() threw, the
registration callback bailed out on the ownership fence (ownsGuest(null)
is always false), so validateAfterResume never ran and the page stayed
unregistered until some unrelated caller happened to read the ID. Fence an
unidentified guest by webview ownership only, so validation retries until
the ID reads.

The recovery spec's registered-page oracle now ignores tab list rows with
loaded: false: since #35563 tab list also reports tab-bar pages that have
no registered guest, so unregistered pages no longer drop out of it.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 14:18:40 -08:00
OrcaWinandOrcaWin 961430903c test(e2e): follow setup review dialog, GitLab work-item listing, chat sign-in probe and onboarding trust prompt (#39983)
- setup-script-import: imported setups are saved from the Review setup
  script dialog since #37937.
- github-url-smart-input-transition: the GitLab source lists through
  gitlab:listWorkItems since #32005, so stub that channel.
- structured-chat-tabs-open-close: the Claude catalog probe also sends an
  initialize request for sign-in discovery since #37191.
- golden-core-flows: onboarding launches the chosen agent in the fresh ~
  workspace (#37898), whose first launch asks the per-repo agent folder
  trust question (#38946); answer it before adding a project.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 14:18:24 -08:00
OrcaWinandOrcaWin 8a7dcae3b9 test(e2e): update five stale or racy terminal and agent specs (#39982)
- profile-state restart: runNow now returns the saved pending row (#38217)
- codex account switch: click the backdrop clear of the sidebar seam strip (#38288)
- claude sidebar agent view: drop the removed subagent indicator check (#34558)
- IME preedit continuity: refit after changing the font, like font zoom
- agent send picker: bind local fixture panes to a live PTY so reattach keeps them

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 14:12:02 -08:00
Neil b5e38ad9c6 refactor: organize agent hook installation and server owners (#39969)
* refactor: organize agent hook installation and server owners

* refactor: align hook mock registries and packaged entries
2026-11-08 13:23:03 -08:00
Neil 0d1220c31f Organize SSH and managed-server modules by concrete owner (#39937)
* refactor(main): organize SSH transport and managed server owners

* Remove orphan deploy readiness fixture and shrink test baselines

* refactor(wsl): import lock records from their defining owner

* refactor(wsl): use the canonical deferred update contract
2026-11-08 12:20:22 -08:00
Neil 26a4db6b4e refactor(skills): group discovery, install, cloud, and transfer owners (#39874)
* refactor(skills): organize installation, discovery, and transfer owners

* chore(skills): reconcile move validation metadata
2026-11-08 07:39:57 -08:00
Neil 19043a3d76 refactor(mobile): organize pairing, session, RPC and host owners (#39846)
* refactor(mobile): give relay and encryption concrete owners

* refactor(mobile): organize session and review feature owners

* refactor(mobile): organize RPC and host ownership

* test(mobile): point render fixtures at concrete owners

* refactor(mobile): use explicit type-only owner imports
2026-11-08 07:19:05 -08:00
OrcaWinandOrcaWin 9f28435ca2 test: hover the grab target before clicking in the split grab e2e (#39868)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 07:08:13 -08:00
Neil c10881fa8c refactor(shared): organize execution and automation defining owners (#39776)
* refactor: import journal queue state from defining owners

* refactor(shared): organize execution and automation owners

* fix: retain type imports used by surviving test cases

* refactor: finish work item owners and refresh validation metadata

* test: infer reconnect status fixture type

* test(claude): resolve source files beside same-named directories

* test(runtime): group repository creation mock registrations
2026-11-08 06:46:09 -08:00
Jinwoo Hong 4fabde28b1 feat(cli): one enclosing-workspace rule, --environment local, copyable addresses, and --parent-environment (#39733)
* feat(cli): one enclosing-workspace rule, --environment local, and copyable workspace addresses

current/active and cwd inference now pick the innermost workspace of either kind (worktree or
folder workspace); at equal depth the caller terminal's own workspace wins, otherwise the choice
is refused as ambiguous. --environment local names this machine's own Orca over an ambient
ORCA_ENVIRONMENT or pairing code. worktree ps/show/current print an environment: line and an
address: line (JSON environment, address, addressUnavailable, parent) that always carries its
--environment, and name a parent's environment only when it is verified.

* test: answer the folder catalog read in agent launch cwd tests

* feat(cli): worktree rm refuses current/active and names the selector to pass

Removal needs an explicit workspace, as git worktree remove needs a path. The refusal runs before
rm decides between a worktree and a folder workspace, and reports what current resolves to now
(one selector, the ambiguous choices, or none) in text and as invalid_argument data.

* fix(cli): keep the remote-environment guidance when rm refuses current

* fix(cli): surface folder-catalog failures for omitted targets; no address for a duplicated folder parent

* fix(cli): surface a worktree-list failure for omitted browser and terminal targets too

* test(cli): folder rm refuses current/active before the folder removal path

* fix(cli): refuse a cwd owner whose folder host can't be derived instead of skipping it

* fix(cli): compare cwd owners by filesystem identity, refuse every equal-path tie, surface worktree-list failures

Paths on the caller's own filesystem compare by realpath (reusing resolveRealPathSync), so /tmp
and /private/tmp aliases find the deeper owner in both the folder prefilter and ranking; other
hosts' paths stay lexical. Equal-depth owners with different repo registrations now refuse without
a caller instead of picking by catalog order. An omitted target no longer swallows worktree.list
method_not_found; only the optional folder reads fall back.

* fix(cli): read the realpath helper from shared so the packaged CLI ships it

* refactor(cli): move the catalog row type and unresolved-owner refusal out of the selection/catalog cycle

* fix(cli): resolve every caller-filesystem workspace path, not only basename matches

A workspace registered through a differently named symlink was skipped by the basename gate.
Containment now realpaths cwd and each row on the caller's own filesystem once per command,
shared by the folder prefilter and ranking; folder hosts are derived first so another host's
paths are never resolved locally.

* test: answer the folder catalog read in the ambiguous orchestration-check caller test

* feat(cli): --parent-environment names where a worktree's parent lives

worktree create and worktree set take --parent-environment <local|saved id|name>
next to --parent-worktree. The parent is resolved in that environment only, and
sent to the child as a verified cross-store ref after the child's cross-machine
capability check. Without the flag, the parent stays in the child's environment;
active/current always mean this machine's own Orca.

Preflight failures happen before any change: environment_not_paired,
environment_unavailable, LINEAGE_PARENT_NOT_FOUND / LINEAGE_PARENT_AMBIGUOUS
naming the searched environment, and incompatible_runtime with data.environment
and data.requires.

* fix(cli): parent lookup errors name and list the environment searched

LINEAGE_PARENT_AMBIGUOUS and LINEAGE_PARENT_NOT_FOUND now always carry
data.environment and a listing command for the environment the parent was
looked up in, for parents in another environment and in the child's own. Steps
inherited from the runtime listed the caller's default route instead.

* docs(cli): a local address names the Orca that printed it
2026-11-08 04:08:07 -05:00
OrcaWinandOrcaWin 0da741a22f test: remove 988 low-value tests (#39797)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 00:42:37 -08:00
OrcaWinandOrcaWin ee6506714e test: remove 244 low-value tests (#39781)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 00:06:49 -08:00
OrcaWinandOrcaWin d058920e15 test: remove 357 low-value tests (#39743)
* test: remove 362 low-value tests

* test: retain five boundary regression cases

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 23:40:13 -08:00
Neil 83f8e6340d refactor(shared): organize file operations and storage owners (#39746) 2026-11-07 22:58:35 -08:00
Neil 3a0e9a27d0 refactor: organize backend runtime by defining owner (#39625)
* refactor(main): organize runtime implementation owners

* test: retire wall-clock CLI title recovery case

* refactor: route new folder mutation to runtime store owner

* test: import folder mutation store contract from its owner
2026-11-07 22:24:34 -08:00
Kelvin Amoaba db7ff5c8ff fix(mobile): re-subscribe Home and the follow-up preference after the client event stream ends (#39655)
* fix(mobile): re-subscribe Home and the follow-up preference after the client event stream ends

* fix(mobile): try a refused client event wire once per connected edge

* refactor(mobile): mark replayed client event readies in the shared stream

* test(e2e): give the phone feed socket client a state listener
2026-11-08 05:52:38 +00:00
965540a7bb perf(worktrees): re-rank only the worktrees a sort save moved (#39723)
A Smart-sort save rewrote every listed worktree's rank whenever the order
changed, so every repository on the host got an order-only
worktreesChanged event. planWorktreeSortOrderUpdates now keeps the
longest run of rows whose ranks already descend in the requested order
and re-ranks only the rest. It falls back to the full re-rank when a gap
is too tight for distinct whole ranks, or when the planned ranks would
not descend strictly (float rounding at huge ranks).

When the requested order holds a row the write cannot save (WSL-move
fenced or unknown host), the write keeps the full re-rank, since that
row's unqualified rank may belong to a same-ID twin and must never
anchor a partial re-rank.

Replaces #37142.

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: BTForIT <223167996+BTForIT@users.noreply.github.com>
2026-11-07 21:34:57 -08:00
OrcaWinandOrcaWin 6d95515306 test: remove 297 low-value tests (#39720)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 21:10:57 -08:00
Neil c99e71b315 refactor: group renderer runtime resource owners (#39571) 2026-11-07 20:52:26 -08:00
Jinwoo Hong f341558b82 feat(cli): match folder workspaces by path: and name:, keep same-id ps rows apart (#39637)
* feat(cli): match folder workspaces by path: and name:, and keep same-id ps rows apart

Adds one runtime matcher for worktrees and folder workspaces. With the new
matchFolderWorkspaces opt-in (advertised as workspace-selector.folder-match.v1),
path: and name: also match folder workspaces; branch:, issue: and identity:
stay repo-backed. Several matches refuse with each choice's kind, host, path
and selector; a folder id shared by two folder workspaces refuses with the
repair step. The CLI resolves path:/name: through it, so terminal, file and
ports commands reach a folder workspace, and create/set parents record a
folder parent. Explicit ambiguous parents report LINEAGE_PARENT_AMBIGUOUS.

worktree ps now keeps rows that share an id on different hosts apart, with
their own host, identity, metadata and activity; activity whose host can't
be proven attaches to neither.

* test: let the cross-version ps harness pass the host-qualified summary lookup

* fix(cli): read each ps row's own host session; qualify folder selector help

* fix(runtime): refuse unscoped duplicate folder ids; hand lineage the matcher's typed result

Unscoped folder:<id> refuses a duplicated id even when only one copy's host
is derivable; a host-scoped lookup still picks that host's copy. A wsl: hook
stamp counts as local host evidence. The lineage controller receives the
worktree-or-folder candidate directly instead of re-deriving the kind.

* docs(cli): guide the ambiguity fallback through truncated ps and id: selectors

* fix(cli): report an ambiguous parent by its own choices; cover per-host sessions

* fix(cli): send parents to the runtime parent resolver as typed; translate WSL paths for folders too

Parent selectors skip the CLI's show-based folder lookup, so worktree.create
and worktree.set classify them with parent rules: a folder spanning hosts is
a valid parent, and ambiguity reports LINEAGE_PARENT_AMBIGUOUS. Caller-distro
Linux path translation now also matches folder workspaces.

* chore(rpc): import the computer-use recovery data directly instead of through an alias

* fix(runtime): report a missing set parent as LINEAGE_PARENT_NOT_FOUND, as create does

worktree set and worktree create now share one explicit-parent error
conversion: several matches give LINEAGE_PARENT_AMBIGUOUS and none give
LINEAGE_PARENT_NOT_FOUND, so a missing parent is no longer reported as a
bare selector_not_found that could mean the child.
2026-11-07 23:35:33 -05:00
Neil 2ec81bc2ca feat(claude): match Claude Code's theme to the Orca terminal theme (#39447)
* feat(claude): sync the terminal theme into Claude Code

* fix(claude): retry missed theme reloads, keep settings key order, search entry

* fix(claude): persist theme ownership before settings writes, skip deliberate themes, restore only on toggle

* fix(claude): gate theme sync on Claude Code 2.1.119, follow Orca's Claude config dirs, keep restores owed

* refactor(theme): point markdown Monaco rules at the shared contrast helpers

* fix(claude): lock theme ownership edits across Orca processes, retry missed theme reloads with backoff

* test(e2e): opt-in real Claude Code theme sync journey; retry theme reloads for up to five minutes

* fix(claude): keep theme takeover recoverable when settings writes or the lock fail; steadier e2e journey

* fix(claude): serialize theme publication with takeover and restore, per-file reload retries; record the real-Claude e2e in the isolated home

* fix(claude): retry an owed restore publish, stop off-state retries, reread settings right before writing

* fix(claude): republish theme files under the cross-process lock

* refactor(theme): point chat selection contrast at the shared helpers

* feat(claude): default theme sync on for new profiles; offer it once to existing users at their next Claude launch

* fix(claude): offer theme sync to every existing profile, confirm only after the save, honest offer copy

* fix(claude): right-align the theme sync offer's two actions, primary last
2026-11-07 20:19:22 -08:00
OrcaWinandOrcaWin 8d2b5a2c07 test(rpc): drop the default-RPC-manifest guard where no default remains (#39684)
RpcDispatcher now requires its method list, so these suites can no longer consume
the default manifest. Suites that still reach the registry through the RPC server
keep the guard.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 20:10:01 -08:00
OrcaWinandOrcaWin 331864e249 test: remove 259 low-value tests (#39701)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 19:53:07 -08:00
NeilandCopilot 1334391443 fix(terminal): preserve decorations on DOM block glyphs (#39615)
Keep default underline and strikeout colors visible while hiding block font glyphs, including link-hover shorthand resets. Restore only owned decoration overrides and preserve explicit colors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-07 19:44:59 -08:00
Brennan Benson 00e25b55b2 Show one actionable error when an agent launch cannot prepare its workspace (#37220)
* fix: report agent launch failures once with actionable recovery

* fix: keep terminal launch controls shown but waiting while the host connects

Replace per-row pending metadata with one derived terminal-readiness flag on
the agent menu model, kept out of picker identity keys. Terminal buttons and
rows stay mounted and disabled while SSH or a paired server is still
connecting; chat and Configure stay usable, and the terminal default is not
changed. Repo targets with no workspace yet read the repo host's facts.
Invalid Source Control arguments keep their existing actionable message.

* fix: keep launch readiness and failure ownership consistent across pickers and fallbacks

A host that is still connecting now declines a terminal launch silently at the
launcher, including shortcuts and fallbacks, instead of reporting a failure.
A terminal fallback refused behind a visible chat reports through that chat's
notice rather than a second toast. The agent picker stays usable while only a
terminal waits; an armed terminal rechecks readiness on Enter; a configured
chat option no longer inherits the terminal's waiting state; waiting terminal
controls say why. Invalid CLI arguments name the actual problem for every
caller, the no-agent shortcut message is restored, and prospective repo
readiness no longer rescans repos on unrelated store writes.

* fix: keep the handoff dialog open when a host-waiting launch opens nothing

A session continuation launched through the host's admission now waits for
that launch to settle before reporting the handoff. When the host declines the
chat and its terminal fallback is declined while the host is still connecting,
nothing opens, so the dialog stays open for a retry instead of closing with no
session and no message.

* fix: let the handoff dialog close while its session is starting

Cancel, Escape and outside clicks now close the Hand Off dialog even while a
start is in flight; Start stays disabled with its spinner. Closing aborts agent
detection if it is still running, and a dialog closed during detection starts
nothing. A launch already sent settles on its own and reports through its
existing owners. The in-flight start belongs to the request it was made for, so
a late finish never closes, completes or blocks a dialog reopened since.

* test: replace type assertions in launch refusal tests with typed fixtures

* refactor: name the setup panel's launch helper launchSurface

* perf: resolve a picker's terminal host only when ownership changes

The terminal readiness check rebuilt the target's ownership chain and ran
the full OS resolver on every store write, for every mounted picker. Each
picker now keeps its target host and re-resolves it only when an ownership
slice changes; other writes read just that host's connection and contact
facts. Local hosts read nothing. The launcher's own pending decline uses
the same host pieces from execution-host-facts, so the rule has one copy.

* perf: word a declined chat's fallback failure without re-saving launches

Wording the failed chat's notice after its terminal fallback was refused
re-saved every retained launch record, though the wording itself is never
saved. Listeners now hear about it without a save; lifecycle changes still
save. The refused-fallback test moves to its own file and counts saves at
two sizes.

* test: narrow refused launch outcomes where tests read the opened tab

launchAgentInNewTab now returns a refusal instead of a tab when the
launcher declines, so tests that read the opened tab's surface or
completion narrow it first. Fixes the web typecheck.

* fix: keep Configure usable and show one reason on a waiting agent row

While the host connected, each New Chat agent row was marked
aria-disabled, so its Configure button read as disabled to assistive
tech and keyboard. The row now only blocks its launch and points to its
"Connecting…" reason. A row shows one reason, the one that stops its
launch now, and the agent name keeps its width so it is not cut to a
single letter.

* test: cover distinct repo targets and host freshness in the picker perf contract

Pickers for workspaces not created yet now count repo reads cold and after
another host's row is republished, at two scales with a repeated-target
control, and assert no unaffected renders. Two freshness controls follow
the cached host: an owner moving from local to a connecting SSH host and
back, and a paired server that is still checking versus verified with its
OS.

* fix: mark a waiting agent launch unavailable while Configure and chat stay usable

An agent row's launch item also held its Configure button (New Chat) or
its start-in-chat button (the + menu). Disabling the row while the host
connected disabled those too; leaving it enabled made the waiting launch
read as available and then do nothing.

The launch item and those controls are now siblings. While the host
connects the launch item is marked unavailable, dimmed and described
"Connecting…", and stays focusable so arrow keys still reach the
controls beside it. Configure and chat keep their own state. A chat
started from Configure or the chat button goes through the row's guarded
launch and closes the menu, without choosing the waiting item.

* fix: release the agent row button's press listeners when a press is cancelled

Each press on the button beside an agent row added a window listener that
only a pointerup removed, so cancelled touches and closed menus left them
behind. A press now owns one handler that removes both listeners on
release, cancel, the next press or the row closing; drag release onto the
button still chooses it.

* fix: give the agent launch row item its own menu item variant

The launch item beside Configure or the chat button restyled the shared
menu item (transparent focus, dimmed while unavailable), which the design
system gate rejects. That treatment is now the menu item's launch-row
variant; the rendered rows are unchanged.

* fix: route the menu's terminal host by owner and repair the e2e and ja checks

The menu's terminal readiness now reads workspace records through the
workspace record selectors and picks a not-yet-created workspace's repo by
the host it names, without the focused-host fallback; with no host named
it settles only when the id has one row, which reads the same. Its cached
host is re-checked when the settings slice changes instead of reading the
focus setting. E2E unit tests narrow refused launch outcomes, and the two
new ja strings write Agent as the rest of the catalog does.

* test: count a launch as opened only when it returned a surface

A refused launch now returns its refusal instead of null, so the parity
check asks whether a surface opened.

* perf: keep menu readiness on the workspace's owner and index the twin fallback

Terminal readiness re-resolved every mounted menu's host on any settings
write, and an unstamped worktree whose project is listed both here and by
a paired server walked the whole repo catalog to resolve. Readiness now
resolves an existing workspace's host from its resource owner only, never
the focused default a row-less setup terminal is created on, so settings
writes leave it alone. The shared-project check reads that project's rows
from the existing per-snapshot repo index instead of the whole catalog.
Setup terminals and every route keep their behavior.

* test: assert which readiness pickers render on each detected-twin update

The detected-twin perf contract now checks render deltas per update: a
catalog republication renders no picker, and stamping the first workspace
with a checking server, then that server reporting its OS, renders only
that workspace's pickers.

* test: give the structured chat fixture's owner stub the menu's resource host

The fixture replaces the whole worktree owner module with a stub, so the
menu readiness check's new resource-host export was missing and the
picker path threw before launching. The stub now answers both exports
with the scenario's owner host.

* Keep launch failures with one action owner on current menus

* Align Start work regression with its remote launch target

* Narrow refused launch outcomes in current contract tests

* Assert notified refusals in existing launch regressions

* Assert the refused keyboard launch receipt

* Narrow successful web runtime launches in tests

* Keep agent menu labels left aligned

* Keep merged launch reporting within existing checks

* Keep direct launch argument reads within the file limit
2026-11-07 19:18:39 -08:00
OrcaWinandOrcaWin 88f452a665 test(e2e): follow the editor's Preview button in the paired HTML preview spec (#39686)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 19:10:16 -08:00
Kelvin Amoaba 34cd1161bb perf(mobile): show the workspace list from memory and refresh it on desktop changes (#39453)
* perf(mobile): show the workspace list from memory and refresh it on desktop changes

* fix(mobile): import the host list queries type without an import() annotation

* fix(mobile): keep host labels on a not-connected read and update the phone feed e2e helper

* fix(mobile): keep the event router listening when its stream ends while opening

* fix(mobile): reuse the shared read-view base and remount for the cache-return recording
2026-11-08 00:23:19 +00:00
Neil b0ac9ae521 refactor: organize native chat composer and conversation owners (#39534) 2026-11-07 12:26:03 -08:00
Brennan Benson 133bc99e5a Keep waiting chat input in one ordered queue (#39271)
* Prepare queue rows to preserve accepted delivery intent

* Keep waiting native chat input in one ordered queue

* Keep a typed view of admitted queue records

* Keep the removed queue caption in the runtime catalog

* Remove the unused queue barrier caption

* Keep queue writes local and preserve accepted send provenance

* Read the sender from the queued admission request

* Keep continuation fixture clock within its operation window

* Remove deleted queue-barrier test from ratchet baseline

* Keep ratchet baseline change scoped to the deleted test

* Filter historical acceptance reads before loading payloads

* Instrument cached acceptance cursor once per fixture

* Restore original personal provenance after legacy card cleanup

* Complete legacy sender fixture metadata

* Narrow admitted history record types

* Reconstruct accepted personal proof after restoring original admissions

* Use the fixed clock for historical queue fixtures

* Consolidate queue source and type imports

* Preserve admission refusals and failed startup ownership

* Keep manual queue holds independent of later turn endings

* Remove obsolete mobile queue barrier expectations

* Keep journal format initialization independent of its decoder

* Assert returned-row recovery for released send clients

* Preserve Stop assertion across handoff-only publication
2026-11-07 11:35:38 -08:00
Brennan Benson d307cf015e fix(agents): workspaces created on a paired host use the host's launch settings (#38670)
* fix(agents): workspaces created on a paired host use the host's launch settings

Creating a workspace with agent picks or a draft could launch the paired host's agent with desktop settings, or lose the picks during recovery. Let capable hosts compose those launches from their own settings and preserve the user's inputs through fallback creation. Older hosts retain their existing requests.

* fix(agents): workspaces created on a paired host use the host's launch settings

When a workspace is created on a paired computer, agent picks and Arguments can be replaced by this computer's defaults or dropped during recovery. Keep explicit choices with the submission and let the paired computer resolve its own launch settings.

Preserve older-host request behavior, disabled-agent draft substitution and prompt submission, and restore the composer if compatibility preparation fails.

* fix(agents): workspaces created on a paired host use the host's launch settings

Keep the submitted choices available when a background launch has no prepared startup carrier. Tighten the regression checks for restored composer names, legacy commands and prompt submission so recovery preserves the user's work.

* fix(agents): workspaces created on a paired host use the host's launch settings

Creating a workspace on a paired machine could ignore its agent settings or lose a draft while the terminal connected. Keep the selected launch inputs and the pending text together through fallback and reconnect, and never replay partially written input. Preserve older hosts' launch commands and ordinary new-tab prompts' editable behavior.

* fix(agents): workspaces created on a paired host use the host's launch settings

Keep a workspace's pending prompt attached to its original terminal while the pane reconnects. Stop automatic delivery before reporting a final failure, retain the recoverable text, and recognize a launch handed off to the paired host even before its tab appears. Avoid delaying creation on a redundant host status request.

* fix(agents): workspaces created on a paired host use the host's launch settings

New workspaces on a paired computer could lose their first prompt when the terminal briefly disconnected. Delayed delivery could also continue after reporting failure, or leave terminal-only agents without an accessible copy of their prompt.

Keep pending prompts through attachment loss, stop content writes when automatic delivery ends, and offer the existing composer to recover unsent text. Preserve launch identity without inventing empty Arguments or treating missing metadata as a replacement.

* fix(agents): workspaces created on a paired host use the host's launch settings

A replacement pane can learn its terminal before the layout catches up after reconnecting. Re-registering the effective launch settings then dropped the original first-prompt identity.

Recover that identity from the existing verified terminal binding so later remounts keep the same pending prompt.

* fix(agents): workspaces created on a paired host use the host's launch settings

A terminal binding can identify the launch before its effective Arguments are known. Keep permission notifications working in that state without assuming a launch-settings recipe exists.

* fix(agents): workspaces created on a paired host use the host's launch settings

Keep an unsent prompt attached to its launch when a paired host briefly disappears, so reconnecting the same terminal can finish delivery. Clear the rest of the exited pane's status as before, and release the binding after delivery or a confirmed end.

Offer Copy prompt when automatic delivery finally fails, so the prompt can be pasted into the terminal that already opened. Keep creation-failure Reopen separate.

* fix(agents): preserve paired prompt recovery across transport updates

Resolve the consumed startup token through the pane's verified binding instead of reading renderer ownership during every remote attach. Keep the transport's host-authoritative exit and reconnect behavior and its fixture guards.

Settle pending prompt delivery when the host reconfirms a closed surface, including after it discards the terminal's exit record. Update the remount fixture for the Windows PTY model binding.

* fix(agents): merge duplicate imports flagged by type-aware lint

* test(agents): fix type assertions in paired launch fixtures

Type the repository rows, mutable agent choice and terminal tab used by
launch regressions. Reuse the session binding across its real installers
and document the partial-fixture adapters required by the runtime APIs.

Keep the RPC, remount and prompt-delivery assertions unchanged.

* fix(agents): route workspace terminals through their owning host

Creating a terminal for an existing workspace could send it to another focused server. Resolve its owning host when no explicit route was supplied, and keep the host-shaped draft regression within the shared startup contract so renderer checks do not pull in main-process code.

* test(agents): align launch fixtures with runtime dependencies

Retain real i18n exports while replacing translation output, hoist the terminal restore toast spy, and supply the explicit host environment used by paired terminal callers. Keep the existing behavior assertions unchanged.

* fix(agents): isolate prompt failure notice dependencies

Load the prompt failure notice only when a settled hosted launch needs it,
so workspace recovery consumers do not initialize toast and localized agent
catalogs just by importing delivery code. Keep prompt retirement and its
recoverable draft synchronous, and preserve the existing Copy prompt action.

Restore the ordinary new-tab failure toast's original invocation and verify
that Fix Checks retains its edited request through the activation handoff.

* test(agents): route legacy wire launches to their fixture host

Pass the paired environment explicitly in legacy terminal-creation fixtures,
matching real launch callers instead of relying on the focused host. Keep
all compatibility and accepted-creation assertions unchanged.

* fix(agents): preserve paired work-item completion without a startup plan

Blank-terminal work-item launches on paired hosts now keep their successful activation result. If the agent command cannot be built, show that error once instead of reporting an activation failure.

* refactor(agents): deliver paired creation prompts once like agent tabs

Drop the retained hosted-prompt lifecycle (pending map, rebind, deadline,
terminal retirement, token recovery). After the host creates the session the
desktop attempts the prompt once; failure shows the prompt-not-sent toast with
Copy prompt.

* fix(agents): silence prompt failures after closing a workspace terminal

Closing a paired workspace terminal before the agent was ready could report a prompt failure after that terminal was gone. Use shared launch completion and existing tab records to keep deliberate closes silent while preserving one Copy prompt notice after an interrupted delivery. Prepared launches now decide client delivery from the host request.

* fix(agents): report every failed paired prompt delivery

A paired host can retract its tab from inventory without the user cancelling the launch. Always report a failed prompt attempt with Copy prompt, using the same single-attempt completion as agent tabs.

* test(agents): name host-session fixture mock types
2026-11-07 11:12:43 -08:00
Neil 4d33cd22cc refactor: group native chat session reads and delivery by owner (#39526) 2026-11-07 10:02:15 -08:00
Neil 7ccc3c2e50 refactor: group native chat media, links and appearance owners (#39511)
* refactor: place native chat media and link code with defining owners

* refactor: preserve code control copy protection after relocation

* style: format rebased native chat owner imports
2026-11-07 09:37:06 -08:00