fix(review): exclude bare .ts app-source files from isVisualPath - #6330
Conversation
Closes #6322 isVisualPath's app-folder pattern (apps/*/) is extension-agnostic, so a bare .ts file living inside an app's own src/ tree -- a data/logic/hooks/ test file, never a route (TanStack Router's file-based routes are always .tsx/.jsx) -- also matched, triggering the full screenshot-capture pipeline even though it renders nothing. Confirmed live on JSONbored/metagraphed#6036: a non-visual data-layer fix touching only apps/ui/src/lib/metagraphed/queries.ts + its .test.ts sibling burned Browser Rendering on a meaningless before/after of the unchanged homepage, despite the bot's own screenshot-table-gate correctly calling this PR out of scope for screenshot evidence. Excludes apps/*/src/**/*.ts specifically (never .tsx) -- an app-root .ts config file (tailwind.config.ts, vite.config.ts) still matches since it isn't under src/, and every non-.ts file anywhere in the app tree is unaffected.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-16 02:16:35 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, 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 #6330 +/- ##
=======================================
Coverage 95.60% 95.60%
=======================================
Files 596 596
Lines 47121 47123 +2
Branches 14999 15000 +1
=======================================
+ Hits 45049 45051 +2
Misses 1290 1290
Partials 782 782
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
isVisualPath's app-folder pattern (apps/*/) is extension-agnostic, so a bare.tsfile living inside an app's ownsrc/tree — a data/logic/hooks/test file, never a route (TanStack Router's file-based routing is always.tsx/.jsx) — also matched, triggering the full screenshot-capture pipeline even though it renders nothing.apps/ui/src/lib/metagraphed/queries.ts+ its.test.tssibling burned Browser Rendering on a meaningless before/after of the unchanged homepage, despite the bot's ownscreenshot-table-gate.tscorrectly calling this PR out of scope for screenshot evidence.apps/*/src/**/*.tsspecifically (never.tsx) — an app-root.tsconfig file (tailwind.config.ts,vite.config.ts) still matches since it isn't undersrc/, and every non-.tsfile anywhere in the app tree is unaffected.Course-correction from the issue's original proposal: #6322 initially proposed requiring a route/page-shape path OR a front-end extension. While investigating, I found the existing test suite (
test/unit/visual-paths.test.ts) explicitly and intentionally assertsapps/loopover-ui/README.mdandapps/ui/components.json(neither route-shaped, neither a front-end extension) astrue— that broader proposal would have regressed those. The narrowerapps/*/src/**/*.tsexclusion implemented here fixes the exact observed bug without touching any existing, intentionally-asserted case.Closes #6322
Test plan
test/unit/visual-paths.test.tsextended: the exact fix(ui): apply the pre-2000 placeholder rule in normalizeFreshnessSources metagraphed#6036 file paths nowfalse; a sibling.tsxunder the samesrc/tree, app-root.tsconfig files, and a non-.tsfile undersrc/all remaintrue(100% stmt/branch/line coverage on the changed file)test/unit/queue-3.test.ts+test/unit/queue-4.test.ts(the integration tests exercisingisVisualPathend-to-end viabuildCapture) pass unchanged — both use.tsxroute fixtures, unaffected by this narrowingnpm run typecheckcleannpm run test:cigate green