Repository navigation
feat(browser): policy-first link routing, HTML handoff, OSC 8 confirm, and Phase 1c chrome wiring - #285
Merged
Conversation
…, and Phase 1c chrome wiring Route chat, terminal, app-scheme, and Files-panel links through `crates/browser-policy` (`#63002`, `ours.md` §4) and wire WS-1 Phase 1c chrome bindings (`#272`, `UP-109` `#65094`): - **App-scheme policy (`crates/browser-policy/src/app_links.rs`):** - Classify non-web links on the original untrimmed string, rejecting control bytes, bidi overrides/isolates, percent-encoded controls, credentials, and denied schemes; route safe `mailto:` to mail, `mailto:` with attachments / editor schemes / non-open `obsidian:` to copy-only, and allowed conversation apps (`slack:`, `figma:`, etc.) to the 500 ms guarded in-pane review banner. - **Chat Markdown & app-scheme routing (`apps/desktop/src/surfaces/browser/links.rs`, `features/files/src/links.rs`, `plugins/browser/init.luau`):** - Open `http(s)` links in the browser pane when `Settings > Browser` `"Open links in OpenCode"` is on (unless Shift or middle-click forces the OS browser), refuse credentialed HTTP(S) and out-of-workspace `file://` URLs, and pass untrimmed `href` into policy validation. - Drain queued conversation app-link reviews via `Browser:TakeAppLinkReview()` into the 500 ms guarded `RefusalBar`. - **Files panel HTML handoff & View source (`features/files/src/{ops,view,viewer/toolbar}.rs`, `apps/desktop/src/plugin_host/native/files.rs`):** - Open workspace `.html`/`.htm` files from the Files tree/filter in the browser pane when `opens_as_page` is true (preserving `#L` line links as source opens). - Browser `...` -> `"Show the file's code"` opens HTML in raw source mode (`PreviewMode::Source`), and the Files artifact `...` menu offers `"Open in browser"` to jump back. - **Terminal URL & OSC 8 hyperlink confirmation (`features/terminal-surface/src/{links,osc8}.rs`, `apps/desktop/src/surfaces/terminal/{mod,story}.rs`):** - Route plain terminal `http(s)` URLs through `App::route_web_or_app_link` (Shift forces OS browser). - Show a `DialogSize::Normal` confirmation modal (`terminal.osc8`) whenever an OSC 8 hyperlink's target differs from the visible cell text or uses a non-web scheme. - **WS-1 Phase 1c chrome wiring (`apps/desktop/src/plugin_host/native/browser/chrome.rs`, `plugins/browser/init.luau`):** - Expose `BrowserTab:{Find,StopFinding,FindResult,ReloadIgnoreCache,ClearCacheAsync,Favicon}` and render live tab favicons (`data:image/*` with globe fallback) and Find match counts.
|
PR test build retired — merged into |
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…18..UP-122 (#295) - Fold verified fleet PRs #278, #285, #287, #288, #289, #290, #291, and #293 (Rune dc8f7f72: #1301, #1302 focus rescue verified Send+Enter -> effort) into docs/upstream-sync/ledger.{json,md} - Close UP-062 packaged-default regression (#278), UP-095-UI / UP-100 / UP-106 / UP-109 / UP-117 (#285, #289), and PRE-08 (#287); reassign UP-115, UP-116, UP-075 to BROWSER-UI - Add separate Reviewed column for browser rows tracking retrospective security reviews on merged PRs (#245, #268, #272, #277, #288, #275, #287, #285, #289) and pre-merge holds (#274, #280, #281, #283, #286, #292, #294, and BROWSER-TOOLS PR 3+) - Audit upstream anomalyco/opencode bfee96a859..2002222d13 (+6 commits: 1 skipped, 5 added: UP-118..UP-122) and refine radar routing
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Routes links from chat Markdown, terminal output, app schemes, and the Files panel through
crates/browser-policy(#63002,ours.md§4) and wires WS-1 Phase 1c chrome bindings (#272,UP-109#65094):crates/browser-policy/src/app_links.rs):mailto:directly to mail,mailto:withattach/attachmentparams / editor schemes / non-openobsidian:to copy-only, and permitted conversation app schemes (slack:,figma:,linear:, etc.) to the 500 ms guarded in-paneRefusalBar.apps/desktop/src/surfaces/browser/links.rs,features/files/src/links.rs,plugins/browser/init.luau):http(s)links to the embedded browser pane whenSettings › Browser"Open links in OpenCode"is enabled (unless Shift or middle-click forces the OS browser), refuses credentialed HTTP(S) and out-of-workspacefile://URLs, and forwards the original untrimmedhrefto policy validation.Browser:TakeAppLinkReview()into the 500 ms guardedRefusalBar."Show the file's code"(features/files/src/{ops,view,viewer/toolbar}.rs,apps/desktop/src/plugin_host/native/files.rs):.html/.htmfile in the Files tree/filter (or a line-less Markdown link) opens it in the browser pane whenopens_as_pageis true;#Lline links open source at that line....->"Show the file's code"opens HTML in raw source mode (PreviewMode::Source), and the Files artifact...menu adds"Open in browser"to switch back.features/terminal-surface/src/{links,osc8}.rs,apps/desktop/src/surfaces/terminal/{mod,story}.rs):http(s)terminal links route throughApp::route_web_or_app_link(Shift forces OS browser).DialogSize::Normalconfirmation modal (terminal.osc8, Cancel autofocused) showing the real target URI.apps/desktop/src/plugin_host/native/browser/chrome.rs,plugins/browser/init.luau):BrowserTab:{Find,StopFinding,FindResult,ReloadIgnoreCache,ClearCacheAsync,Favicon}and renders live site favicons (data:image/*with globe fallback) and live Find match counts.Verification
pwsh scripts/guardrails.ps1(5/5),pwsh scripts/web.ps1 -Check(wasm32+web-clock), andcargo check --workspace --all-targetsgreen.HARNESS_OPEN_EXTERNAL_LOG(proof/browser-ui/prove-pr3.ts):https://-> opens embedded pane (externalCount: 0); Shift+click &links=false-> open external browser.https://user:pass@..., out-of-workspacefile://,mailto:?attachment=,vscode://,javascript:,ms-msdt:-> zero external launches, zero pane opens.mailto:-> external mail handler.slack://channel?id=C123-> opens guardedRefusalBar("From the conversation"); click at 200 ms ignored, click at 750 ms launchesslack://channel?id=C123.demo.html-> opens browser pane ->...->"Show the file's code"opens HTML source -> artifact...menu offers"Open in browser".proof/browser-ui/pr3/).#272).