Skip to content

fix(open): preserve returned tab ids - #213

Closed
MonkeyLeeT wants to merge 1 commit into
epiral:mainfrom
MonkeyLeeT:codex/fix-open-tab-targeting
Closed

fix(open): preserve returned tab ids#213
MonkeyLeeT wants to merge 1 commit into
epiral:mainfrom
MonkeyLeeT:codex/fix-open-tab-targeting

Conversation

@MonkeyLeeT

@MonkeyLeeT MonkeyLeeT commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve string tab ids for bb-browser open --tab, including short ids, full CDP target ids, and numeric-looking short ids
  • make open --tab current navigate the active/current daemon target instead of resolving current as a literal tab id
  • prefer the short tab id in human open output while still showing the full target id separately
  • fix the fallback short id for newly opened tabs
  • add CLI and daemon regressions for the tab-targeting contract, including using returned open ids in a follow-up eval request

Scope

This PR keeps the open lifecycle behavior unchanged: new tabs are still created in the background and open does not wait for page readiness. It only fixes the tab id contract so returned ids and explicit --tab values stay usable by the daemon resolver.

Root cause

The CLI parsed open --tab as a number, which rejected full CDP target ids and could turn numeric-looking short ids into tab indexes. The daemon also treated current as an ordinary tab reference before the open handler had a chance to navigate the current tab.

Validation

  • pnpm --filter @bb-browser/cli test
  • pnpm --filter @bb-browser/daemon test
  • pnpm build
  • pnpm lint
  • pre-commit hook ran pnpm build and pnpm test
  • synthetic merge-tree with fix(daemon): activate tabs before mouse input #212 keeps a single activation helper and no open lifecycle changes

Refs #195

@MonkeyLeeT
MonkeyLeeT marked this pull request as ready for review May 11, 2026 06:17
@MonkeyLeeT MonkeyLeeT changed the title [codex] fix open tab targeting fix(open): return immediately targetable tab ids May 11, 2026
@MonkeyLeeT MonkeyLeeT changed the title fix(open): return immediately targetable tab ids fix(open): preserve returned tab ids May 11, 2026
@MonkeyLeeT
MonkeyLeeT force-pushed the codex/fix-open-tab-targeting branch from 34d0b11 to 1d0ecbc Compare May 11, 2026 17:42
@MonkeyLeeT
MonkeyLeeT force-pushed the codex/fix-open-tab-targeting branch 5 times, most recently from 3fadeda to 40b5ebd Compare May 28, 2026 17:35
@MonkeyLeeT
MonkeyLeeT force-pushed the codex/fix-open-tab-targeting branch from 40b5ebd to 9cecb05 Compare May 29, 2026 15:54
@MonkeyLeeT MonkeyLeeT closed this May 29, 2026
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