Skip to content

feat(browser): polish browser chrome, refusal guard, plain errors, Find UI, and device toolbar - #270

Merged
Hona merged 3 commits into
devfrom
browser-ui/pr1-chrome-device
Nov 20, 2026
Merged

Hona merged 3 commits into
devfrom
browser-ui/pr1-chrome-device

Conversation

@Hona

@Hona Hona commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

Ports the app-side browser chrome polish (#63002, UP-108, UP-111) and full device emulation toolbar parity (UP-039, #63819):

  • Address bar (plugins/browser/host_display.luau, crates/browser-pane/src/address.rs, panel.luau):
    • Converts non-ASCII IDN host labels to canonical RFC 3492 punycode (xn--...) and left-elides long hosts behind "…" so the registrable right edge is never cut off.
    • Moves page-add and open-external out of the address bar into the ... options popover.
  • Plain-language errors (plugins/browser/failure.luau):
    • Maps Chromium ERR_* codes, page_crashed, restore/artifact errors, and bare 3-digit HTTP statuses (never echoing site text) to plain-language titles, descriptions, Reload / local-cert external actions, and muted monospace technical codes, plus FailureBar with 8 s auto-dismiss for transient failures.
  • Refusal notices & 500 ms activation delay (plugins/browser/refusal.luau):
    • Validates external app targets (24 app schemes + page-only editor schemes, rejecting control/bidi/percent-encoded controls/credentials/denied schemes) and guards notice actions and dismiss with a 500 ms activation delay plus agent reveal hold.
  • Toolbar, ... menu & Site info reorganization (panel.luau, options.luau, site.luau, init.luau):
    • Reorganizes the 220 pt ... popover (Find in page, inline Zoom - 100% + row, Copy link, Add page to session, Show file's code, nested More tools submenu, Browser settings).
    • Reorganizes Site info into a two-view popover (status-first connection overview + Site settings drill-in with Cookies, capability-gated Saved files clear, Permissions, Agent access, and Network).
    • Adds side-panel browser tab activity dot (PanelSpec.label) and 500 ms reveal click guard.
  • Find in page UI (plugins/browser/find.luau):
    • Adds per-tab find-machine state machine and 36 pt Find bar (browser.find / find.next / find.previous), ready to drive WS-1 Phase 1c's engine FindHandler.
  • Device toolbar (plugins/browser/device.luau, apps/desktop/src/plugin_host/native/browser/viewport.rs, Contract 1.6 SVGs):
    • Fixes localized i18n keys, adds categorized preset popover + More devices submenu, Fit - XX% / manual scale popover, numeric validation & zoom-conflict prompt, custom viewport-devices / viewport-rotate / viewport-chevron icons, and width/height/corner resize grips using FocusExt::focus_inset over a framed backdrop.

Verification

  • pwsh scripts/guardrails.ps1 (5/5), pwsh scripts/web.ps1 -Check (wasm32 + web-clock), and cargo check --workspace --all-targets green.
  • Driven headless end-to-end (proof/browser-ui/prove-pr1.ts): toolbar reorganization, 2-view Site info (View 1 -> Site settings -> Back), ... menu with inline Zoom & More tools, Find bar open/focus/close, Device toolbar (Responsive -> iPhone 18 Pro 402×874 -> rotate 874×402 -> 75% scale + 3 grips), left-elided punycode (bücher.example.com -> …cher-kva.example.com with full canonical punycode tooltip), and realtime wall-clock 500 ms refusal activation guard (blocked click at +150 ms, dismissed at +700 ms).
  • Visually verified light & dark 1x and 1.5x captures (24 PNGs in proof/browser-ui/pr1/) against official e51247f626 captures.
  • Not proved: Live engine Find match counts / hard reload / origin cache clear (gated on WS-1 Phase 1c engine handlers).

Hona added 3 commits November 20, 2026 19:57
…nd UI, and device toolbar

Port app-side browser chrome polish (`#63002`, `UP-108`, `UP-111`) and full
device emulation toolbar parity (`UP-039`, `#63819`):

- **Address bar (`host_display.luau`, `crates/browser-pane/src/address.rs`):**
  Convert non-ASCII IDN host labels to canonical RFC 3492 punycode (`xn--...`),
  drop paths first, and left-elide long hosts behind `"…"` so the registrable
  right edge stays visible.
- **Plain-language errors (`failure.luau`):** Map Chromium `ERR_*` codes,
  `page_crashed`, restore/artifact errors, and bare 3-digit HTTP statuses to
  plain-language titles, descriptions, Reload / local-cert external actions,
  and muted monospace codes, plus auto-dismissing `FailureBar`.
- **Refusal notices & 500 ms activation delay (`refusal.luau`):** Validate
  external app targets (24 app schemes + page-only editor schemes, rejecting
  control/bidi/percent-encoded controls/credentials/denied schemes) and guard
  notice actions/dismiss with a 500 ms activation delay and agent reveal hold.
- **Toolbar, `...` menu & Site info reorganization (`panel.luau`, `options.luau`,
  `site.luau`):** Move page-add and open-external out of the address bar into
  the 220 pt `...` popover (Find in page, inline Zoom `- 100% +`, Copy link,
  Add page to session, View source, More tools submenu, Browser settings);
  reorganize Site info into a two-view popover (status-first + `Site settings`
  drill-in with Cookies, capability-gated Saved files clear, Permissions, Agent,
  Network); add side-panel tab activity dot (`PanelSpec.label`).
- **Find in page UI (`find.luau`):** Per-tab `find-machine` state machine and
  36 pt Find bar (`browser.find` / `find.next` / `find.previous`), ready for
  WS-1 Phase 1c's engine `FindHandler`.
- **Device toolbar (`device.luau`, `viewport.rs`, Contract 1.6 SVGs):** Fix
  localized i18n keys, add categorized preset popover + More devices submenu,
  Fit/manual scale popover, numeric validation & zoom-conflict prompt, custom
  `viewport-devices` / `viewport-rotate` / `viewport-chevron` icons, and
  width/height/corner resize grips over a framed backdrop.
@Hona
Hona merged commit 1719407 into dev Nov 20, 2026
6 checks passed
@Hona
Hona deleted the browser-ui/pr1-chrome-device branch November 20, 2026 10:03
@github-actions

github-actions Bot commented Nov 20, 2026 •

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.

Hona added a commit that referenced this pull request Nov 20, 2026
…..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
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