Skip to content

fix(orchestration): show worker permission prompts in coordinator chats on paired servers - #44919

Merged
AmoabaKelvin merged 3 commits into
mainfrom
fix/remote-worker-approvals
Nov 19, 2026
Merged

AmoabaKelvin merged 3 commits into
mainfrom
fix/remote-worker-approvals

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

When a coordinator chat runs on a paired server or a managed SSH host, its workers' "can I run this?" prompts never showed up in that chat. Nobody could answer them, so each worker was denied when Claude's own timer ran out. Now the chat asks its own host for those prompts and sends your Allow or Deny back to that host, the same way a chat on this Mac already does.

Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​106 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​102
Prod 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​154 $\color{#cf222e}{\Huge{\mathbf{−}}}$​39 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​115

What Changed

Before: the worker-approval cards above a chat's composer only worked when the chat ran on this Mac. The feed always subscribed to the local runtime, nativeChatWorkerApprovalParty returned no party for remote chats, and the host refused an Allow from anything but the desktop's own IPC.

After:

  • Desktop feed follows the chat's host. native-chat-worker-approval-feed.ts keys each stream by host and party and subscribes on the chat's own target. For a paired environment, it first checks the new host capability orchestration.paired-worker-approvals.v1. An older server shows nothing, as before, and is checked again every 5 minutes in case it was updated in place. The stream shares the server's control socket instead of opening a socket per pane.

  • Who counts as a person. workerApprovalAccess now accepts an Allow from two more callers:

    • a paired window that declares the new client capability orchestration.person-approvals.v1 (the desktop declares it);
    • a phone's pairing (clientKind: 'mobile'), directly or relayed through a desktop.

    The orca CLI declares neither, so it stays an agent: today's CLI with its agent flag, an older CLI with no flag, an agent session, and a paired Orca's forwarded federation call. The coordinator-approvals setting still decides for agents, on the host that runs the worker.

  • Orchestration writes reach a server. Every orchestration write from the renderer to a paired environment was refused with orchestration_migration_required because it carried no contract version. Main now stamps it, as local IPC already does (rendererOrchestrationEnvelope).

  • One stream can be ended on a shared socket. The new orchestration.workerApprovalsUnsubscribe {subscriptionId} releases a stream by its subscribe request id. The desktop's shared control socket sends it when a pane closes. Without it, a closed pane's stream would live as long as the socket.

  • The CLI can't hold a phone's pairing. orca environment add now refuses a mobile-scope code, as the desktop's Add Server flow already does, so the orca CLI never connects as a phone (CodeRabbit).

  • Phones can reach the methods. orchestration.workerApprovalsSubscribe, orchestration.workerApprovalsUnsubscribe and orchestration.approvalAnswer are allowlisted as execution-host methods. The phone UI that uses them comes in a separate PR held for UI review.

Why

This uses the same path as local chats: the host that runs the workers owns the prompts and their answers, and every client asks that host. It doesn't build a second remote-only feature. The person signal is a positive capability, not a missing agent flag, so any client that doesn't make the claim (including an older CLI) is refused.

Linked Issue

No issue. This is gap WS-O1 (with CH-G14) from the surface parity audit. It follows #40756, #41259 and #41306, which built the local-only flow.

Visual Proof

N/A: no new UI. A remote coordinator chat now shows the existing approval cards.

Testing

  • Live run on real processes, no model spend: a throwaway Playwright spec on launchPhoneMirrorTopology started a headless orca serve, a hidden desktop paired to it, and a phone paired to the desktop.

    • main: the server advertised no capability. The desktop's approvalAnswer to the server was refused with orchestration_migration_required. The phone's workerApprovalsSubscribe and approvalAnswer were refused with forbidden: not available to mobile clients.
    • this branch: the server advertises the capability. The desktop's Allow passes the person check and reaches the handler (dispatch_inactive for the fake dispatch). The desktop's workerApprovalsSubscribe streams begin/complete over the shared socket. The phone's subscribe streams through the desktop relay. The phone's Allow still needs the contract version, which the phone PR adds.
  • Unit tests: worker-approval-access.test.ts (paired person allowed; agent flag, older flagless CLI and peer caller refused) and native-chat-worker-approval-feed.test.ts (subscribes on the chat's server only when it advertises the capability).

  • Ran the focused tests, the changed-code quality gate and oxlint.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Risk

The riskiest part is the person check. Who may Allow now includes paired windows and phones that declare orchestration.person-approvals.v1. Like the existing agent flag, this is a claim the client makes about itself, and bot sharing already trusts the same kind of claim. Clients that don't make it fail closed. That covers every CLI version.

Mixed versions:

  • New desktop with an older server: no capability, so no cards, as today.
  • Older desktop with a new server: the older desktop never subscribed for remote chats, so nothing changes.
  • Older phones: they don't use these methods.

Each remote chat now holds one more subscription, on the shared control socket.

A plain revert backs this out.

Level: Medium

Review

One review-loop round (Codex + Claude) on this PR, plus host-side findings from the phone PR's round. Fixed:

  • An older CLI without the agent flag would have counted as a person, so the check now requires a positive person capability.
  • Older phone apps never send that capability, so a phone's own pairing scope counts as the person instead.
  • A phone or shared-socket stream had no release, so this PR adds workerApprovalsUnsubscribe.
  • Each pane opened its own socket, so the stream now uses the shared control socket.
  • An "unsupported" answer was never checked again, so it is now checked every 5 minutes.

Left as is: clock skew between server and desktop on the countdown (P3).

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds paired-client capabilities for worker approvals and updates access checks to recognize qualifying paired-device callers as people. Runtime routing now supports worker approval subscriptions and answers, and passive runtime calls pass orchestration envelopes for mutations. Renderer approval feeds now use runtime targets, check environment capability support, and scope subscriptions and feed state by target and party. CLI pairing exchange now rejects mobile-scope offers before host contact.

Merge Risk: Low · up to 15d73

Environment approval prompts can be hidden when the desktop clock is far ahead of the host, and an unsubscribe could theoretically release a replacement stream. Both are narrow edge cases with low impact. The CLI path no longer accepts mobile-scoped pairings.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: worker permission prompts now appear in coordinator chats on paired servers. The fix(orchestration) prefix is clear and the title is specific. The changeset covers des…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template closely: it has ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk with level, Review, Agent skill upstream boundary, Notes, and Checkli…
Full details: Title check

Explanation

The title names the main change: worker permission prompts now appear in coordinator chats on paired servers. The fix(orchestration) prefix is clear and the title is specific. The changeset covers desktop subscription routing, person-approval access, the unsubscribe method, and the contract-version stamping, but the title captures the primary user-facing change.

Full details: Description check

Explanation

The description follows the repository template closely: it has ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk with level, Review, Agent skill upstream boundary, Notes, and Checklist sections. It explains the before/after behavior, the mechanism (host-owned approvals, new capabilities, contract-version stamping, unsubscribe method, shared control socket), the risk and rollback plan, and the mixed-version behavior. Visual Proof is marked N/A with a reason. The Linked Issue section states there is no issue but names related prior PRs and an audit gap; the template says outside contributors must link an issue, so the author's status matters here. The AI Disclosure section is absent from the description, which the template marks as optional for internal contributors. The description is mostly complete.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1ca4d1ba-e803-41fc-b5db-74c1c3924995
Commits

Reviewing files that changed from the base of the PR and between 1da1aba and 15d7348.

Files selected for processing: 2

  • src/cli/runtime/pairing/environment-pairing-exchange.test.ts
  • src/cli/runtime/pairing/environment-pairing-exchange.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Do not hide remote prompts using only the desktop… · native-chat-worker-approval-feed.ts:207

src/renderer/src/components/native-chat/worker-approvals/native-chat-worker-approval-feed.ts:207
Minor · Functional Correctness · Quick win

Do not hide remote prompts using only the desktop clock.

If the desktop clock is ahead by more than the remaining prompt lifetime plus LAPSE_GRACE_MS, this filter removes an approval that remains open on the worker host. Environment feeds now reach this previously local-only path.

Use a host-relative deadline, or retain remote open prompts until the host reports that they closed. This preserves the card when the two clocks differ.

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57faf0e9-3c44-4595-bd4b-518c00b4bfc0
Commits

Reviewing files that changed from the base of the PR and between 6d2a965 and 472290e.

Files selected for processing: 11

  • src/main/ipc/runtime-environments/connections/runtime-environment-shared-control-envelope.ts
  • src/main/ipc/runtime-environments/connectivity/runtime-environment-connectivity-handlers.ts
  • src/main/ipc/runtime-environments/requests/runtime-environment-support-routing.ts
  • src/main/runtime/rpc/methods/orchestration/access/worker-approval-access.test.ts
  • src/main/runtime/rpc/methods/orchestration/access/worker-approval-access.ts
  • src/main/runtime/rpc/server/runtime-rpc-mobile-method-routing.ts
  • src/renderer/src/components/native-chat/worker-approvals/NativeChatWorkerApprovals.tsx
  • src/renderer/src/components/native-chat/worker-approvals/native-chat-worker-approval-feed.test.ts
  • src/renderer/src/components/native-chat/worker-approvals/native-chat-worker-approval-feed.ts
  • src/shared/orchestration/orchestration-runtime-capabilities.ts
  • src/shared/remote-runtime/protocol/electron-remote-runtime-client-capabilities.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 55cf9c4c-c705-4fd3-bd49-2c3fb3413331
Commits

Reviewing files that changed from the base of the PR and between 472290e and 1da1aba.

Files ignored due to path filters: 1

  • src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Files selected for processing: 6

  • src/main/runtime/rpc/methods/orchestration/access/worker-approval-access.test.ts
  • src/main/runtime/rpc/methods/orchestration/access/worker-approval-access.ts
  • src/main/runtime/rpc/methods/orchestration/crew-methods.ts
  • src/main/runtime/rpc/server/runtime-rpc-mobile-method-routing.ts
  • src/shared/orchestration/orchestration-crew.ts
  • src/shared/remote-runtime/control/remote-runtime-shared-control-protocol.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@AmoabaKelvin
AmoabaKelvin merged commit 65e1bc8 into main Nov 19, 2026
60 checks passed
AmethystLiang added a commit that referenced this pull request Nov 21, 2026
* fix(release-scan): close carried 1.4.266 holds (STA-16409, 16441, 16443, 16444, 16445)

- worker approvals: a paired window's self-declared capability no longer counts as a person (STA-16409)
- phone Linear connect/status/selectWorkspace always follow the default server (STA-16445)
- phone folder-workspace delete refuses when unsaved editor drafts exist (STA-16444)
- delete dialog keeps focus on Cancel (STA-16443)
- stop-share only forgets picks of the bot the link serves (STA-16441 sub-note)

* fix(release-scan): address council findings on the 1.4.266 holds

- phone Linear status stays on the desktop fallback; only connect and selectWorkspace pin
- folder-workspace draft check repeats before the purge; bot homes opt out
- stop-share forgets picks unless the list shows another bot's link; a failed list no longer blocks revoke

* fix(release-scan): keep paired-window person approvals as #44919 intends

* test(release-scan): cover bot share stop on a failed list and a draft landing during folder teardown

* test(release-scan): name the bot share stop case for what it asserts

* fix(release-scan): guard live drafts and unverified share ownership

* revert(sharing): leave the stop-share picks fix to #46004

#46004 fixes the same STA-16441 bug and adds the same file; keeping one fix avoids a conflict and a duplicate.

* fix(mobile): bind the Linear account host when setup opens

The phone reads the desktop's tracker host as the Connect drawer or workspace picker opens and tags status, connect and workspace selection with it, so a default change mid-setup cannot send the key to another host. Untagged status reads keep the relay-ready fallback; only untagged account writes from older phones stay pinned to the default host.

---------

Co-authored-by: m4air <[email protected]>
Co-authored-by: Jinjing <[email protected]>
Co-authored-by: Jinwoo-H <[email protected]>
audichuang pushed a commit to audichuang/orca that referenced this pull request Nov 21, 2026
* fix(release-scan): close carried 1.4.266 holds (STA-16409, 16441, 16443, 16444, 16445)

- worker approvals: a paired window's self-declared capability no longer counts as a person (STA-16409)
- phone Linear connect/status/selectWorkspace always follow the default server (STA-16445)
- phone folder-workspace delete refuses when unsaved editor drafts exist (STA-16444)
- delete dialog keeps focus on Cancel (STA-16443)
- stop-share only forgets picks of the bot the link serves (STA-16441 sub-note)

* fix(release-scan): address council findings on the 1.4.266 holds

- phone Linear status stays on the desktop fallback; only connect and selectWorkspace pin
- folder-workspace draft check repeats before the purge; bot homes opt out
- stop-share forgets picks unless the list shows another bot's link; a failed list no longer blocks revoke

* fix(release-scan): keep paired-window person approvals as stablyai#44919 intends

* test(release-scan): cover bot share stop on a failed list and a draft landing during folder teardown

* test(release-scan): name the bot share stop case for what it asserts

* fix(release-scan): guard live drafts and unverified share ownership

* revert(sharing): leave the stop-share picks fix to stablyai#46004

stablyai#46004 fixes the same STA-16441 bug and adds the same file; keeping one fix avoids a conflict and a duplicate.

* fix(mobile): bind the Linear account host when setup opens

The phone reads the desktop's tracker host as the Connect drawer or workspace picker opens and tags status, connect and workspace selection with it, so a default change mid-setup cannot send the key to another host. Untagged status reads keep the relay-ready fallback; only untagged account writes from older phones stay pinned to the default host.

---------

Co-authored-by: m4air <[email protected]>
Co-authored-by: Jinjing <[email protected]>
Co-authored-by: Jinwoo-H <[email protected]>
(cherry picked from commit c16cfb0)
AmethystLiang added a commit that referenced this pull request Nov 21, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
AmethystLiang added a commit that referenced this pull request Nov 22, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
orca-remote-automation Bot pushed a commit that referenced this pull request Nov 22, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
orca-remote-automation Bot pushed a commit that referenced this pull request Nov 22, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
orca-remote-automation Bot pushed a commit that referenced this pull request Nov 22, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
orca-remote-automation Bot pushed a commit that referenced this pull request Nov 22, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
orca-remote-automation Bot pushed a commit that referenced this pull request Nov 22, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
orca-remote-automation Bot pushed a commit that referenced this pull request Nov 23, 2026
Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.
AmethystLiang added a commit that referenced this pull request Nov 23, 2026
* Dock a chat's workers above its composer

Shows the workers a chat started, and its provider subagents and commands,
in one dock joined to the message box: folded to a count, attention first,
failures kept until cleared, remote rows Open-only.

Rebased onto main 9d8649b as one commit (the earlier 28-commit history
replayed the same conflicts repeatedly). Resolved against main:
- main's crew strip (#44629) stays intact as NativeChatCrewBackgroundTasksStatus
  and renders only while a crew is followed (the crew panel is suspended);
- main's worker-approval feed already takes a runtime target (#44919), so the
  dock uses it unchanged and drops its own visibility gate;
- main's quiet approval card (#44348) gains the joined `dock` placement;
- the chat root's size container moves onto NativeChatSurface via className.

* Show a cleared chat's workers in its dock, as a bot's Home Chat

worker-start from a chat records the chat's /clear root as the Dispatch's
creator, while the pane shows the lineage's live session. A bot's Home Chat
keeps one conversation across clears, so its dock read its live session and
found nothing. The dock now reads, acknowledges and stops by the root,
reads presence at the root and republishes every session of the lineage;
worker approvals also read the root's mailbox. All lookups use the in-memory
record store's cached lineage, with no new database reads.

* Add a bot Home Chat worker dock fixture

* Regenerate protected copy keys after main's approval record keys

* Keep the lifecycle transaction helper's name so the blocking-helper ratchet still counts its callers

* Keep worker dock activity in memory, and record the dock's sync orchestration-DB reads and writes in the blocking-helper baseline

Agent status already lives in memory, so the running/idle look the dock
derives from it now does too: a status change of a running worker no
longer opens a BEGIN IMMEDIATE transaction on main. 201 status refreshes
went from 201 write transactions to none.

The five remaining dock files call the orchestration DB's existing
synchronous transaction helpers only for a one-time install backfill, a
user's Clear, a provider failure, and the dock's own reads; each
baseline row says when.

* Keep a dock row's worker name whole when its state label takes the room

On a needs-attention row the "Waiting on you" label shares the line, and the
name shrank as fast as the title, so the bot Home Chat fixture showed
"ORCA-..." instead of ORCA-20. The name keeps its capped width; the title
truncates instead.

* Read a ready worker's dispatch id as text in dock activity, and format two dock files

SQLite rows type each column as a possible null; dispatch ids are non-null
text keys, so the activity map now reads the id once as a string. The
node typecheck failed on the in-memory activity commit without it.

* Fit the dock's lint after rebasing on main

Move the approval card's detail-clamp measurement into its own hook so the card stays under max-lines,
import the dock's session helper from its own module to break the read/activity cycle, and drop the
sticky-workers e2e capture harness, whose stub chat fixture main removed.

* Shoot the bot Home Chat dock fixture folded and open at 390 px

* Show the newest worker question in full, and keep the floating button off the message box

- The newest needs-attention row now gets its own layout: name, state and time on
  one line, then the worker's full question (or the failed row's title and reason)
  in up to three lines, with a Show action. The other rows stay one line each. The
  roster's height budget grows by that row's extra height, so the rows below it
  still show.
- The folded header swaps its robot icon for the amber "?" state icon whenever
  something needs you. Count parts no longer break inside themselves at 320 px.
- "Status changed" now lines up with the time column at narrow widths.
- A visible chat's message box keeps the floating panel button clear of it, using
  the existing keep-clear registry. Hidden chats register nothing.
- Row Stop/Clear moves into WorkerDockRowAction, and the roster budget into
  worker-dock-roster-budget.ts, to stay under max-lines.
- The fixture now includes a failed row, 320 px views, long lists scrolled midway,
  and the real message box with the floating panel button.

* Key dock failures by the /clear root, and skip dock work for heartbeats

- Provider failures are stored under the chat's /clear root, so a Home Chat
  or a cleared chat shows and clears them. A replayed batch no longer
  notifies. The backfill prepares its statement once.
- A dock subscription wakes only when one of its own panes' state, state
  start, host or freshness changes. That check is one pane read. The refresh
  after a real change reads only those panes, through the new
  readAgentStatusOfPanes, not every pane's snapshot.
- A cold seed counts as done only after its read succeeds, so a failed one
  runs again.
- Open worker prompts render in the dock even when it lists no work (remote
  hosts without dock presence, cold start).
- Re-lands the strip render-count contract as a performance test.

* Show the failed icon on a folded worker dock with nothing waiting, and keep the lead row's state label whole at 320 px

* Wake the worker dock when a structured worker's session status changes at its derived pane

* Keep the approval card and structured session within max-lines after rebasing on main

- The card's placement-dependent wrapper classes move to their own module.
- Main's paired-server ask stack now renders from the subagents hook, beside the dock.

* Backfill the worker dock until a marker commits, and bind dialog reads and Retry to their own row

The worker dock backfill was skipped when an install stopped after the
facts table was created but before the backfill committed. A marker row is
now written in the backfill transaction and checked on open, so an
interrupted install backfills on the next open. A completed install skips
it, and acknowledgments are kept.

A worker-result read or Restore that settled after the dialog closed, or
after another row opened, could overwrite that dialog and make Restore
acknowledge the wrong dispatch. Each open now owns a token, and late
settlements are dropped. Restore uses the result shown in the dialog.

A strip failure now stores its message together with its own retry. A
failure that has no retry stores none, so a later error can no longer
show a Retry that re-sends an earlier Stop.

* Type the hoisted RPC call list without an assertion in the dock owner actions test

* Clear a failed Restore's error once a later Restore succeeds in the worker dock result dialog

* Keep worker dock Clear from sending Stop, and Clear all to the settled local failures it counts

A failed row with no settlement now shows the disabled Stop instead of Clear,
and the owner hook ignores Clear for it. Clear all skips federated and
unsettled rows; the header counts and shows the button from the same predicate,
fed the same owner-controlled identities.

---------

Co-authored-by: m4air <[email protected]>
Co-authored-by: m4air <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant