Skip to content

feat(panels,browser): browser address bar and recent pages in side panel New tab (opencode#66818) - #1416

Merged
Hona merged 3 commits into
devfrom
upstream-g/side-new-tab-browser
Nov 27, 2026
Merged

Hona merged 3 commits into
devfrom
upstream-g/side-new-tab-browser

Conversation

@Hona

@Hona Hona commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Port official opencode#66818 (98bc686252): place the browser address bar across the top of the side panel's New tab view and show recent browser pages below the launchers, removing the separate Browser launcher row and mod+t browser newTab command.

Changes

  • Plugin contract 1.13 (crates/opencode-plugin-spec, plugins/opencode.d.luau, plugins/plugin.schema.json):
    • Added SlotName variants session.panel.new (top of New tab view above launchers) and session.panel.new.list (below launchers, before Recently closed).
    • Added optional pane, width, and focusToken fields to SlotProps, and optional pane field to BrowserOpenSpec.
    • Regenerated all 15 contract artifacts via cargo run -p opencode-plugin-spec -- --write (verified with --check).
  • Side panel New tab slots & focus (features/panels, apps/desktop/src/plugin_host, apps/desktop/src/shell/panels.rs):
    • Added explicit NewTabFocus enum (Idle | Requested { pane, token }) to SideState matching packages/app/src/runtime/plugin/new-tab-machine.ts: open_side_new_tab and opening the side region request focus once settled; selecting/opening a real tab or closing clears it.
    • Updated new_tab_view (features/panels/src/menus.rs) to render session.panel.new pinned above the scroll area (so omnibox suggestions paint and hit-test over scrolled rows) and session.panel.new.list between launchers and side-recently-closed (packages/app/src/runtime/plugin/side-region.tsx:636-651).
    • Wired Browser:OpenAsync pane targeting (apps/desktop/src/plugin_host/native/browser.rs) and kept the browser plugin dormant on sessions where the side panel is not showing New tab (first_screen.rs, dormant.rs).
  • Browser plugin (plugins/browser/):
    • Added address.NEW_TAB_ID, address.BLANK_EPOCH, and page.followed event (plugins/browser/address.luau, matching address-machine.ts:309-320).
    • Added panel.newTabBar (browser navigation disabled, live omnibox address field + suggestions dropdown, disabled inspect/options controls) and panel.newTabRecent (up to 5 recent visits under Recent) in plugins/browser/panel.luau (packages/gui-plugins/src/browser/new-tab.tsx).
    • Removed the mod+t newTab command and session.panel Browser menu item from plugins/browser/init.luau and registered new-tab-bar (session.panel.new) and new-tab-recent (session.panel.new.list), opening selected/submitted URLs in the New tab's target pane (packages/gui-plugins/src/browser/renderer.tsx:409-447).
  • Scene (apps/desktop/src/stories/shell/side.rs):
    • Added --scene side-new-tab seeding mock ready browser engine, two recent visits, and one recently closed tab on an open side-panel New tab.

Verification

  • cargo clippy -p opencode-plugin-spec -p opencode-feature-panels -p opencode-desktop --no-deps passed (against dev 8effe4f95c / Rune 707f6d6f) with 0 errors and 0 warnings in touched files.
  • cargo run -p opencode-plugin-spec -- --check, 9/9 local non-cargo guardrails, and scripts/web-clock.ts passed.
  • Headless verification cases (Windows x64 CI build, fixture, no server):
    1. New tab layout (--scene side-new-tab): renders browser-bar + browser-address pinned at the top of side-new-tab-view with Back/Forward/Reload/Inspect/Options disabled, launchers below with NO Browser launcher card (side-launch-browser-open absent), browser-new-tab-recent (Recent heading + anomalyco/rune and Local Dashboard) below the launchers, and side-recently-closed below Recent.
    2. Omnibox search & navigation (--scene side-new-tab): clicking browser-address opens browser-address-input; typing github renders browser-suggestions dropdown above the launchers; submitting a URL (or clicking a browser-new-tab-recent-* row) opens a browser tab in the side pane and replaces the New tab.

Hona added a commit that referenced this pull request Nov 27, 2026
@Hona
Hona marked this pull request as ready for review November 27, 2026 16:23
@Hona
Hona merged commit 2e6dc21 into dev Nov 27, 2026
7 checks passed
@Hona
Hona deleted the upstream-g/side-new-tab-browser branch November 27, 2026 16:23
Hona added a commit that referenced this pull request Nov 27, 2026
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