Commit Graph

615 Commits

Author SHA1 Message Date
Tommy D. Rossi 453e0783e6 feat: add 50% threshold for diffing - show full content when changes are large
When showDiffSinceLastCall detects >50% of lines changed, returns full
new content instead of a diff patch. This makes large changes more readable.
2026-02-01 17:14:11 +01:00
Tommy D. Rossi 8532de46fc feat: improve HTML rewriting - remove decorative subtrees and aria-hidden elements
- Add removeAriaHiddenPlugin to strip aria-hidden=true subtrees
- Add removeEmptyAltImagesPlugin to remove decorative images
- Add removeDecorativeSubtreesPlugin to prune content-free branches
- Update test snapshots for x.com
2026-02-01 17:09:07 +01:00
Tommy D. Rossi 806d2b108b fix: suppress Playwright CDP cleanup assertion errors in tests
- Add vitest.setup.ts to handle unhandled rejections from CDP disconnect
- Fix race condition in debugger test by awaiting evaluate after resume
- Add delay before browser.close() in service worker test
2026-02-01 17:08:07 +01:00
Tommy D. Rossi a2fa91584d refactor: replace Playwright internals with in-page dom-accessibility-api
- Add a11y-client.ts: browser-side code using dom-accessibility-api (41KB)
- Single page.evaluate() call instead of multiple CDP roundtrips
- Zero element handles - everything runs in page context
- Stable refs from test IDs (data-testid, data-test-id, id) instead of e1, e2
- Add locator param to scope snapshots to subtrees
- Fixes cross-frame 'Unable to adopt element handle' error (issue #39)
2026-02-01 16:58:29 +01:00
Tommy D. Rossi ec7ed4e590 better getHtml function. keep test ids 2026-01-31 18:49:51 +01:00
Tommy D. Rossi b03b6f6a12 Update SKILL.md 2026-01-31 18:48:44 +01:00
Tommy D. Rossi 2b5face36a Update skill.md 2026-01-30 19:56:21 +01:00
Tommy D. Rossi a9a40e1183 fix screen recording: resolve relative paths, buffer chunks, wait for encoder 2026-01-29 23:30:01 +01:00
Tommy D. Rossi db54c35b83 mp4 2026-01-29 20:30:10 +01:00
Tommy D. Rossi 1732e4e232 Update SKILL.md 2026-01-29 20:23:57 +01:00
Tommy D. Rossi 4251562ff7 no MCP in name 2026-01-29 20:23:52 +01:00
Tommy D. Rossi 9c33fca42e Update SKILL.md 2026-01-29 19:46:29 +01:00
Tommy D. Rossi 7914c4ed9b use correct functions 2026-01-29 19:44:10 +01:00
Tommy D. Rossi 5721360ef2 section common mistakes to avoid in skill 2026-01-29 19:40:57 +01:00
Tommy D. Rossi 4d32672426 Update relay-navigation.test.ts 2026-01-29 19:40:28 +01:00
Tommy D. Rossi 8f92197efc test(playwriter): clarify test names
Rename MCP-prefixed test files and top-level describe labels to reflect relay, extension, and snapshot scopes.
2026-01-27 22:19:11 +01:00
Tommy D. Rossi f36647a674 test(playwriter): speed up MCP suite
Split MCP tests into parallel files and use local fixtures/polling so attach and reconnect checks stay stable under parallel runs.
2026-01-27 19:46:38 +01:00
Tommy D. Rossi 7809be6328 docs(skill): instruct agents to create own pages and handle closures 2026-01-27 19:06:06 +01:00
Tommy D. Rossi 7e4dc3fd18 Update welcome.html 2026-01-27 18:39:55 +01:00
Tommy D. Rossi 5dc39cc4fe style(extension): tweak welcome page text opacity and remove redundant copy 2026-01-27 18:39:43 +01:00
Tommy D. Rossi 653f00c3a3 feat(extension): redesign welcome page with Prism.js syntax highlighting 2026-01-27 18:38:41 +01:00
Tommy D. Rossi 1de0f6d1a4 feat(cli): improve session new output and add session delete command 2026-01-27 18:35:23 +01:00
Tommy D. Rossi e03f1abc0f perf(mcp): skip load wait for about:blank auto-create 2026-01-27 16:36:44 +01:00
Tommy D. Rossi 67d017237e fix(cdp): isolate extension builds and keep oopif auto-attach 2026-01-27 16:05:15 +01:00
Tommy D. Rossi a8412343e1 fix merge artifacts. fix build 2026-01-27 13:54:26 +01:00
Tommy D. Rossi ea203418c2 add build 2026-01-27 13:51:13 +01:00
Tommy D. Rossi 6de954ca1a Update SKILL.md 2026-01-27 13:35:23 +01:00
Tommy D. Rossi 0903105129 docs: use .mp4 extension in recording examples 2026-01-27 13:35:23 +01:00
Tommy D. Rossi 170ac7c87f Update SKILL.md 2026-01-27 13:35:23 +01:00
Tommy D. Rossi 53450ee36f refactor: remove dependency injection, use direct imports
- Export store, connectionManager, logger, sendMessage, getTabBySessionId from background.ts
- recording.ts now imports directly instead of using initRecording()
- Simplify RecordingRelay constructor to take params directly instead of interface
2026-01-27 13:35:23 +01:00
Tommy D. Rossi 4a8caf19bd refactor: extract recording code into separate modules with proper types
- Create extension/src/offscreen-types.ts with Chrome tabCapture constraint types
- Create extension/src/recording.ts extracting recording functions from background.ts
- Create playwriter/src/recording-relay.ts extracting recording logic from cdp-relay.ts
- Remove 'as any' usages by adding proper MediaStream constraint types
- Add typesafe message types for offscreen document communication
- Remove duplicate OUR_EXTENSION_IDS constant (uses EXTENSION_IDS from utils.ts)
2026-01-27 13:35:23 +01:00
Tommy D. Rossi 98c62eab60 Update utils.ts 2026-01-27 13:35:23 +01:00
Tommy D. Rossi 54d3f02a5b feat: support concurrent screen recordings across multiple tabs
- Change offscreen.ts from single recording variable to Map<tabId, RecordingState>
- Update all recording message handlers to route by tabId
- Track sessionId in relay server for proper recording lookup when stopping
- All recording operations now consistently require tabId
2026-01-27 13:35:23 +01:00
Tommy D. Rossi c9e8361a54 fix: address PR review comments
- Fix misleading comment about user gesture requirement in background.ts
- Remove unused 'target' variable in /recording/stop endpoint
- Fix /recording/cancel to not delete all recordings (handled by event)
- Remove redundant security middlewares (CORS handles it)
2026-01-27 13:35:22 +01:00
Tommy D. Rossi 050c6d5b50 feat: use MP4 format for screen recording instead of WebM 2026-01-27 13:35:22 +01:00
Tommy D. Rossi df63f418e5 feat: add Chrome flags for automated recording without user interaction
- Add getChromeRestartCommand() with --allowlisted-extension-id and --auto-accept-this-tab-capture flags
- Move EXTENSION_IDS to utils.ts for cleaner imports
- Add sessionId support for multi-tab recording
- Add helpful error message when activeTab permission is missing
- Add null check for empty extension result
- Document offscreen recording flow with ASCII diagram
2026-01-27 13:35:22 +01:00
Tommy D. Rossi 8449006e59 refactor: simplify screen recording code
- Fix vite output path (was broken lib/background.mjs, now background.js)
- Import recording types from protocol.ts instead of duplicating in background.ts
- Remove dead getSessionId() and unused sessionId params from screen-recording.ts
- Replace 4 executor wrapper functions with single withRecordingDefaults helper
- Fix binary chunk routing with lastRecordingMetadataTabId tracking
- Add ExtensionStopRecordingResult type for proper extension/relay separation

Saves ~56 lines while improving correctness of multi-tab recording.
2026-01-27 13:35:22 +01:00
Tommy D. Rossi 3b5427ebe8 update notes on permissions for recording 2026-01-27 13:35:22 +01:00
Tommy D. Rossi 09f502cc43 Update background.ts 2026-01-27 13:35:22 +01:00
Tommy D. Rossi 608afc8d54 fix: clear setTimeout on successful recording stop to prevent process hang 2026-01-27 13:35:22 +01:00
Tommy D. Rossi b159d6fbc7 refactor: use satisfies for fetch body types in screen-recording 2026-01-27 13:35:22 +01:00
Tommy D. Rossi e79dd472db test: skip recording test, write proper test flow for manual testing 2026-01-27 13:35:22 +01:00
Tommy D. Rossi b52928cc90 refactor: move HTML files to src/, use vite HTML entry points
- Move welcome.html to src/
- Use vite HTML inputs instead of static copy for offscreen.html and welcome.html
- Source HTML references .ts, vite transforms to .js
- Update paths in background.ts to src/
2026-01-27 13:35:22 +01:00
Tommy D. Rossi c9768965b5 Update .gitignore 2026-01-27 13:35:22 +01:00
Tommy D. Rossi f8d6640819 refactor: use vite rollupOptions instead of esbuild for offscreen.ts 2026-01-27 13:35:22 +01:00
Tommy D. Rossi 74497c2a1a feat: implement screen recording via chrome.tabCapture with offscreen document
- Use chrome.tabCapture.getMediaStreamId() from service worker
- Pass stream ID to offscreen document for MediaRecorder
- Recording survives page navigation (unlike getDisplayMedia)
- Requires user to click extension icon first (activeTab permission)
- Add esbuild to build offscreen.ts separately
- Update prompt docs with recording instructions
2026-01-27 13:35:22 +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 81988c3305 show cli examples in welcome 2026-01-27 13:29:03 +01:00
Tommy D. Rossi fd3d4a1aee Update SKILL.md 2026-01-26 15:08:16 +01:00
Tommy D. Rossi d4107d1ddd fix(extension): detach child sessions on parent detach 2026-01-26 15:04:37 +01:00