Work in progress for navigation-safe screen recording.
Implemented:
- tabCapture permission in manifest
- Recording handlers in extension background.ts
- Recording endpoints in relay server
- Binary WebSocket streaming for video chunks
- Protocol types for recording messages
- Executor integration
Needs:
- Offscreen document implementation (tabCapture not available in service workers)
- Connect background.ts to offscreen document via messages
- Update manifest for offscreen document
The offscreen.ts/html files are scaffolding for this next step.
Inject manifest key via vite plugin for dev/test builds (not production).
This ensures all developers get the same extension ID: pebbngnfojnignonigcnkdilknapkgid
- Update vite.config.mts to inject key when !PRODUCTION
- Update release script to use PRODUCTION=true
- Replace old hardcoded dev extension ID in all files
- Server rejects new extension (code 4002) if existing has active tabs
- Idle extensions (no tabs) can still be replaced
- Extension properly enters polling mode when rejected during handshake
- /extension/status now returns activeTargets count for smarter reconnection
- Use 127.0.0.1 instead of localhost to avoid DNS/IPv6 resolution issues
- Add 15s global timeout wrapper around connect() to prevent hanging forever
- Reduce HTTP retry attempts from 30 to 5 (maintainLoop retries anyway)
- Fix WebSocket cleanup: close socket on timeout to prevent orphaned connections
- Improve settled state tracking in WebSocket connection promise
- Remove global playwriterGroupId cache that could become stale
- Query chrome.tabGroups by title on each sync instead
- Use batch chrome.tabs.ungroup() with array of IDs instead of loops
- Fixes issue where group wasn't created after debugger detach/reattach
Move auto-create logic from onOpen to Target.setAutoAttach handler so it runs
synchronously in the CDP command flow. Add skipAttachedEvent option to extension's
attachTab to prevent sending Target.attachedToTarget when the relay will send it
via the Target.setAutoAttach response handler.
- Connect WS at extension startup via maintainConnection() loop
- Auto-retry every 5 seconds silently (no connecting badge)
- Never disconnect WS based on tab count
- Rename ConnectionState 'disconnected' to 'idle', remove global 'connecting'
- Fix race condition with tabGroupQueue for syncTabGroup/disconnectEverything/onTabUpdated
- Add auto-create initial tab when Playwright connects (PLAYWRITER_AUTO_ENABLE env var)
- Add test for auto-create feature
Replace arbitrary sleep(200ms) with proper wait for Runtime.executionContextCreated
event in the relay server. This ensures pages are fully ready before Runtime.enable
returns to Playwright, fixing intermittent 'page not found' errors.