Repository navigation
Description
Add visual-tests/ to the default noise filter
Repo
safishamsi/graphify — https://github.com/safishamsi/graphify
Summary
When /graphify runs against a TypeScript / Preact / React monorepo that uses a visual-tests/ directory for Playwright-style visual regression snapshots, the directory's contents (the built JS bundle + the mock files used to drive the visual harness) get treated as real source code by tree-sitter. The result is hundreds of garbage nodes in the graph — u3(), d2(), LetterD(), etc. — that swamp the legitimate top-N god nodes and pollute the community detection.
The existing noise filter already excludes coverage/, __snapshots__/, dist/, build/, and node_modules/. visual-tests/ belongs in the same bucket.
Repro
Run /graphify . against any repo with a visual-tests/ directory containing:
- A built JS bundle (
visual-tests/bundle.jsor similar) - Mock files (
visual-tests/mocks.ts,visual-tests/mocks/figma-ui.tsx, etc.) - Snapshot fixture screens (
visual-tests/screens.tsx)
Observed behaviour on a real codebase (1,365 files corpus):
- 161 nodes extracted from
visual-tests/bundle.jsalone — entries likeu3(),d2(),LetterD(),B2()— minified function names from the Vite production build - 473 nodes total from
visual-tests/**across bundle + mocks + screens u3()ranked as the v3: Codex and OpenClaw support #2 god node (86 edges) on first build, eclipsingtrackEvent()(84) andToolError(62) which are the real architectural abstractions- Top community labels degenerated into "Plugin Visual Test Components A" + "Plugin Bundle Snapshots" purely because the snapshot artefacts dominated by node count
After manual purge of visual-tests/:
- 473 nodes removed (5.7% of graph)
- Top 10 god nodes became architecturally meaningful
- Community labels became interpretable
Suggested fix
Add 'visual-tests' (and likely 'visual-test') to the default noise-filter set in graphify/detect.py (or wherever the is_noise predicate lives — I haven't traced your source). Mirror it for the equivalent in any HTML-export community-aggregation step that might re-pull these via path heuristics.
Single-line PR:
NOISE_DIR_NAMES = {
'coverage', 'lcov-report', '__snapshots__', 'snapshots',
'node_modules', 'dist', 'dist-protected', 'build',
'visual-tests', 'visual-test', # ← add
}Optionally, also add 'storybook-static' since Storybook's static build output has the same problem and is increasingly common in repos that also use graphify.
Workaround (today)
Filter .graphify_detect.json post-detect before semantic extraction. Mechanical but the user has to know to do it. Same for users running --update on incremental changes.
Related observation (separate issue worth filing)
docs/site/refs/ (or any **/refs/ directory with reference screenshots) gets vision-extracted as real diagrams. That's actually correct behaviour — those usually contain useful UI screenshots for the docs. Not a noise issue, just noting that the line between "visual-tests = noise" and "refs = signal" matters.
Activity
Skip coverage/visual-test/snapshot/storybook-static noise dirs in det…
safishamsi commentedon May 14, 2026
Fixed in commit 7c561e6 on v7. Added
visual-tests,visual-test,__snapshots__,snapshots,storybook-static, anddist-protectedto_SKIP_DIRSindetect.py. Regression tests added and all 779 tests pass.Skip coverage/visual-test/snapshot/storybook-static noise dirs in det…
Skip coverage/visual-test/snapshot/storybook-static noise dirs in det…