Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions .github/workflows/browser-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Browser matrix

# Manual verification of the packaged extension. Not part of the pull request gate:
# `checks` still runs the browser suite on ubuntu-latest, and this workflow can be
# dispatched on demand before a release or when investigating a platform difference.

on:
workflow_dispatch:
inputs:
stress:
description: Also run the 200-tab stress test
type: boolean
default: false

permissions:
contents: read

# A dispatched rerun must finish; do not let a newer push cancel it.
concurrency:
group: browser-matrix-${{ github.ref }}
cancel-in-progress: false

jobs:
browser:
name: browser (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025, macos-15]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
run_install: false
- if: runner.os == 'Windows'
run: choco install zip unzip --no-progress -y
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install --with-deps chromium
env:
PLAYWRIGHT_SKIP_BROWSER_GC: '1'
- run: pnpm run test:browser
- if: inputs.stress
run: pnpm run test:stress
- if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: browser-${{ matrix.os }}
path: test-results

plan:
name: plan compatibility matrix
runs-on: ubuntu-24.04
timeout-minutes: 10
outputs:
matrix: ${{ steps.plan.outputs.matrix }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
run_install: false
- run: pnpm install --frozen-lockfile
- id: plan
run: echo "matrix=$(node --experimental-strip-types scripts/chrome-compat.ts --matrix)" >> "$GITHUB_OUTPUT"

compatibility:
name: compatibility (${{ matrix.os }}, Chrome ${{ matrix.major }})
needs: plan
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.plan.outputs.matrix) }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
run_install: false
- if: runner.os == 'Windows'
run: choco install zip unzip --no-progress -y
- run: pnpm install --frozen-lockfile
- if: runner.os == 'Linux'
run: pnpm exec playwright install-deps chromium
- run: pnpm chrome:install "${{ matrix.major }}" "${{ matrix.platform }}"
- if: runner.os == 'Linux'
run: xvfb-run -a pnpm test:browser:compat
- if: runner.os != 'Linux'
run: pnpm test:browser:compat
- if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: compatibility-${{ matrix.os }}-${{ matrix.major }}
path: test-results

gate:
name: compatibility-gate
needs: [browser, plan, compatibility]
if: always()
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- env:
BROWSER_RESULT: ${{ needs.browser.result }}
PLAN_RESULT: ${{ needs.plan.result }}
COMPATIBILITY_RESULT: ${{ needs.compatibility.result }}
run: |
[[ "$BROWSER_RESULT" == success ]]
[[ "$PLAN_RESULT" == success ]]
[[ "$COMPATIBILITY_RESULT" == success ]]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ separately. Context-menu entries let you merge either mode individually.

- Only ordinary windows in the accessible browser profile are merged.
- To merge incognito windows, [allow incognito access](https://support.google.com/chrome/a/answer/13130396).
- Tab ordering is not guaranteed. Collapsed groups may expand during a merge.
- Tab order is preserved: the window you merge from stays first, and tabs and tab groups
keep their left-to-right order. Collapsed groups stay collapsed.
- A failed merge may leave some tabs already moved.
- Change the shortcut at `chrome://extensions/shortcuts`.

Expand Down
20 changes: 20 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ Chrome. Record browser/OS/version, results and console errors:

Do not attach private URLs or a personal browser profile to bug reports.

### Manual browser matrix

`pnpm test:browser:compat` runs only the `@compat` scenarios.
[`test/browser/chrome-versions.json`](../test/browser/chrome-versions.json) locks one full Chrome for
Testing patch per major, from the manifest minimum to Stable. To test a locked major locally:

```sh
pnpm chrome:install 120 mac-arm64 # or linux64 / win64
CHROME_EXECUTABLE_PATH='/path/to/chrome' CHROME_MAJOR=120 HEADED=1 pnpm test:browser:compat
```

The installer prints the executable path. Linux headed runs need `xvfb-run -a`.

Run **Actions → Browser matrix → Run workflow** before a release. It is manual and never gates a pull
request; uploaded `test-results` artifacts carry the Playwright report and failure context.

Refresh patches, or extend the range when Stable advances, with `pnpm chrome:update-lock` and commit
the lock diff as its own maintenance change. Tests and CI read the lock and never pick versions
themselves.

## Dependencies and Git hooks

```sh
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:browser": "pnpm zip && playwright test --project=chromium",
"test:browser:compat": "pnpm zip && playwright test --project=compat",
"chrome:update-lock": "node --experimental-strip-types scripts/chrome-compat.ts --update-lock",
"chrome:install": "node --experimental-strip-types scripts/chrome-compat.ts --install",
"test:stress": "pnpm zip && playwright test --project=stress",
"ci": "biome ci . --error-on-warnings",
"check:secrets": "node --experimental-strip-types scripts/check-secrets.ts",
Expand Down
1 change: 1 addition & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export default defineConfig({
projects: [
{ name: 'chromium', grepInvert: /@stress/ },
{ name: 'stress', grep: /@stress/, timeout: 180000 },
{ name: 'compat', grep: /@compat/ },
],
});
Loading
Loading