Skip to content

Fix Chrome extension send after the MV3 service worker drops - #32

Merged
Obooman merged 3 commits into
mainfrom
cursor/extension-mv3-port-reconnect-5633
Sep 5, 2026
Merged

Fix Chrome extension send after the MV3 service worker drops#32
Obooman merged 3 commits into
mainfrom
cursor/extension-mv3-port-reconnect-5633

Conversation

@Obooman

@Obooman Obooman commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The packed Chrome extension release, installed in branded Chrome 148 via Developer mode → Load unpacked (Chrome 137+ ignores --load-extension), auto-discovers vavd and shows the desktop session shell. Two release-install gaps showed up:

  1. Send died after the MV3 worker recycled. The side panel kept a stale Connected chip; window.vav.agent.send threw Attempting to use a disconnected port object and vavd never got the turn.
  2. Brand marks 404ed. esbuild emits ./deepseek-*.svg. sidepanel.html lives at the extension root, so Chrome requested chrome-extension://<id>/deepseek-*.svg and showed an Errors chip.

Fixes

  • Rebind the sidepanel port, queue outbound frames, flush on reconnect, mark status reconnecting
  • <base href="phone/"> so bundled assets resolve next to phone.js
  • publicPath: './' in the phone-ui build
  • Unit tests for port reconnect; pack test for the document base

Installed-Chrome verification (headed Chrome 148 + unpacked release zip)

Check Result
A. Desktop shell + Connected · Release Ext Test Pass
B. New session, horizontal composer, desktop run bar Pass
C. hello from the release extension → You + e2e stub reply Pass (after reconnect fix)
D. Tab chip “Install guide”, Include on, chip above composer Pass
E. chrome://extensions — VAV 1.19.0, background.js service worker active Pass

The Cursor computerUse subagent could not start (Claude usage exceeded). The same pass was driven on DISPLAY=:1 against the already-installed release tree at /tmp/vav-ext-release.

Open in Web Open in Cursor 

cursoragent and others added 3 commits September 5, 2026 06:49
The packed side panel kept a stale Connected chip after chrome.runtime.connect died, then send threw "disconnected port object" and never reached vavd. Rebind the port, queue outbound frames, and flush them after reconnect.

Co-authored-by: Oboo Cheng <oboochin@gmail.com>
esbuild emits relative image URLs. The side panel HTML lives at the extension root, so those URLs 404ed as chrome-extension://<id>/deepseek-*.svg and Chrome showed an Errors chip. Point the document base at phone/ so marks load next to phone.js.

Co-authored-by: Oboo Cheng <oboochin@gmail.com>
tsconfig.web.json failed on macOS and Windows because the local MV3 stub omitted onDisconnect, which the reconnect listener requires.

Co-authored-by: Oboo Cheng <oboochin@gmail.com>
@Obooman
Obooman marked this pull request as ready for review September 5, 2026 08:12
@Obooman
Obooman merged commit b6f4921 into main Sep 5, 2026
3 checks passed
@cursor cursor Bot mentioned this pull request Sep 5, 2026
3 tasks
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.

2 participants