Skip to content

Keep BB Browser tabs usable across sessions and thread switches - #4011

Open
brsbl wants to merge 12 commits into
mainfrom
bb/verify-google-maps-feasibility-thr_nrnc7zf4hm
Open

brsbl wants to merge 12 commits into
mainfrom
bb/verify-google-maps-feasibility-thr_nrnc7zf4hm

Conversation

@brsbl

@brsbl brsbl commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

BB Browser tabs had three related lifecycle failures:

  • Personal tabs persisted a temporary desktop-session target, so a desktop restart stranded the saved URL behind an unavailable-tab message.
  • A thread-tab revision conflict could discard the local pending edit, including a newly opened Browser tab.
  • Leaving a thread did not synchronously hide its retained native WebContentsView, so the old page could remain over the destination thread after navigation, especially when the destination came from More.

What changed

  • Personal tabs now persist as URL-backed tabs; automation tabs keep their exact desktop-session binding.
  • Disconnected tabs keep the saved URL selectable and offer Reopen tab once the desktop broker connects.
  • Conflicted thread-tab writes retry against the latest saved tabs and reapply the pending local edit.
  • The browser lifecycle observer hides every retained native view owned by the departing thread before the new thread paints, while preserving it for restoration when the user returns.
  • The thread-tabs guide documents the equivalent CLI and SDK recovery behavior.

No database schema, plugin API, SDK contract, daemon protocol, or persisted-data break.

How you verified

  • The restart-persistence regression failed before the fix in remote CI.
  • The broker-startup regression failed before the fix in remote CI.
  • The save-conflict regression failed before the fix in remote CI.
  • The thread-switch regression failed before the fix in remote CI.
  • Remote CI on consolidated head 5f6e5f020 passed all required checks.
  • Native QA on the thread-switch fix exercised owner thread → destination thread → owner thread → destination thread. The native browser view hid on both exits and the same page returned when its owner thread was selected again.

The recovery screenshots below were captured from the original recovery layer before consolidation. Fresh native screenshots from consolidated head 5f6e5f020 are pending because macOS denied Screen Recording permission to the bb process running QA. User QA is pending.

Before: 3f74c55c3ec5d885e233450904735d6db6e37a48 · Recovery layer: 0e520907ab11159ada326a776ffabcac6fb3459a · Captured at 2×

Screen / state Viewport Before Recovery layer
Disconnected tab / recovery Desktop · 1280 × 900 Before: unavailable browser tab Open before Recovery layer: disconnected tab with saved URL and recovery action Open recovery layer

After pressing Reopen tab on the recovery layer:

Recovered tab loads the saved page Open full size

BB-Thread-ID: thr_qnsq6z9vs8

AGENT GENERATED

@brsbl brsbl changed the title Restore personal browser tabs after desktop restarts Keep BB Browser tabs usable across sessions and thread switches Sep 23, 2026

This branch has not been deployed

No deployments
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