Skip to content

Toolbar click is silent when the relay is not running, and a queued click is lost when the MV3 worker sleeps #236

Closed

Description

@soultaster

Toolbar click is silent when the relay is not running, and a queued click is lost when the MV3 worker sleeps

Environment

  • browse extension 0.0.16 (Chrome Web Store and unpacked), browse CLI/relay 0.0.16
  • Chrome 156.0.8078.47 on Linux x64
  • The relay is started on demand by the first operational browse command (the extension cannot start it; no native messaging)

What happens

After Chrome starts, no relay is listening on 127.0.0.1:19988. Clicking the browse toolbar button on a normal page does nothing: no badge, no notification, no error. After an agent's first browse command starts the relay, the button works.

If the click is made while the relay is away, attachTab() queues it in pendingAttach (an in-memory Set in 0.0.16). An MV3 service worker is terminated after about 30 seconds of inactivity, so that queued click disappears before the relay starts. chrome.storage.session is not used for it.

The click is not the only silent path: chrome.action.onClicked only sends unpaired, untrusted and incompatible to the onboarding page. offline and connecting fall through to the queue with no user-visible feedback.

Why this is not already covered by the dev changes

dev's ToolbarNotice (PR #205) shows a notification when a connected click cannot attach a tab (a file:// page without file access, chrome://, the Web Store). It deliberately screens only pages that cannot be attached. A normal page clicked while no relay is running is still queued silently, and pendingAttach is still in memory on dev.

Proposed fix

Keep this extension-only; the relay lifecycle and protocol do not need to change.

  1. Persist the queued toolbar clicks in chrome.storage.session (tab id and whether the click is a lend or a take-back). Restore them when the worker starts.
  2. Show a per-tab notification when a click is queued while the relay is offline/connecting, with a tooltip/badge fallback when notifications are denied. The notification should say that the relay starts with the agent's first browse command (or browse settings get), and that the click is saved.
  3. Clear the queued entry when the relay sends action.setAttached with attached: true. Keep it on attached: false or a timeout, and show a retry notice.
  4. Prune entries for tabs closed while the worker slept, and cancel on a second click.
  5. Add tests to test/isolated/ using the existing chrome-stub (session storage is already supported), plus the stress harness's sw-stop and toolbar test hook.

A local patch is available; I can share the diff if useful. I am not opening a PR because the README says issues only.

Activity

  1. soultaster commented on Nov 12, 2026

    @soultaster
    Author

    Closing after checking the documented flow: the click happened before any agent browse command, so the relay was intentionally not running. The toolbar button is meant to lend an already-open tab while the relay is active ("relay first, button later"); it is not a global on/off switch. The silent no-op is still a UX rough edge, but this is a usage-pattern issue rather than a functional defect in the intended flow. Thanks for the fast turnaround on the related #204/#205. The persistence/notification idea is here if it is ever useful, but I am closing this as a usage issue.

  2. thdxr commented on Nov 12, 2026

    @thdxr
    Member

    clicking the toolbar button while browse wasn't running yet did nothing you could see, and the click was only kept for a short while, so it could get lost before an agent started browse.

    • the button now shows "…" on that tab while it waits, and hovering it says why
    • the tab is handed over as soon as an agent starts using browse, even if that's a while later
    • click again to cancel
    • if the browser isn't set up yet, the next click opens the setup page instead

    fixed in #237, it'll be in the next release

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

  3. reopened this on Nov 12, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions