Repository navigation
Open
Labels
enhancementNew feature or request
Description
Problem
Evidence reports mark desktop pointer actions since #199. Browser captures have no markers. The browser evidence recorder (packages/browser/src/devtools-evidence.ts) is a passive JSON-RPC proxy in front of chrome-devtools-mcp. It sees tool arguments and responses, but not the capture rectangle, viewport, scroll offset, device pixel ratio or page identity. Without those facts, a point cannot be placed on a screenshot.
Where it was found
Planning for #200. Moved out of #200 by maintainer decision, because it needs new infrastructure.
Findings from the #200 design brainstorm
- chrome-devtools-mcp 1.5.0:
take_screenshotacceptsformat,quality,uid,fullPageandfilePath. Downscale limits are launch options.clicktakesuidanddblClick;dragtakesfrom_uidandto_uid.click_atand the screencast tools need experimental flags that Pickforge does not pass. - A second CDP connection can read layout metrics, scroll and DPR without model-visible calls. It cannot reliably tell which page the upstream server selected, or see its exact capture request.
- Candidate design: a loopback CDP transport observer between the child and Chromium. It observes target routing,
Page.captureScreenshotrequests andInput.dispatchMouseEventpoints, plus bounded private geometry reads. It stores no raw CDP messages. - Upstream risk: at DPR 2 with a downscale limit, a scrolled element capture used the wrong crop origin and returned a blank image. Metadata must describe the actual request and returned pixels.
- The MCP evidence wrapper sets
xvfb-rootdirectly (packages/mcp-server/src/evidence.ts). A neutral hook such as{ space, identity: () => Promise<string | undefined> }, compared by string equality, avoids browser branches there.
Acceptance criteria
- Each browser capture records its actual source rectangle in CSS pixels, output size, DPR, scroll and viewport state, and an opaque page identity.
- Fractional CSS coordinates are kept until render.
- UID actions get a marker only when the dispatched point is observed and correlated. Otherwise they stay unmarked.
- MCP tool lists, arguments and responses stay byte-identical. Captured PNGs never change.
Checklist
- CDP transport observer with transparency tests (full MCP stream compared with recording on and off)
- Capture geometry and page identity per screenshot
- Evidence-only paired captures behind human configuration, default off
- Viewer projection for browser captures
- Tests: DPR 1 and 2, zoom, scroll, full page, element crop, downscale, navigation, tabs, frames
- Release note
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity