Skip to content

Replace New tab when opening Browser or plugin actions - #4593

Merged
brsbl merged 4 commits into
bb/fix-slow-link-opening-thr_8f2nidvuynfrom
fix/new-tab-actions-4411
Oct 14, 2026
Merged

brsbl merged 4 commits into
bb/fix-slow-link-opening-thr_8f2nidvuynfrom
fix/new-tab-actions-4411

Conversation

@brsbl

@brsbl brsbl commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Native Browser registration could race the renderer's New tab replacement, restoring New tab beside Browser or losing its intended position. Reopening an existing plugin panel left New tab behind because that path only activated the destination.

What changed

  • An already registered Browser occupies the replacement position while preserving its native metadata and target.
  • Reopening a plugin action consumes New tab, preserves the existing panel, and refreshes its title.
  • Conflict retries remain owned by the base branch.

How you verified

User QA passed. brsbl approved the native app at e31315fb5ee317ed19f5eb4e84b734d8aead4579 and reconfirmed approval on October 14, 2026.

Current desktop smoke at the PR head:

Native state Capture
Browser replacement after reload · 1280 × 900 CSS pixels Native app after Browser replacement and reload
Selected embedded Browser · 474 × 758 CSS pixels Embedded Browser showing the redirected page

Before: parent revision 5288f58a84c0e5220518283fd2c4ce2ec6b46fc6 · After: e31315fb5ee317ed19f5eb4e84b734d8aead4579. Captured at 2× from the compared branch web apps with the same fixture, route, viewport, and interaction.

Action / state Viewport Before After
Reopen Workflow run from New tab Web · 1440 × 900 Before: empty New tab remains After: empty New tab is consumed
Final review, follow-up, and scope

Fresh per-PR Slop Cop reviewed 5288f58a84c0e5220518283fd2c4ce2ec6b46fc6..e31315fb5ee317ed19f5eb4e84b734d8aead4579 on October 14, 2026. Security and performance found no actionable issues. Architecture and code quality independently confirmed one P2; no P0/P1 findings. E2E reused the completed exact-head web/native passes above.

P2 — Preserve explicit file targets when concurrent additions collide. Full-record preservation also applies to file tabs whose IDs omit source revision and line range. Concurrent same-path additions before hydration can replace the locally requested source/line with the other client's record. Follow-up: limit full-record preservation to Browser collisions. Done when a concurrent file-addition regression retains the local source/line while Browser metadata, native target, and replacement-position coverage remains green. Recorded as follow-up; no P2 implementation added.

Two Slim PR passes retained the existing replacement primitive and three distinct regression seams: plugin reopening/title refresh, Browser caller routing, and native registration during persistence. Before → after: production +12/−7 → +12/−7; tests +161/−0 → +161/−0; generated 0 → 0. No code changed during these passes.

The native state remained stable at 3s, 6s, and after reload. The web fixture produced no uncaught page exceptions; workspace-status requests returned the fixture's environment_not_ready (409).

Fixes #4411

BB-Thread-ID: thr_nfkgm9d3ui

AGENT GENERATED

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T02:06:11.904086Z 36273b2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@brsbl brsbl changed the title Consume new tab when reopening a plugin panel action Consume New tab when reopening a plugin action Oct 1, 2026
@brsbl brsbl changed the title Consume New tab when reopening a plugin action Replace New tab when opening Browser or plugin actions Oct 1, 2026
@brsbl
brsbl changed the base branch from main to bb/fix-slow-link-opening-thr_8f2nidvuyn October 13, 2026 23:31
@brsbl
brsbl added this pull request to stack #5454 October 13, 2026 23:31
@brsbl
brsbl force-pushed the fix/new-tab-actions-4411 branch from 42bcb18 to e31315f Compare October 14, 2026 00:26
@brsbl
brsbl merged commit ee17a2c into main Oct 14, 2026
51 of 54 checks passed
@brsbl
brsbl deleted the fix/new-tab-actions-4411 branch October 14, 2026 23:10
brsbl added a commit that referenced this pull request Oct 14, 2026
## Human comments

## What was wrong

Merging #4593 after #5261 combined a new regression test with an import
cleanup. The resulting test called `createNewTabFixedPanelTab` without
importing it, failing app tests and typechecking on main.

## What changed

- Restore the missing factory import used by the Browser replacement
regression.

## How you verified

- [Post-merge app tests
failed](https://github.com/get-bb/bb/actions/runs/38652452163/job/116154364883)
with `ReferenceError: createNewTabFixedPanelTab is not defined`.
- [Post-merge typechecking
failed](https://github.com/get-bb/bb/actions/runs/38652452163/job/116154364534)
on the same missing import.
- [Remote CI
passed](https://github.com/get-bb/bb/actions/runs/38652762434) at
`983b2bfa2777d3d60e99157e2b3c4912553034df`, including app tests and
typechecking.

BB-Thread-ID: thr_8f2nidvuyn

> AGENT GENERATED
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.

Open browser from a right-panel new tab leaves the empty new-tab page open

1 participant