Skip to content

fix(agents): an old Windows or unknown-platform host asks to update instead of answering its default list - #27164

Merged
OrcaWin merged 3 commits into
mainfrom
OrcaWin/d4-d4-s10
Oct 10, 2026
Merged

OrcaWin merged 3 commits into
mainfrom
OrcaWin/d4-d4-s10

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​146 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​146
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​105 $\color{#cf222e}{\Huge{\mathbf{−}}}$​34 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​71

ELI5

When you open the agent menu for a workspace that lives on another Orca server, Orca asks that server which agents the workspace can use. Older servers cannot answer for a specific workspace, so they answer with the agents of the server itself. On Windows that is often the wrong list: a workspace running inside WSL has its own agents. Now Orca only trusts that fallback list when it knows the server is not Windows; otherwise it shows "Update Orca on this server to list this workspace's agents".

What Changed

  • Before: a paired server without workspace-scoped agent detection (preflight.workspace-scoped.v1) answered every workspace with its machine-wide default list. For a Windows server with a WSL workspace, the quick-launch menu listed native Windows agents that would not launch in the workspace, and missed the WSL ones. The same happened for a server that does not report its platform at all.
  • After: for such a server, the default list is used only if the server reports a platform that is known and not Windows (Linux, macOS). A Windows server, or one with no reported platform, records an empty list for that workspace plus an "update the server" flag; the quick-launch menu shows "Update Orca on this server to list this workspace's agents" instead of "No agents detected". Refresh does the same (it replaces a stale list rather than keeping it). Once the server is updated, the next detection clears the flag and loads the workspace's real list. The server's own default list (Settings → Agents with no workspace) is unchanged.
  • Mechanism: callRuntimeAgentDetection (renderer store, runtime-detected-agents.ts) already checks the capability before sending a workspace-scoped request. When the cached verdict says the capability is missing, it now fetches a fresh status.get (only for such old servers) and decides from that one answer: capability present after all (in-place upgrade) → scoped request; hostPlatform known and not win32 → the default list as before; otherwise a typed RuntimeAgentDetectionNeedsServerUpdateError. The slice commits that as [] + runtimeAgentDetectionNeedsServerUpdate[key], which useDetectedAgents exposes as needsServerUpdate. The flag is dropped with its environment like the other per-key records. A fresh status is used instead of peeking at the shared capability cache because a concurrent probe can leave that cache without a status for a moment, which would wrongly flag a Linux server.

Why

hostPlatform is optional in the status contract, so absence cannot be read as "not Windows"; failing closed with a clear update prompt is safer than offering agents that may not exist where the workspace runs. Alternatives considered: guessing the workspace's runtime from its path (rejected — a guess, and the server owns that decision), or keeping the default list with a warning (rejected — users would still launch agents into the wrong runtime). No wire change: only the client's reading of an existing optional field changes.

Linked Issue

None — part of the host-routing design stack (slice D4-S10).

Visual Proof

N/A — the only visible change is the disabled menu row text for old Windows/unknown-platform servers; covered by store tests.

Testing

  • New src/renderer/src/store/slices/runtime-detected-agents.test.ts: old Windows host and no-platform host → empty list + update flag, no agent request sent; refresh replaces a cached list; old Linux host still gets its default; host default (no workspace) unchanged; flag clears after the host gains the capability; concurrent workspaces on an old Linux host both get its default; flag dropped with its environment. The Windows/no-platform cases fail on main (it returns the server default list).

  • Focused suites: store/slices, runtime, components/tab-bar, hooks, i18n — all pass except SortableTab.rename-shortcut.test.tsx, which fails identically on main (lucide mock).

  • pnpm tc:web, oxlint, pnpm run check:code-quality:changed pass.

  • I manually tested these changes locally

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

Review

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

Cross-platform: the rule is about the server's reported platform, not the client's. SSH workspaces are untouched (they use the SSH detection path). Folder workspaces go through the same workspace-scoped key. Mobile is unaffected (separate detection code). Backwards compatibility: new servers are unaffected; old non-Windows servers behave as before.

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)
  • 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)

…nstead of answering its default list

A host without preflight.workspace-scoped.v1 answers a workspace's agent
request with its own default list. On a Windows host that list misses a WSL
workspace's agents, and a host that does not report its platform may be
Windows. Only a known non-Windows host's default is still used; the others
record an empty list plus an update notice, shown in the quick-launch menu.

Co-Authored-By: Claude <noreply@anthropic.com>
@OrcaWin
OrcaWin requested a review from brennanb2025 as a code owner October 10, 2026 05:58
m4air and others added 2 commits October 9, 2026 23:02
Reading the platform from the shared capability cache could see a probe
another caller had just started (no status yet) and flag a Linux host. A
fresh status is race-free and also catches an in-place upgrade.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7fdd4ae2-f4da-4af3-af22-1185b7cf37ae

📥 Commits

Reviewing files that changed from the base of the PR and between 9c41d9e and ced2814.


📒 Files selected for processing (10)
  • src/renderer/src/components/tab-bar/QuickLaunchButton.tsx
  • src/renderer/src/hooks/useDetectedAgents.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/store/slices/runtime-detected-agents.test.ts
  • src/renderer/src/store/slices/runtime-detected-agents.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.



📝 Walkthrough

Walkthrough

Runtime agent detection now checks current host status when cached data does not report workspace-scoped support. The slice records when Windows or unknown-platform hosts need a server update, and the detected-agent hook exposes that state to Quick Launch. The menu displays a localized update message when the state is set.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to ced28

No actionable merge-blocking issue is established for the workspace-agent update notice. The change is mergeable after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main behavior change for old Windows or unknown-platform hosts.
Description check Passed The description is mostly complete and covers the user impact, implementation, rationale, testing, visual proof, and compatibility considerations. It does not provide an actual linked issue, and the f…
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.

Full details: Docstring Coverage

Explanation

Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (6 skipped: 6 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

  • 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

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit ebeafbd into main Oct 10, 2026
30 checks passed
OrcaWin added a commit that referenced this pull request Oct 10, 2026
…st (#27177)

#27164 made an old host without a known non-Windows platform ask for an update
instead of answering its default list. The cross-version journey mocked the
capability probe but not the status read, so no request ever reached the wire.

Co-authored-by: m4air <m4air@Mac.localdomain>
@nwparker nwparker mentioned this pull request Oct 10, 2026
7 of 9 tasks
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