Commit Graph

35 Commits

Author SHA1 Message Date
Tommy D. Rossi 905df6eec5 fix: route Target.detachFromTarget on root CDP session (#40)
When Playwright sends Target.detachFromTarget via the root browser session
(no top-level sessionId), the extension couldn't find the target tab because
it only checked msg.params.sessionId for routing. This caused 'No tab found'
errors that cascaded into disconnects and instability.

- Add getTabForCommand() helper with params.sessionId fallback so any command
  referencing a session in its params can be routed when the top-level
  sessionId is absent
- No-op Target.detachFromTarget for stale/unknown sessions instead of throwing
- Always re-apply tab group color on every sync to prevent Chrome resetting
  it to white
- Replace silent .catch() with error log in aria-snapshot OOPIF detach
- Add regression test using raw WebSocket to verify routing without sessionId

Extension bumped to 0.0.74.
2026-03-04 21:57:27 +01:00
Tommy D. Rossi f793dd8ac4 feat: harden relay sessions and recording UX across extension + playwriter
This commit batches the pending workspace updates that were coupled in practice: extension reliability fixes, ghost cursor persistence across MPA navigations, timeout tuning, and aligned docs/versioning updates so behavior and guidance stay in sync.

Key updates:\n- extension: add MV3 keepalive via chrome.alarms, add alarms permission, and bump extension changelog/version to 0.0.73 to reduce silent relay disconnects while idle\n- playwriter runtime: raise default action timeout to 60s while keeping navigation timeout separate; increase relay /version fetch timeout to 2000ms\n- recording + cursor: add persistent cursor init scripts with Page.addScriptToEvaluateOnNewDocument, remove init script on teardown, and ensure cursor enablement before applying mouse actions\n- demo video defaults: use 0.5s side buffer (1s total) and default idle speed 6x for createDemoVideo/computeIdleSections\n- tests/docs: keep click-error tests deterministic with explicit 5000ms per-click timeout, remove outdated click-timeout section from skill mistakes, and update package/changelog entries
2026-02-28 22:12:07 +01:00
Tommy D. Rossi 95ff2a797d fix: scope CDP tab sessions and simplify recording sessionId routing 2026-02-25 16:52:41 +01:00
Tommy D. Rossi f87b0243cd format 2026-02-22 15:21:38 +01:00
Tommy D. Rossi e6f1e8c089 fix extension runtime session routing for oopif iframe locators
Route Runtime.enable/disable through the incoming child sessionId instead of always using the tab root session so OOPIF iframe targets receive execution contexts reliably. Add a focused relay regression test for empty-src cross-origin iframe attach flow and update extension version/changelog for release tracking.
2026-02-11 16:15:02 +01:00
Tommy D. Rossi 5a3f344a0b Update manifest.json 2026-02-07 09:49:41 +01:00
Tommy D. Rossi 44514f00c8 feat: add multi-browser support
- Extension connections are now tracked per-connection with isolated state
- Each connection has its own connectedTargets, pendingRequests, messageId
- Sessions are bound to specific extensionId via SessionMetadata
- New /extensions/status endpoint for listing all connected browsers
- CLI session new shows browser selection when multiple connected
- Browser detection via navigator.userAgentData (Ghost, Brave, Edge, etc)
- Added identity permission for Chrome profile email detection
2026-02-04 16:43:09 +01:00
Tommy D. Rossi 4251562ff7 no MCP in name 2026-01-29 20:23:52 +01:00
Tommy D. Rossi e56e27e5e5 WIP: screen recording via chrome.tabCapture
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.
2026-01-27 13:35:22 +01:00
Tommy D. Rossi f9869a59f2 refactor: move welcome.html to src/, simplify vite build config, cleanup cli.ts formatting 2026-01-23 23:57:25 +01:00
Tommy D. Rossi 93fdcb6b35 feat: first extension with active tabs keeps connection instead of being replaced
- 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
2026-01-21 19:09:37 +01:00
Tommy D. Rossi e87f801700 release: playwriter@0.0.40, extension@0.0.67 2026-01-05 10:12:42 +01:00
Tommy D. Rossi 1ad94f3930 release: playwriter@0.0.39, extension@0.0.66
- fix icon not updating on WS disconnect
- increase aria-labels auto-hide timeout to 30s
2026-01-03 17:38:28 +01:00
Tommy D. Rossi 178387ec97 Persistent WS connection and auto-create initial tab
- 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
2026-01-01 01:14:16 +01:00
Tommy D. Rossi be1b9514d3 Add ping/pong keep-alive to prevent service worker termination 2025-12-31 16:15:17 +01:00
Tommy D. Rossi 3d0d280f6a Fix context menu duplicate ID crash and add global error logging 2025-12-31 15:45:32 +01:00
Tommy D. Rossi b19b7ae72d change colors of badges 2025-12-30 14:19:33 +01:00
Tommy D. Rossi 8eedbcf2e1 bump 2025-12-30 13:54:12 +01:00
Tommy D. Rossi 2b862c436e add tabs permission to extension manifest 2025-12-30 13:28:29 +01:00
Tommy D. Rossi 9df46c48ca release: playwriter@0.0.30, extension@0.0.56 2025-12-30 13:26:28 +01:00
Tommy D. Rossi ba84eb5ac1 add right context menu for pinning 2025-12-28 23:36:20 +01:00
Tommy D. Rossi 150ad47307 fix about:blank gray icon and add auto-recovery after extension replacement 2025-12-22 19:29:25 +01:00
Tommy D. Rossi 9b73ab56f9 bump playwriter 0.0.26 and extension 0.0.54 2025-12-21 17:21:44 +01:00
Tommy D. Rossi 50aa6199d2 chore: bump to playwriter 0.0.22, extension 0.0.53 2025-12-20 21:33:10 +01:00
Tommy D. Rossi 04b757a7c8 add support for tab groups. green 2025-12-19 18:34:39 +01:00
Tommy D. Rossi 1a7cdd271e Update manifest.json 2025-12-09 12:28:26 +01:00
Tommy D. Rossi 376ebb06f8 nicer description 2025-12-09 12:22:58 +01:00
Tommy D. Rossi 36d0458243 bump 2025-11-26 17:01:34 +01:00
Tommy D. Rossi 7c6114dc12 update 2025-11-24 16:40:53 +01:00
Tommy D. Rossi 8cd2aad719 add tabs only in testing 2025-11-24 13:49:16 +01:00
Tommy D. Rossi aedeaa7a67 add tabs permission 2025-11-22 11:41:32 +01:00
Tommy D. Rossi 52f1bdb75b only need debugger permission 2025-11-19 13:13:24 +01:00
Tommy D. Rossi c4f08e114f remove tabs permission 2025-11-19 13:04:34 +01:00
Tommy D. Rossi a88c998d1d update manifest 2025-11-16 12:47:02 +01:00
Tommy D. Rossi a2fd82d6d8 rename 2025-11-16 11:30:28 +01:00