Skip to content

fix(orchestration): let a paired window clear a settled worker failure from the dock - #48427

Merged
AmethystLiang merged 3 commits into
mainfrom
AmethystLiang/dock-paired-clear
Nov 24, 2026
Merged

AmethystLiang merged 3 commits into
mainfrom
AmethystLiang/dock-paired-clear

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

A bot's Home Chat can live on another computer you paired with Orca. When one of its workers failed, the worker list above the composer kept counting it as "Needs attention" with only a Show button. There was no Clear, even after you had dealt with the failure. Now a paired window gets the same Clear (and Stop) as the computer the chat runs on.

Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​192 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​186
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​28 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​25

What Changed

  • Before: the window turned off Clear and Stop for every chat that wasn't on this computer. The rows only said "Stop or clear this from the computer it runs on". A paired server usually has no window of its own, so the failure stayed in the count with no way to clear it. The host also accepted these two actions only from its own window, so a paired window would have been refused anyway.
  • After:
    • The host accepts dock Clear and Stop from a person on a paired window or phone. It uses the same person check that already decides who may answer a worker's approval. The orca CLI, agents and calls forwarded by another paired Orca are still refused.
    • The host advertises this with a new runtime capability, orchestration.paired-worker-dock-owner.v1.
    • The window offers Clear and Stop on a paired chat only when the host advertises that capability and this client is one the host counts as a person. An older host, or a client it wouldn't accept, keeps today's Open-only rows. No control is shown that would always fail.
  • Unchanged: a worker that runs on a third computer is still refused by both handlers and still shows no Clear. Clearing still only hides the row from the attention count. The failed Dispatch, its report and the item history are kept, and the "Show in dock again" action restores the row.

Why

The issue asks to acknowledge a settled failure from the Home Chat where it shows up. The only "computer it runs on" here is a headless server, so pointing there was a dead end. Reusing the approvals person check gives Clear and Stop the same trust level as Allow, which is the more sensitive action and is already allowed from paired windows. Checked against how comparable products handle this: they let any connected person dismiss these items and keep agents out.

Linked Issue

Fixes #48296

Visual Proof

N/A: no new UI. The Clear and Stop controls are the existing dock row controls, unchanged in look. They now also appear on a paired host's chat when the host supports them. Which rows get them is pinned by the component tests below.

Testing

  • 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

  • worker-dock-methods.test.ts: a person on a paired window or phone passes the owner check. A paired agent and a forwarded paired-Orca call are still refused, and so are the CLI and a plain paired client. A worker on another computer is still refused. The host advertises the new capability.

  • NativeChatStructuredSessionStatus.test.tsx: with a supporting host, a settled failure shows Clear and sends the acknowledgment to the paired host. An older host, a client the host wouldn't count as a person, and a worker on another computer all stay Open-only.

  • The new tests fail on main, and the client-check test fails with that check removed.

  • Not tested end to end against a real paired Windows host.

Performance

None. This adds one cached capability lookup per paired chat. It reuses the hook that already answers other capability questions and re-asks only on reconnect. The host check is a few field reads on the two owner actions.

Risk

Level: Low. The riskiest part is who the host accepts Clear and Stop from. That is now the same set of callers allowed to answer a worker's Allow. Older hosts and older windows keep today's behavior. A plain revert backs this out. Acknowledgments already made stay, and "Show in dock again" can undo them.

…e from the dock

A bot Home Chat on a paired host showed a settled failure under Needs attention with no
Clear: the window hid owner actions for any non-local chat, and the host only accepted
them from its own window. The host now takes Clear and Stop from a person on a paired
window or phone (the same check worker approvals use; agents and the CLI are still
refused) and advertises it, and the window offers them once the host does.

Fixes #48296
…unts as a person

A browser client served by a paired host is not one the host treats as a
person, so its Clear and Stop would always be refused; it now keeps Open-only
rows. Adds tests for the advertised capability, the federated refusal from a
paired person and the per-row remote mask.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Paired callers identified as people can use worker dock Clear and Stop actions when authorized. The renderer enables environment-target owner actions when the paired client advertises person-approval capability and the environment supports the required runtime capability. Local-target owner actions remain enabled. Tests cover authorization, capability checks, federated dispatch refusals, and clearing settled failures.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 20492

Paired windows and phones identified as people can now Clear and Stop workers from the Home Chat dock when the host supports it. Older hosts and unrecognized clients keep the Open-only behavior. No concrete merge-blocking risk was identified, though the feature has not been tested end to end against a real paired host.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a paired window can now clear a settled worker failure from the dock. It is specific and matches the changeset, which adds owner checks for dock Clear and Stop and gat…
Description check Passed The description follows the template. It has ELI5, What Changed, Why, Linked Issue (Fixes #48296), Visual Proof (N/A with reason), Testing, Performance, and Risk sections with a level. Testing lists t…
Linked Issues check Passed Issue #48296 asks that a coordinator can acknowledge a settled single-worker failure from the Home Chat dock. It also asks that the failed dispatch, report, and item history stay intact. At the review…
Out of Scope Changes check Passed All changed areas connect to the issue's Clear and acknowledge behavior. The changes are: the requireOwner rule in worker-dock-methods.ts (caller check, read directly at head); the new runtime capabil…
Full details: Title check

Explanation

The title names the main change: a paired window can now clear a settled worker failure from the dock. It is specific and matches the changeset, which adds owner checks for dock Clear and Stop and gates the UI on a new capability. The title uses the fix(orchestration) prefix and stays under one line.

Full details: Description check

Explanation

The description follows the template. It has ELI5, What Changed, Why, Linked Issue (Fixes #48296), Visual Proof (N/A with reason), Testing, Performance, and Risk sections with a level. Testing lists the automated tests and notes what was not tested end to end. The manual-test checkbox is unchecked, and the AI Disclosure, Agent skill upstream boundary, and Checklist sections are absent or unfilled. Those gaps are minor and do not block the review.

Full details: Linked Issues check

Explanation

Issue #48296 asks that a coordinator can acknowledge a settled single-worker failure from the Home Chat dock. It also asks that the failed dispatch, report, and item history stay intact. At the reviewed head, src/main/runtime/rpc/methods/orchestration/worker-dock-methods.ts defines requireOwner as isPersonCaller(ctx) from access/worker-approval-access. This rule guards orchestration.workerDockAcknowledge and orchestration.workerDockStop. A person on a paired window or phone passes it. The orca CLI, agents, and forwarded paired-Orca calls are refused with owner_required. The acknowledge handler only updates acknowledgment state through acknowledgeWorkerDock. The Stop handler keeps the federated refusal (remote_owner_actions_unsupported) and the dispatch_not_found check. The renderer change in NativeChatStructuredSessionStatus.tsx, as summarized, shows Clear and Stop on a paired chat only when the host advertises ORCHESTRATION_PAIRED_WORKER_DOCK_OWNER_RUNTIME_CAPABILITY and the client is a person. Two limits apply. A worker on a third computer keeps the Open-only row. The reported host runs Orca 1.4.272, so it shows Clear only after it runs a build that advertises the new capability. The issue's alternative clause covers the first limit. The renderer source and test files could not be read directly in this review (the diff tool was unavailable), so the renderer verdict relies on the PR summary and the previous assessment.

Full details: Out of Scope Changes check

Explanation

All changed areas connect to the issue's Clear and acknowledge behavior. The changes are: the requireOwner rule in worker-dock-methods.ts (caller check, read directly at head); the new runtime capability constant in orchestration-runtime-capabilities.ts; the renderer gating in NativeChatStructuredSessionStatus.tsx for paired chats; and the tests in worker-dock-methods.test.ts and NativeChatStructuredSessionStatus.test.tsx that cover these paths. No unrelated refactor or feature is evident in the summary. The broader caller check is the intended scope change and is stated in the PR description. The renderer diff and test diffs were not directly readable in this review, so this verdict relies on the summary for those files.

  • 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: cd1a8dab-df9b-460f-bc23-a546f6e1c6c5
Commits

Reviewing files that changed from the base of the PR and between 69de0f4 and 2049289.

Files selected for processing: 1

  • src/main/runtime/rpc/methods/orchestration/worker-dock-methods.test.ts
Files skipped from review as they are similar to previous changes: 1

  • src/main/runtime/rpc/methods/orchestration/worker-dock-methods.test.ts

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

@AmethystLiang
AmethystLiang merged commit 7b9db65 into main Nov 24, 2026
57 checks passed
Jinwoo-H pushed a commit that referenced this pull request Nov 24, 2026
…e from the dock (#48427)

* fix(orchestration): let a paired window clear a settled worker failure from the dock

A bot Home Chat on a paired host showed a settled failure under Needs attention with no
Clear: the window hid owner actions for any non-local chat, and the host only accepted
them from its own window. The host now takes Clear and Stop from a person on a paired
window or phone (the same check worker approvals use; agents and the CLI are still
refused) and advertises it, and the window offers them once the host does.

Fixes #48296

* fix(orchestration): offer dock Clear only to clients a paired host counts as a person

A browser client served by a paired host is not one the host treats as a
person, so its Clear and Stop would always be refused; it now keeps Open-only
rows. Adds tests for the advertised capability, the federated refusal from a
paired person and the per-row remote mask.

* test(orchestration): type the dock owner test params instead of casting
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.

[Bug]: Settled worker failure stays in the Home Chat dock with no visible Clear action

1 participant