Skip to content

feat(review): capture full-page screenshots so before/after show the same page position #3667

Description

@JSONbored

Context

Part of the visual-capture automation epic #3607 (#3608#3610 shipped: self-host browser-rendering infra + review.visual config for preview URL/route overrides). This is Phase 1 of a follow-on upgrade to the before/after screenshot pipeline: making the evidence actually useful for review, not just present.

Problem

src/review/visual/shot.ts's captureShot currently renders page.screenshot({ type: "png", fullPage: false }) — viewport-only (1440×900 desktop / 390×844 mobile). For any change further down a page than the initial viewport, the before/after screenshots capture whatever happens to be in frame at load time, which for a change midway down a long page silently misses it in both cells — the screenshots are technically "before" and "after" but don't actually show the change.

Fix

Switch to fullPage: true. A full-page screenshot inherently contains the entire scrollable page in both before and after, at the same width, so any changed region — wherever it is on the page — appears at the same relative position in both. This solves "the exact same spot" requirement by construction, with no DOM-diff-region detection or scroll-position heuristic needed.

Deliverables

  • shot.ts: fullPage: falsefullPage: true
  • Regression test pinning the new screenshot call arguments
  • Real end-to-end verification: a genuine headless-Chromium render (via the browserless infra from Deploy self-host browser-rendering infrastructure (browserless/chrome + BROWSER_WS_ENDPOINT) #3608) against a 7300px test page confirmed the resulting PNG is the full 1440×7300 page (not the 1440×900 viewport), with a deliberately-placed "changed spot" marker visible at its correct position — not just a mocked unit-test assertion

Expected outcome

Before/after screenshots always show the same page position for any change, however far down the page it is — the foundational fix the rest of the visual-evidence upgrade (pixel-diff overlay, theme matrix, AI vision analysis) builds on.

Part of #3607.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)visualUI/web visual work — owner-led, NOT for Gittensor contributors (extensions excepted)

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions