Skip to content

session: open the Web Store extension (ikmpmkkcmhhnjmdiooekbhfmomcbefkf) instead of the harness id #44

Description

@colevels

Problem

session start / session open compute the connection-page URL from the harness's pinned EXTENSION_KEY (src/core/session/chrome.ts:8-15, src/core/session/protocol.ts:16). That id only exists for an unpacked build of tabbrew-cli/extension/. A user who installed TabBrew from the Chrome Web Store (id ikmpmkkcmhhnjmdiooekbhfmomcbefkf) gets a chrome-extension:// error tab, listening never turns true, and session start exits 1 even though the session itself is up.

The product extension is gaining the connection page and operator channel in colevels/tabbrew#100. Once that ships, the CLI must open the Store extension by default.

Proposal

  • Add PRODUCT_EXTENSION_ID = 'ikmpmkkcmhhnjmdiooekbhfmomcbefkf' to protocol.ts next to CONNECTION_PAGE. It is a public identifier; safe to commit.
  • connectionUrl() uses it by default.
  • Add TABBREW_EXTENSION_ID as an env override, resolved the same way TABBREW_CHROME is, so the harness and e2e keep working: the e2e suite sets it to extensionId(EXTENSION_KEY). Document it in the README env table alongside TABBREW_CHROME.
  • The harness keeps its pinned key so its id stays deterministic for Load unpacked; nothing changes in extension/wxt.config.ts.
  • Fix the stale README line that says wxt.config.ts derives optional_host_permissions; the code derives required host_permissions and the reason is in extension/README.md.

Rejected alternative

Putting the Store's public key into the harness manifest so both builds share the id. That would let an unpacked harness load as the product in a user's Chrome, and the harness README is explicit that it is not the product.

Sequencing

Ship after colevels/tabbrew#100 lands and the Store build is live, otherwise every session start opens an error tab. Note the pairing (minimum extension version) in the changelog and in the session start failure hint.

Acceptance

  • tabbrew session start on a machine with only the Store extension opens chrome-extension://ikmpmkkcmhhnjmdiooekbhfmomcbefkf/connection.html and reports listening
  • TABBREW_EXTENSION_ID=<harness id> tabbrew session start still opens the harness page; bun run test:e2e passes
  • README env table lists TABBREW_EXTENSION_ID; the optional_host_permissions line is corrected

Activity

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