fix(review): narrow visual screenshot path gate - #4648
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4648 +/- ##
=======================================
Coverage 94.12% 94.12%
=======================================
Files 430 430
Lines 38181 38181
Branches 13922 13922
=======================================
Hits 35939 35939
Misses 1585 1585
Partials 657 657
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 23:23:05 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
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.
|
|
Closing — this reverts deliberate, already-shipped behavior from #4564 (merged the day before this PR was opened).
This PR removes that pattern entirely and flips those exact same test assertions to Thanks for the scan — the underlying "is this gate too broad" question is worth watching, but the correct fix (if capture cost becomes a real problem) would need to preserve |
Motivation
apps/*file as "visual", which caused backend/config/docs files under app folders to trigger expensive browser screenshot captures.Description
/^apps\/[^/]+\//ipattern fromVISUAL_PATTERNSinsrc/review/visual/paths.tsso onlypublic/**and web-visible frontend extensions (e.g..tsx,.jsx,.css,.html,.svg,.astro,.vue,.svelte,.mdx) are considered visual.DEFAULT_ROUTE_FILEandmapFilesToRoutesbehavior insrc/review/visual/capture.tsunchanged so frontend route files inapps/*/src/routes/*.tsx|jsxare still mapped via extension-based matching and route inference remains available.test/unit/visual-paths.test.tsto reflect the narrowed gate and added regression assertions that backend/config/docs files such asapps/api/src/server.ts,apps/ui/components.json, andapps/marketing-site/README.mddo not trigger the visual gate.Testing
git diff --checkwhich passed with no whitespace or conflict markers.npx vitest run test/unit/visual-paths.test.ts test/unit/visual-capture.test.ts --testNamePattern "isVisualPath|mapFilesToRoutes app-folder generalization", and the test files executed successfully (unit assertions forisVisualPathandmapFilesToRoutespassed).npm run typecheckfailed in this environment due to missing optional/local packages (@anthropic-ai/claude-agent-sdk,web-tree-sitter) causing TypeScript resolution errors.npm run test:coveragecould not complete in this environment because coverage remapping errored withTypeError: jsTokens is not a function, so full coverage verification remains blocked here.Codex Task