fix(ci): resolve RTL scope to public components - #5946
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
A contributor can still get a false RTL coverage gap for a private helper. The resolver now treats every PascalCase .tsx file in a lowercase group as public: in a group whose barrel exports only PublicProvider, my probe also emitted PrivateHelper. The existing component-discovery guard rejects this filename-only rule for exactly that reason.
Can we derive the names from the group’s public barrel, preserve the unresolved-group fallback, and add an unexported PascalCase helper to the regression test?
[Reviewed by Robohands]
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
Thanks — the current head still scopes RTL by PascalCase filenames rather than the public export surface. In a lowercase group whose barrel exports only IntlProvider, the analyzer also emits an unexported PrivateHelper, so a contributor gets a false coverage gap for code nobody can import.
Could we derive rtlComponents from the group’s public barrel, preserve the unresolved-group fallback, and add that private-helper regression case?
[Reviewed by Robohands]
Cause
pr-rtlreceived source-directory names from PR analysis. That works for conventional PascalCase component folders, but a lowercase source group such aspackages/core/src/intl/was reported asintl. The RTL audit could not associate that name with the publicIntlProvidercomponent, so its fail-closed coverage result wasunknown/intlinstead of identifying the actual new component with no RTL evidence.What changed
PR analysis now emits a dedicated
rtlComponentsscope:.tsxfiles;The RTL CI job consumes this scope with a fallback for older analysis artifacts. Other PR-reporting and accessibility component names remain unchanged.
User impact
RTL findings now name the component contributors need to fix. For #5684, the audit scope becomes
AlertDialog,IntlProviderrather thanAlertDialog,intl; the new provider still correctly remains a coverage gap until it has a story or reviewed N/A evidence. This does not baseline or suppress the finding.Testing
npx --yes pnpm@11.10.0 exec vitest run .github/scripts/analyze-pr.test.mjs --testTimeout=120000rtlComponents = ["AlertDialog", "IntlProvider"]IntlProviderNo changeset: CI analysis only; no package behavior or public API change.