Skip to content

feat(browser): open a link's new tab beside its opener with New tab hold (UP-118) - #363

Merged
Hona merged 2 commits into
devfrom
ws6/up118-tab-beside-opener
Nov 21, 2026
Merged

Hona merged 2 commits into
devfrom
ws6/up118-tab-beside-opener

Conversation

@Hona

@Hona Hona commented Nov 21, 2026

Copy link
Copy Markdown
Member

Summary

Ports upstream UP-118 (anomalyco/opencode #65126, commit 80d7c17d8e24b64deed205d166c7de812eeb3c64) without changing contract.json:

  • Chrome opener-chain placement (apps/desktop/src/surfaces/browser/openers.rs, features/panels/src/tabs.rs):
    • Ports packages/gui-plugins/src/browser/tab-openers.ts (placed_after, record_open, on_select, on_close / FixOpeners, on_addressed) and packages/app/src/shell/state/session-tabs.ts (append_session_tab, open_session_tab_after).
    • Links opened in a new tab from a page (target="_blank", Cmd/Ctrl-click, middle-click via popup_opens) or from the context menu ("Open link in new tab", "Open image in new tab") insert beside their opener (front tabs directly after opener; multiple background tabs in requested order after the opener's contiguous family). Background link tabs stay behind without stealing selection or focus. Agent-driven tabs keep appending at the end.
  • Initial "New tab" title hold (apps/desktop/src/surfaces/browser/openers.rs, apps/desktop/src/plugin_host/native/browser{,/chrome}.rs, plugins/browser/init.luau):
    • Tracks unnamed for link-opened tabs until the document names itself or finishes loading (pane-machine.ts named), exposing BrowserTab:Unnamed() so label() and tabText() keep "New tab" instead of flashing Chromium's raw URL string.
  • Ledger (docs/upstream-sync/ledger.json): Marks UP-118 as have it.

Verification

  • scripts/guardrails.ps1: 5/5 passed (all logic extracted to openers.rs, keeping surfaces/browser/mod.rs below the 800-line ceiling).
  • selene plugins/browser/init.luau: 0 errors, 0 warnings.
  • JSON validation on docs/upstream-sync/ledger.json: valid.

@Hona
Hona merged commit 015ca3f into dev Nov 21, 2026
@Hona
Hona deleted the ws6/up118-tab-beside-opener branch November 21, 2026 03:46
Hona added a commit that referenced this pull request Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 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.

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