You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(browser): a failed link open in Orca's browser says why - #47965
When a link opens in Orca's browser for a workspace on a paired computer and it fails, Orca said only "Unable to open URL." and nothing about why, so the failure couldn't be diagnosed. Now the toast adds one short line naming the cause, like "Error · create · invalid_argument", built only from Orca's own categories and a known error code, never the link itself.
What Changed
The "Unable to open URL." toast gets one short localized line under the title, on both places that show it (links opened through the link setting: chat, terminal, app links; and the workspace card's linked issue or review), through one shared reporter:
"Error · · " for a failed remote open (stage: route, prepare, create, materialize or open)
"Workspace's computer wasn't found." when the workspace has no matching host
"Link open was blocked." when the link's open was refused
"Not a web link." for non-http(s) targets
Only error codes Orca recognizes are shown; any other or missing code reads "unknown". The error message is never shown in the toast, and remote opens from user links now log only the known code (failed preparation, navigation and cleanup included), because the host's message can carry the URL.
A desktop tab the store refuses for a clicked link reads "Error · create · client_create_rejected" (it showed the title only); a managed browser the policy refuses reads "Error · route · browser_unavailable".
An HTTP link that can't open in the requested group says "Couldn't open the link in this group" instead of repeating the URL; file links keep their own toast.
The cause comes from the first error, so a cleanup error that follows can't replace it (a first error with no code stays "unknown"). A specific code that an older host wraps in a generic runtime_error reply is named instead.
A link clicked in the app used to lose its cause on the way to the toast (reduced to a bare "failed"); the typed failure now reaches it. A click superseded by a newer one still stays silent.
The full English reason is logged ([workspace-browser-tab-open], [web-runtime-session]) and recorded as a diagnostics breadcrumb (workspace_browser_tab_open_failed, web_runtime_browser_create_failed).
Why
Opening a link on a paired host can fail at several points (owner checks, placement on this desktop, the host's tab create, the page showing up here), and every one of them collapsed into the same toast while the cause was dropped (failure logging without details, definitive host codes returned as false, refused link outcomes rethrown as a bare message). Reports of this failure on paired hosts could not be traced. This change makes the next failure name itself instead of guessing at a fix. Checked against how comparable products handle this.
Linked Issue
Internal report (maintainer); no public issue.
Visual Proof
Component fixture sidebar/workspace-card/details/WorktreeCardLinkedUrlOpenFailure (invented data), rendering the app's real Toaster. "Computer not found" and "Not a web link" are raised by the production card open; the longest host-error line is raised through the production reporter. Before this change the toast showed the title only. The toaster is pinned inside the frame for the shot; the toast card is unchanged.
Case
Light
Dark
Longest line
German (new line falls back to English until translated)
Computer not found
Not a web link
Card issue menu › Open in Orca browser (fixture sidebar/workspace-card/surface/WorktreeCardIssueOpenFailure, real card, hover and menu)
Testing
Automated (run in CI): a paired host's refusal reaches the toast line through openWorkspaceBrowserTab; a policy-refused open names its cause; a clicked link that fails keeps its cause, and a click that goes stale while failing stays silent (this one guards existing behavior); a desktop tab the store refuses on a clicked link reports a create failure; the first error's stage and code are reported, not a later cleanup error's, including a first error with no code; the code reader returns only known codes and prefers a specific code over runtime_error; a user link's failed navigation logs its code, never the URL; an unrecognized code shows as "unknown" and the URL never appears. Each of these fails without its change, except the stale-click guard.
Seeded fixture WorktreeCardIssueOpenFailure drives the real card issue menu and throws unless the toast names a cause without the link; restoring the old title-only card handler makes it fail.
Local: format, lint, the web and node typechecks, and the fixture renders above. Unit tests run in CI.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change (all but the stale-click guard, which protects existing behavior) and avoids the test anti-patterns
Performance
None, because the new code runs only after an open has already failed (building one short string, one console line and one breadcrumb); the success path is unchanged.
Risk
Level: Low
The riskiest part is the toast line: it could be unclear, or leak something if an unsafe value reached it. Codes are limited to a fixed list, stages are fixed words, and messages are never used, so the worst case is an unhelpful line. Older paired hosts are covered by the runtime_error handling. Back out with a plain revert; nothing is saved.
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.
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)
Opening a link in Orca's browser for a workspace on a paired host could fail with only
"Unable to open URL.": the host's reason was dropped (operation-only logging, definitive
host codes returned as false, refused link outcomes thrown as a bare message), so the
failure could not be told apart from the outside.
The toast now adds the failure's reason ("Reason: runtime browser tab creation failed
(invalid_argument)"), built only from Orca's own reason text and the host's machine error
code, never the error message, which can name the URL. The same reason is logged and
recorded as a diagnostics breadcrumb.
…n host codes
- A link clicked in the app kept only a bare "failed" when its open threw, so the toast said
"link open failed" even for a specific host refusal. The typed failure now reaches the toast.
- The diagnostics code reader returns only codes Orca knows (others read as other_code), since
a host can put any text in an error code.
- A specific code an older host flattened into a runtime_error reply is named instead of
runtime_error.
…error
- The reason says where a remote open failed (prepare, create or materialize) with the first
error's known code, so a cleanup error that follows can't replace it, and an open that the
host created but never showed isn't called a failed create.
- Closing the staged tab before it opened reads closed_before_open.
- Reasons about the workspace's host use fixed wording instead of host and runtime ids.
- The toast line is now one short localized sentence per cause, with only stage and code
left raw: "Host error · create · invalid_argument", "Workspace's computer isn't
connected.", "Link open was blocked.", "Not a web link.". An unrecognized or missing
code reads "unknown". The full English reason stays in the log and breadcrumb.
- A first failure with no code keeps it, instead of borrowing the cleanup error's code.
- The code reader reads fields without type assertions; the failure code lists live in a
store-free module so link routing doesn't import browser creation.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
Runtime browser creation now reports failure stage and code information. Workspace browser-open errors retain a reason and record a crash breadcrumb. Link-opening paths preserve typed errors, and failure toasts display translated details when available. Tests cover error-code extraction, failure details, linked-URL handling, and stale requests.
Merge Risk: Minimal · up to 27cb0
Failed link opens now show a localized cause line, including for policy refusals, refused desktop-tab creation, and cleanup errors that follow a first failure. The earlier concerns about missing reason lines and cleanup codes replacing the original code appear addressed, with tests added. No material merge risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(browser): a failed link open in Orca's browser says why" matches the main change. The PR adds a cause line under the "Unable to open URL." toast for failed workspace-browser link opens.…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is thorough and covers nearly every template section. It has an ELI5, a detailed What Changed list, a Why section, a Visual Proof table with light and dark screenshots for each case, T…
Full details: Title check
Explanation
The title "fix(browser): a failed link open in Orca's browser says why" matches the main change. The PR adds a cause line under the "Unable to open URL." toast for failed workspace-browser link opens. The title is specific and concise, and it follows a conventional commit prefix.
Full details: Description check
Explanation
The description is thorough and covers nearly every template section. It has an ELI5, a detailed What Changed list, a Why section, a Visual Proof table with light and dark screenshots for each case, Testing with automated coverage, a Performance justification, a Risk section with level and back-out plan, and the upstream-boundary and checklist items. Gaps: the Linked Issue section says 'Internal report (maintainer); no public issue' instead of a 'Fixes #' reference, which the template says there should always be for outside contributors. The author is not identified as a maintainer, so this is a template gap. The AI Disclosure section is also absent. The Review and Notes sections are not addressed. The manual-testing box is unchecked and the lint/typecheck/test/build box is unchecked, and the Testing section says only local format, lint and typecheck were run. These are mostly acceptable, but the missing issue reference and AI disclosure should be clarified.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
…point tests
- Toast lines no longer claim more than Orca knows: "Error · <stage> · <code>" (the failure
can be local placement or this desktop's page, not only the host) and "Workspace's
computer wasn't found." (no connectivity was checked).
- The code reader narrows with `in` instead of reflection, and the toast-line switch
handles a missing display explicitly.
- Tests drive the real entry points: a paired host's refusal through openWorkspaceBrowserTab
reaches the toast line, and link routing shows that line under the toast title.
…ted and captured
- Link routing and the workspace card's linked issue/review share showBrowserOpenFailure.
- The card's open moves to openLinkedUrlInWorkspaceBrowser, which its hook calls; a test
drives it with a typed host refusal and checks the toast line keeps stage and code, not the URL.
- Fixture WorktreeCardLinkedUrlOpenFailure renders the real Toaster with toasts raised by the
production open (computer not found, not a web link) and the longest host-error line, in
English and German.
A managed browser the policy refuses now reads "Error · route · browser_unavailable", and a
desktop tab the store refused reads "Error · create · client_create_rejected", instead of
showing no cause line.
…; name local create failures
- Remote opens from user links log only the known error code for failed preparation,
navigation and cleanup (the host's message can carry the URL); detailed mode is unchanged.
- An HTTP link the group refuses says "Couldn't open the link in this group" without the URL;
file links keep their own toast.
- A desktop tab the store refuses on a clicked link carries a fixed client-create-rejected tag,
so the toast reads "Error · create · client_create_rejected" as the card already did.
- Fixture WorktreeCardIssueOpenFailure drives the card's real issue menu > Open in Orca browser
and fails unless the toast names a cause without the link. The mock-call toast tests are
replaced by it, per the repo's test rules; logic tests stay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
When a link opens in Orca's browser for a workspace on a paired computer and it fails, Orca said only "Unable to open URL." and nothing about why, so the failure couldn't be diagnosed. Now the toast adds one short line naming the cause, like "Error · create · invalid_argument", built only from Orca's own categories and a known error code, never the link itself.
What Changed
" for a failed remote open (stage: route, prepare, create, materialize or open)runtime_errorreply is named instead.[workspace-browser-tab-open],[web-runtime-session]) and recorded as a diagnostics breadcrumb (workspace_browser_tab_open_failed,web_runtime_browser_create_failed).Why
Opening a link on a paired host can fail at several points (owner checks, placement on this desktop, the host's tab create, the page showing up here), and every one of them collapsed into the same toast while the cause was dropped (failure logging without details, definitive host codes returned as
false, refused link outcomes rethrown as a bare message). Reports of this failure on paired hosts could not be traced. This change makes the next failure name itself instead of guessing at a fix. Checked against how comparable products handle this.Linked Issue
Internal report (maintainer); no public issue.
Visual Proof
Component fixture
sidebar/workspace-card/details/WorktreeCardLinkedUrlOpenFailure(invented data), rendering the app's real Toaster. "Computer not found" and "Not a web link" are raised by the production card open; the longest host-error line is raised through the production reporter. Before this change the toast showed the title only. The toaster is pinned inside the frame for the shot; the toast card is unchanged.sidebar/workspace-card/surface/WorktreeCardIssueOpenFailure, real card, hover and menu)Testing
Automated (run in CI): a paired host's refusal reaches the toast line through openWorkspaceBrowserTab; a policy-refused open names its cause; a clicked link that fails keeps its cause, and a click that goes stale while failing stays silent (this one guards existing behavior); a desktop tab the store refuses on a clicked link reports a create failure; the first error's stage and code are reported, not a later cleanup error's, including a first error with no code; the code reader returns only known codes and prefers a specific code over
runtime_error; a user link's failed navigation logs its code, never the URL; an unrecognized code shows as "unknown" and the URL never appears. Each of these fails without its change, except the stale-click guard.Seeded fixture
WorktreeCardIssueOpenFailuredrives the real card issue menu and throws unless the toast names a cause without the link; restoring the old title-only card handler makes it fail.Local: format, lint, the web and node typechecks, and the fixture renders above. Unit tests run in CI.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change (all but the stale-click guard, which protects existing behavior) and avoids the test anti-patterns
Performance
None, because the new code runs only after an open has already failed (building one short string, one console line and one breadcrumb); the success path is unchanged.
Risk
Level: Low
The riskiest part is the toast line: it could be unclear, or leak something if an unsafe value reached it. Codes are limited to a fixed list, stages are fixed words, and messages are never used, so the worst case is an unhelpful line. Older paired hosts are covered by the
runtime_errorhandling. Back out with a plain revert; nothing is saved.Agent skill upstream boundary
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)