GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(browser): add CEF find, context-menu, hard-reload, cache-clear, favicon, and crash-log handlers by Hona · Pull Request #272 · anomalyco/opencode-rune

Conversation

@Hona

@Hona Hona commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

Implements Phase 1c CEF browser handlers and browser-pane / desktop integration (progressing UP-095 #63002, delivering UP-109 #65094 engine/tab favicon data, and closing UP-110 #65096 privacy-safe crash/load-failure diagnostics):

  • In-page Find (apps/browser-engine/src/find.rs, crates/browser-pane/src/find.rs): Wires CEF FindHandler (on_find_result → EngineMsg::FindResult), HostMsg::{Find, StopFind}, Ready { find: true }, and an explicit FindState machine (Closed | Editing | Searching | Found) with document-change reset.
  • Page context menu (apps/browser-engine/src/menu.rs, apps/desktop/src/surfaces/browser/context_menu.rs): Strips Chromium's default menu (model.clear() + sentinel), validates link/image URLs through browser_policy, routes right-clicks to Rune's native/drawn popup menu (Back, Forward, Reload, Reload without saved files, Open in default browser, link/image/spellcheck/edit actions), and always settles CEF's RunContextMenuCallback (Ready { context_menu: true }).
  • Hard reload & origin-scoped cache clear: Extends HostMsg::Reload with #[serde(default)] ignore_cache: bool (reload_ignore_cache(), wired to Mod+Shift+R / Ctrl+F5) and adds HostMsg::ClearSiteCache clearing origin cache_storage, service_workers, shader_cache, and HTTP cache while keeping cookies and localStorage ("You stay signed in.").
  • Site favicons (apps/browser-engine/src/favicon.rs, UP-109 #65094): Fetches policy-checked favicon candidates from DisplayHandler::on_favicon_urlchange via Chromium's BrowserHost::download_image (ICON_SIZE = 32), encodes validated PNG bytes as data:image/png;base64,... (≤ 64 KiB) on TabSnapshot::favicon / BrowserTab::favicon, guards against stale navigations by generation, and clears on cross-origin navigation.
  • Privacy-safe crash & load-failure diagnostics (apps/browser-engine/src/diagnostics.rs, UP-110 #65096): Emits structured EngineMsg::PageDiagnostic records (origin only via log_origin, never paths/queries/fragments/credentials/titles; Windows hex NTSTATUS exit codes) on on_render_process_terminated and non-aborted main-frame on_load_error, appending off the UI thread to browser-page.log inside dirs::logs() for Export Logs.

Verification

  • scripts/guardrails.ps1: 5/5 passed (0 files > 800 in desktop/features/crates, 0 dialog-size errors)
  • cargo clippy -p browser-pane --no-deps -- -D warnings, cargo check -p browser-pane --no-default-features, cargo check --workspace, scripts/web.ps1 -Check (wasm32-unknown-unknown + web-clock), and apps/browser-engine build: all passed with 0 warnings
  • Live CEF 156 IPC proof (8/8 scenarios): capabilities handshake (find: true, context_menu: true), PNG favicon load & cross-origin clear, in-page Find forward/backward stepping & stop, policy-filtered right-click menus (HTTP link, disallowed file:// stripped, image), hard reload bypassing Cache-Control: max-age=3600, origin cache clear clearing CacheStorage & HTTP cache while keeping session cookie & localStorage, and privacy-safe load failed + killed-renderer browser page ended diagnostics with zero URL path/query/token leaks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Hona
feat(browser): add CEF find, context-menu, hard-reload, cache-clear, …
79f3d34
…favicon, and crash-log handlers

Implements Phase 1c CEF engine handlers and `browser-pane` / desktop integration
(progressing `UP-095` `#63002`, closing `UP-109` `#65094` engine/tab favicon data,
and closing `UP-110` `#65096` privacy-safe crash/load-failure diagnostics):

- **In-page Find (`apps/browser-engine/src/find.rs`, `crates/browser-pane/src/find.rs`):**
  Adds `TabFindHandler` (`on_find_result` -> `EngineMsg::FindResult`), `HostMsg::{Find,
  StopFind}`, `Ready { find: true }`, and explicit `FindState` machine (`Closed` |
  `Editing` | `Searching` | `Found`) with document-change reset.
- **Page context menu (`apps/browser-engine/src/menu.rs`, `apps/desktop/src/surfaces/browser/context_menu.rs`):**
  Strips Chromium's default unmanaged menu (`model.clear()` + sentinel), validates
  link/image URLs through `browser_policy`, routes right-clicks to Rune's native/drawn
  popup menu (`Back`, `Forward`, `Reload`, `Reload without saved files`, `Open in
  default browser`, link/image/spellcheck/edit actions), and executes or cancels CEF's
  `RunContextMenuCallback` cleanly (`Ready { context_menu: true }`).
- **Hard reload & origin cache clear:** Extends `HostMsg::Reload` with
  `#[serde(default)] ignore_cache: bool` (`browser.reload_ignore_cache()`, wired to
  `Mod+Shift+R` / `Ctrl+F5`) and adds `HostMsg::ClearSiteCache` clearing origin
  `cache_storage`, `service_workers`, `shader_cache`, and HTTP cache while preserving
  cookies and localStorage ("You stay signed in.").
- **Site favicons (`apps/browser-engine/src/favicon.rs`, `UP-109` `#65094`):**
  Fetches policy-checked favicon candidates from `DisplayHandler::on_favicon_urlchange`
  via Chromium's `BrowserHost::download_image` (`ICON_SIZE = 32`), encodes validated
  PNG bytes to `data:image/png;base64,...` (<= 64 KiB) on `TabSnapshot::favicon` /
  `BrowserTab::favicon`, guards against stale navigations by generation, and clears on
  cross-origin navigation.
- **Structured crash & load-failure diagnostics (`apps/browser-engine/src/diagnostics.rs`, `UP-110` `#65096`):**
  Reports privacy-safe `EngineMsg::PageDiagnostic` records (origin only via
  `log_origin`, never paths/queries/fragments/credentials/titles; Windows hex NTSTATUS
  exit code) on `on_render_process_terminated` and non-aborted main-frame
  `on_load_error`, appending off the UI thread to `browser-page.log` inside
  `dirs::logs()` for `Export Logs`.
@Hona
Hona merged commit 2b3d6e1 into dev Nov 20, 2026
6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Hona
Hona deleted the ws1-phase1c branch November 20, 2026 10:21
@github-actions

github-actions Bot commented Nov 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR test build retired — merged into dev. Install or auto-update OpenCode (Rune) from https://anoma.ly/release/opencode/desktop-rune/dev/macos-arm64-dmg.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Hona added a commit that referenced this pull request Nov 20, 2026
@Hona
docs(sync): fold #259, #267-#282, split UP-095 owners, and add UP-114…
a19a496
…..UP-117 (#284)

- Fold verified fleet PRs #259, #267, #268, #269, #270, #271, #272, #273,
  #275, #276, #277, #279, and #282 (Rune e6deb869: #1297, #1298, #1299, #1300)
  into docs/upstream-sync/ledger.{json,md}
- Split UP-095 (#63002) transparently across active browser streams (WS-1,
  BROWSER-UI, PREVIEWS, BROWSER-TOOLS, WS-9), reassign UP-100 to BROWSER-UI
  and PRE-08 to BROWSER-TOOLS
- Track open tab-groups packaged-default regression on UP-062 (fix PR #278
  open) and record closure of Settings > Shortcuts hidden-command regression
  on UP-064 (#279)
- Audit upstream anomalyco/opencode 92d35f8e18..bfee96a859 (+11 commits:
  7 skipped, 4 added: UP-114..UP-117) and update radar routing
Hona added a commit that referenced this pull request Nov 20, 2026
@Hona
feat(browser): policy-first link routing, HTML handoff, OSC 8 confirm…
5a1a37b
…, and Phase 1c chrome wiring (#285)

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.
Hona added a commit that referenced this pull request Nov 20, 2026
@Hona
docs(sync): fold #278-#293, add browser Reviewed column, and add UP-1…
e9b29cd
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Hona
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.