Repository navigation
fix(orchestration): let a paired window clear a settled worker failure from the dock - #48427
Conversation
…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.
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
…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
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.
What Changed
orchestration.paired-worker-dock-owner.v1.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.