Skip to content

fix: keep new tabs in tab_list even before URL is populated#956

Open
daidi wants to merge 1 commit intovercel-labs:mainfrom
daidi:codex/tab-tracking-empty-url-fix
Open

fix: keep new tabs in tab_list even before URL is populated#956
daidi wants to merge 1 commit intovercel-labs:mainfrom
daidi:codex/tab-tracking-empty-url-fix

Conversation

@daidi
Copy link
Contributor

@daidi daidi commented Mar 21, 2026

Summary

  • stop filtering out page/webview targets when target_info.url is empty
  • apply this in both initial target discovery and runtime Target.targetCreated event handling

Why

When a page click opens a new tab, Chromium can emit the target before URL/title are populated.
If we drop empty-URL targets, tab may continue to report only one tab even though the browser switched to a new tab.

Regression source

This behavior appears to have been introduced by commit 8348b77 (fix: filter chrome:// internal targets from auto-connect discovery), which added !url.is_empty() filtering in target collection paths.
That change accidentally excluded valid newly-created tabs whose URL is not populated yet.

Repro

  1. Open a page with <a target="_blank">
  2. Trigger click via find text "..." click
  3. Run tab

Before: sometimes only one tab is reported.
After: new tab is tracked immediately (may start with empty URL/title, later updated).

Validation

  • cargo check in cli/ passes
  • local manual repro confirms tab returns the second tab after new-tab click

@vercel
Copy link
Contributor

vercel bot commented Mar 21, 2026

@daidi is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@daidi daidi force-pushed the codex/tab-tracking-empty-url-fix branch from 5ebd7dc to 3352ce7 Compare March 21, 2026 15:31
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