daemon: keep named automation in reusable background tabs - #618
daemon: keep named automation in reusable background tabs#618MagMueller wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
✅ Skill review passedReviewed 3 file(s) — no findings. |
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Follow-up to #616.
Named local/CDP daemons now get a dedicated tab so parallel names do not navigate the same page. The lifecycle stays intentionally simple:
Normal helper behavior is background-first too:
new_tab()creates a background target.switch_tab(target)attaches and moves the horse marker without changing Chrome's visible tab.switch_tab(target, activate=True)oractivate_tab(target)is the explicit opt-in for a visible switch.This change does not automatically close normal browser tabs. Users and agents can still close a tab explicitly with
close_tab().Default daemons and named Browser Use Cloud daemons keep their existing first-page attach behavior. The existing cleanup for a harness-opened
chrome://inspectpermission tab also remains.Verification:
uv run --with pytest pytest -q— 140 passedgit diff --check— passeddocument.hidden === truebackground tab accepted typing and a coordinate click, captured a 3456×1730 PNG, and did not change the foreground application.Summary by cubic
Keeps named local daemons on a dedicated reusable background tab and stops changing the user’s visible tab. Previously we attached to the first page and
switch_tab()activated it; nowswitch_tab()attaches without activating, stale-session recovery is scoped and serialized with tab switches, and recovered sessions publish before domain enable so delayed requests hit the right tab.about:blanktab; default and named remote daemons still attach to the first real page.session_idrequests return an error; we publish the replacement before domain setup and preserve chains; tab switches wait for in-flight recovery so recovered actions are not redirected.new_tab()creates background targets;switch_tab(target)attaches and moves the horse marker;activate_tab(target)opts into a visible switch; screenshots and normal CDP input work while hidden; shutdown leaves working and user tabs open.activate_tab(target)orswitch_tab(..., activate=True)when a visible tab switch is required.Written for commit f4c6ca2. Summary will update on new commits.