test(theme): discover component sources at any depth under src - #5784
Merged
Conversation
Split out of #5420 at review request: this is guard infrastructure, not part of exposing Table's affordance theme targets, and it should stand or fall on its own. `themingTargets.test.ts` scanned only the top level of `src`, so a component whose sources sit a level down — Table's plugins render from `Table/plugins/<name>/` — was silently exempt from the guard. That is the drift #3741 was filed to prevent. Nothing was failing when this was written, so it closes a hole rather than fixing a live break: 294 assertions to 302. Measured rather than assumed — instrumented discovery reports core=98, lab=5, nested=2, the two being `Table/plugins/filtering` and `Table/plugins/sortable`. NOT included, deliberately: the same recursion on the sibling `derivedVarRegistry.test.ts`. I wrote it, measured it, and it discovered nothing (nested=0), because that guard also requires a doc file named after the directory and `Table/plugins/sortable/` has no `sortable.doc.mjs`. Closing that one needs the doc-fallback lookup this file already has, which is a larger change than a walk; shipping the walk alone would have been a rule that never fires.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
imdreamrunner
approved these changes
Sep 1, 2026
imdreamrunner
enabled auto-merge (squash)
September 1, 2026 21:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Split out of #5420 at review request — this is guard infrastructure, not part of exposing Table's affordance theme targets, and it should stand or fall on its own.
What
themingTargets.test.tsscanned only the top level ofsrc, so a component whose sources sit a level down was silently exempt from the guard. Table's plugins render fromTable/plugins/<name>/, so both of them were. That is the drift #3741 was filed to prevent.Nothing was failing when this was written, so it closes a hole rather than fixing a live break: 294 assertions to 302.
Testing
Measured rather than assumed — instrumented the discovery to print what it finds:
What is deliberately NOT here
The same recursion on the sibling
derivedVarRegistry.test.ts. I wrote it, measured it, and it discovered nothing —nested=0— because that guard also requires a doc file named after the directory, andTable/plugins/sortable/has nosortable.doc.mjs. Closing that one needs the doc-fallback lookup this file already has, which is a larger change than a walk.Shipping the walk alone would have been a rule that never fires, so it is not in this PR. Worth its own change if the gap matters.
Risk
Test-only. No runtime, public API, DOM, style, or behavioural change.