feat(review): capture full-page screenshots for before/after evidence#3669
Conversation
Switches captureShot from a viewport-only render (fullPage: false) to a full-page render (fullPage: true), so before/after screenshots always show the same position on the page for any change, however far down it is -- a change midway down a long page previously fell outside the fixed 1440x900/390x844 viewport and was silently absent from both cells. Verified against a real headless-Chromium render (browserless, per #3608's self-host infra) that a 7300px test page renders as a full 1440x7300 PNG with a deliberately-placed marker visible at its correct position, not just the 900px viewport slice. Part of #3607. Closes #3667.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-06 00:58:52 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3669 +/- ##
=======================================
Coverage 93.29% 93.29%
=======================================
Files 314 314
Lines 32057 32057
Branches 11748 11748
=======================================
Hits 29906 29906
Misses 1517 1517
Partials 634 634
🚀 New features to boost your workflow:
|
Summary
src/review/visual/shot.ts'scaptureShotswitches from a viewport-only render (fullPage: false, fixed 1440×900/390×844) to a full-page render (fullPage: true). Before/after screenshots now always show the same position on the page for any change, however far down it is — previously a change midway down a long page fell outside the fixed viewport and was silently absent from both cells.Closes #3667. Part of #3607.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlint(not run — no workflow files changed)npm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workers(not run — no Worker-runtime-specific code touched beyond the existing shot.ts module)npm run build:mcp(not run — no MCP package changes)npm run test:mcp-pack(not run — no MCP package changes)npm run ui:openapi:check(not run — no API/OpenAPI changes)npm run ui:lint(not run — noapps/gittensory-ui/**changes)npm run ui:typecheck(not run — noapps/gittensory-ui/**changes)npm run ui:build(not run — noapps/gittensory-ui/**changes)npm audit --audit-level=moderateIf any required check was skipped, explain why:
src/review/visual/shot.tsand its direct test changed — no UI, MCP, wrangler binding, OpenAPI, or workflow files touched, so those checks have no surface to exercise. Rannpx tsc --noEmit -p .(full project, clean) and the fullvisual-*test suite (75 tests across 7 files, all passing) locally.puppeteer-coreconnecting to a realbrowserless/chromiumcontainer (the same self-host infra shipped in Deploy self-host browser-rendering infrastructure (browserless/chrome + BROWSER_WS_ENDPOINT) #3608/feat(selfhost): add optional browserless/chromium service for visual review #3633) and navigated a real headless Chrome to a deliberately long (7300px) local test page with a marker div placed roughly 3800px down. Confirmedpage.screenshot({ fullPage: false })produces a 1440×900 PNG that never shows the marker, whilepage.screenshot({ fullPage: true })— the exact call this PR makes — produces a 1440×7300 PNG (filecommand confirmed exact pixel dimensions) with the marker visible at its correct position (screenshot inspected visually, not just checked by byte size). This is the real mechanism the code change relies on, not a mock.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots. (N/A — this changes the review-engine's OWN screenshot-capture mechanism, not a UI surface of gittensory itself; the real-render verification screenshot is described above rather than committed, per house rules against committing review-only evidence.)Notes