Skip to content

feat(browser): add explicit agent tab management #16

Closed

Description

@trmosala

Problem

There are no general agent create/select/close tab operations.

Implementation order

Browser backlog item 12 of 29. Phase: Agent browsing. This is ordered planning, not a claim that Codex implements every item. Items 24–29 are optional additions.

Acceptance criteria

  • Add task-scoped operations with clear consent and private-by-default new tabs.
  • Respect unsaved-page confirmation and never access another task tabs.
  • Test close cancellation, popups, missing tabs and revoked permissions.

Dependencies

Engineering and validation

Reuse existing Chromium/Electron/OS facilities where available. Preserve main-process ownership and permission enforcement, add no placeholder controls, use existing i18n patterns, and test behavior with synthetic fixtures. Document platform limitations. Baseline: browser-tabs at 47fef3e; see packages/cm-browser/README.md and password-security.md.

Activity

  1. trmosala commented on Sep 17, 2026

    @trmosala
    OwnerAuthor

    Published on browser-tabs: implementation 147ab6d, documentation correction c8ce338. Remote HEAD confirmed at c8ce338. Only the 16 task files were committed; both excluded files remain untouched and unstaged.

    Implemented separate named plugin approval plus fresh default-cancel native consent for private blank creation and exact same-task select/close. Results expose only operation and opaque ID. Preserved saved recovery records, source/target busy and rendering ownership, native Stay/Leave, cancellation settlement, duplicate-ID silence, popup isolation and revoked authority.

    Corrected permission-reload ordering behind native close, same-document navigation, HTTP 204/Stop recovery, and newer permission requests arriving during an earlier reload. Genuine native RED for the last bug was reload count 1 versus 2; six pre/post-commit success/204/Stop cases now pass without automatic failed-attempt replay.

    Final evidence: serial desktop typecheck and focused --tab-lifecycle PASS; parent desktop/browser plus providerConfig tests 169 PASS / 2313 expectations; cm-browser 76 PASS / 1155 expectations; subsequent serial default native smoke PASS. Prior native-i18n 9 PASS / 458 expectations. Both cumulative correctness/spec and standards reviews clear the full 16-file scope. Formatting/whitespace PASS; latest narrow lint 13 warnings, 0 errors, not warning-free. Normal push hooks passed 31/31 typecheck tasks. No release or installed app/server/bridge/model changes.

    Limits remain explicit: internal Electron 42.3.3 close acknowledgement must be revalidated on upgrades; stalled loading/close can delay queued work; HTTP 204/Stop can retain live media until document replacement or closure. Fake-device tests witness document disposal and denied reacquisition, not physical-device or direct track-ended evidence. Native accessibility/usability, packaged builds, macOS/Linux, localization and external #34 assurance remain open. Keeping this issue open for those validation gates. Exact commands and evidence are in packages/cm-browser/README.md and password-security.md. Next ordered implementation is #17.

  2. trmosala commented on Sep 21, 2026

    @trmosala
    OwnerAuthor

    Completed and validated on browser-tabs; pushed commit 5a6fa3e (test(browser): validate tab lifecycle on macOS). The feature implementation was already present in 147ab6d; this follow-up fixes native fixture hide-event timing on macOS and records current evidence. Dependency #11 is closed.

    Acceptance criteria are covered: task-scoped create/select/close, separate plugin approval and default-cancel native consent, private blank creation, exact same-task targets, unsaved-page Stay/Leave, cancellation, popups, missing tabs and revoked authority. Independent standards and correctness/spec reviews found no actionable gaps.

    Validation:

    • Focused native tab lifecycle PASS on macOS arm64, Electron 44.3.0 / Chromium 152.0.7977.78, including close-veto acknowledgement, cancellation settlement and permission reload ordering.
    • Desktop browser/provider tests: 272 PASS / 3,174 expectations.
    • Complete cm-browser suite: 91 PASS / 3,653 expectations.
    • Both package typechecks PASS; normal push hook: 31/31 typecheck tasks successful (29 cached).
    • Formatting and whitespace PASS. Scoped fixture lint: 63 warnings, zero errors.

    The broader default native smoke progressed beyond corrected hide-event assertions but failed outside this lifecycle scope at cross-process iframe upload blocking with a Chromium observer-list reentrancy failure and Cannot find default execution context. It is not claimed green. Physical/native-dialog accessibility, packaged builds, Linux, localization and external #34 assurance remain separate work. Details are in packages/cm-browser/README.md and password-security.md. Closing #16 for its implemented and validated acceptance criteria, without claiming those broader assurances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions