Repository navigation
feat(agent-launch): the desktop's own launch is named on the activation of the workspace it creates - #26149
feat(agent-launch): the desktop's own launch is named on the activation of the workspace it creates#26149brennanb2025 wants to merge 4 commits into
Conversation
…f the workspace it creates
The host already tells the window to open a workspace an agent.launch create
makes, during the create and before the launch answers. That activation now
carries an optional `launch: { operationId }` when the create was the desktop
window's own launch and asked to open its workspace. The window then opens the
workspace with no bare shell of its own (the launch brings the first tab) and
tells whatever waits on that launch which workspace it got. A phone's or the
CLI's launch never sets it; older clients ignore the field.
…ce's activation The composer opens a new workspace only if the user is still watching its creation, and otherwise mounts it quietly with a toast. An activation that named a launch opened the workspace regardless. Now the launch running in this window takes the activation over and decides; with no such launch here the window opens the workspace as before, with no bare shell beside the launch's own tab.
…unch-workspace-activation
|
The planned desktop workspace-and-agent flow receives the workspace activation before the launch finishes delivering its first prompt. This change adds the launch identity to that existing event so its creating window can own navigation and the first tab; current desktop entry points remain unchanged because the production owner is in the companion flow. Fixed the CI line-limit failure by moving setup-result construction into the existing setup module, preserving behavior. The original aggregate verification failure was downstream of that lint failure. Fresh host, renderer, architecture, and final readiness reviews found no additional reachable PR-caused regressions; scoped Node/renderer typechecks, 34 selected tests, lint/code-quality checks, and PR Checks, including cross-version wire compatibility, passed on f172e6f. QA deferred to the combined 4a+4b run. This PR has no production owner yet, so the new navigation and first-tab behavior cannot be exercised here. No main-versus-PR tab-strip comparison or navigation-away result is claimed, and no screenshots are presented as proof. The Windows setup attempt was stopped when its driver proceeded through a pending launch hold; that evidence is not accepted as functional QA. The first producer must preserve setup and configured tabs, release ownership, and prove navigation-away and recovery behavior. A successful final launch reply does not guarantee recovery from a failure before surface publication. Live SSH and native-mobile ownership QA are deferred to that combined flow; optional-field source compatibility was reviewed here. Review has converged, but this remains draft and must land with the companion flow after #26007. |
ELI5
The planned desktop flow creates a workspace and starts its agent through one host operation. The host can announce that the workspace is open before that operation finishes delivering the first prompt. Without the launch identity, the window cannot tell which pending creation owns that announcement, so it can open an extra empty shell or show a workspace after the user has moved elsewhere.
This PR adds that identity to the existing announcement. It prepares the window to let the creating launch decide whether to show the workspace and supply its first tab. Existing desktop controls remain unchanged: this PR has no production caller registering that ownership yet. It stays draft and must land together with the companion creation flow, which waits for #26007.
What Changed
launch: { operationId }. The host includes it only for a desktop-owned agent launch that explicitly opens its created workspace.Why
Adding one optional field to the existing event reuses the host's activation channel and the window's existing initial-tab behavior. A second notification channel would duplicate the same creation event. The launch identity is temporary window ownership, not another persisted copy of the workspace.
The first owner must preserve the full activation work, including setup and configured tabs, release ownership when the launch settles or is abandoned, and respect navigation away. Those checks belong to the companion flow. This PR does not prove recovery after a missed notification: a successful final reply includes the workspace ID, but a failure before the final surface is published is not guaranteed to do so. A durable created-workspace checkpoint remains separate follow-up work (#26060).
A desktop connected to another Orca runtime remains a paired client there and does not receive the desktop-owned marker. Its current behavior is preserved; expanding that ownership needs explicit client identity handling.
Linked Issue
Step 3 of the agent-launch plan, preparation for the desktop workspace-and-agent creation flow. The companion producer waits for #26007; this PR is not being readied alone.
Visual Proof
QA deferred to the combined 4a+4b run. This PR has no production owner yet, so the new navigation and first-tab behavior cannot be exercised here. No main-versus-PR tab-strip comparison or navigation-away result is claimed, and no screenshots are presented as proof. The Windows setup attempt was stopped when its driver proceeded through a pending launch hold; that evidence is not accepted as functional QA.
Testing
Scoped Node and renderer typechecks passed on the merged tree.
Seven named test files passed 28 tests, covering launch metadata, renderer owner/fallback handling, local setup receipts, startup, folder creation, remote creation, and execution-host routing.
Six selected runtime creation/activation cases passed.
Formatting, changed-code quality, lint, and PR Checks passed at
f172e6f960e13590e7f8abdfad2cf96cef956387, including cross-version wire compatibility.Source review covered the optional-field consumers in current/prior mobile code and desktop runtime streams. Native mobile, WSL, Linux, and live SSH ownership behavior were not exercised. Full ownership and recovery QA waits for the first producer.
I manually tested the new ownership flow locally
Automated tests added/updated
Author: @BrennanKB5