feat(extension): browser extension for Chrome/Edge/Firefox + CI + v0.8.0
Some checks failed
Beta Release / beta (push) Failing after 48s

Adds a WXT-based browser extension that replaces manual JS snippet
injection for AI-driven browser testing. The extension auto-connects
to the Muyue server via WebSocket on every page, using the exact
same protocol as the existing snippet — zero backend changes needed.

- Chrome/Edge (MV3) + Firefox (MV2) from single codebase via WXT
- Content script: auto-connect WS, console capture, URL tracking, RPC
- Background service worker: token management, screenshots, badge
- Popup + side panel with server status, sessions, URL config
- CI workflows: build extension, attach .zip to releases
- Makefile targets: ext, ext-chrome, ext-firefox, ext-zip
- Version bumped to 0.8.0

Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This commit is contained in:
Augustin
2026-04-27 16:48:56 +02:00
parent 97a25295fc
commit 9f9f2bd2c6
26 changed files with 5940 additions and 14 deletions

View File

@@ -32,13 +32,21 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Cache Node modules
- name: Cache Node modules (web)
uses: actions/cache@v4
with:
path: web/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('web/package-lock.json') }}
key: ${{ runner.os }}-node-web-${{ hashFiles('web/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-web-
- name: Cache Node modules (extension)
uses: actions/cache@v4
with:
path: extension/node_modules
key: ${{ runner.os }}-node-ext-${{ hashFiles('extension/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-ext-
- name: Download Go dependencies
run: go mod download
@@ -49,6 +57,14 @@ jobs:
npm ci
npm run build
- name: Build extension
run: |
cd extension
npm ci
npx wxt zip
npx wxt zip --browser firefox
mv .output/muyue-extension-*.zip ../dist/
- name: Vet
run: go vet ./...
@@ -152,7 +168,7 @@ jobs:
fi
echo "Release ID: ${RELEASE_ID}"
UPLOAD_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets"
for file in dist/*.tar.gz dist/*.zip dist/checksums.txt; do
for file in dist/*.tar.gz dist/*.zip dist/checksums.txt dist/muyue-extension-*.zip; do
filename=$(basename "$file")
echo "Uploading ${filename}..."
curl -s -X POST "${UPLOAD_URL}" \

View File

@@ -32,13 +32,21 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Cache Node modules
- name: Cache Node modules (web)
uses: actions/cache@v4
with:
path: web/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('web/package-lock.json') }}
key: ${{ runner.os }}-node-web-${{ hashFiles('web/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-web-
- name: Cache Node modules (extension)
uses: actions/cache@v4
with:
path: extension/node_modules
key: ${{ runner.os }}-node-ext-${{ hashFiles('extension/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-ext-
- name: Download dependencies
run: go mod download
@@ -49,6 +57,14 @@ jobs:
npm ci
npm run build
- name: Build extension
run: |
cd extension
npm ci
npx wxt zip
npx wxt zip --browser firefox
mv .output/muyue-extension-*.zip ../dist/
- name: Vet
run: go vet ./...
@@ -241,7 +257,7 @@ jobs:
fi
echo "Release ID: ${RELEASE_ID}"
UPLOAD_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets"
for file in dist/*.tar.gz dist/*.zip dist/checksums.txt; do
for file in dist/*.tar.gz dist/*.zip dist/checksums.txt dist/muyue-extension-*.zip; do
filename=$(basename "$file")
echo "Uploading ${filename}..."
UPLOAD_RESP=$(curl -s -w "\n%{http_code}" -X POST "${UPLOAD_URL}" \

View File

@@ -30,13 +30,21 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Cache Node modules
- name: Cache Node modules (web)
uses: actions/cache@v4
with:
path: web/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('web/package-lock.json') }}
key: ${{ runner.os }}-node-web-${{ hashFiles('web/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-web-
- name: Cache Node modules (extension)
uses: actions/cache@v4
with:
path: extension/node_modules
key: ${{ runner.os }}-node-ext-${{ hashFiles('extension/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-ext-
- name: Download dependencies
run: go mod download
@@ -47,13 +55,20 @@ jobs:
npm ci
npm run build
- name: Build extension
run: |
cd extension
npm ci
npm run build
npm run build:firefox
- name: Vet
run: go vet ./...
- name: Test
run: go test ./... -v -race -timeout 60s
- name: Build
- name: Build binary
run: |
go build -o muyue ./cmd/muyue/
./muyue version