fix(ci): require a default export before treating a file as a route entry - #7028
Conversation
…ntry Follow-up to #7026, which added `error.tsx` to the entry filenames and with it picked up `[workspaceId]/components/error/error.tsx` — named like a boundary, and not one. It exports `ErrorShell` and `ErrorState` for the thirteen real boundaries to use; Next would reject it as a boundary for having no default export. Counting it inflated the coverage number and would have recorded a shared component in the graph-weight baseline as though it were a route. The filename was never the right test. Every convention-composed entry must default-export the thing Next renders, so that is the discriminator now. Entry count goes 60 → 59, and all thirteen real `error.tsx` boundaries still walk. Also adds `template.tsx` and `default.tsx`. Neither exists under `app/workspace` today, so this changes nothing now — but the enumeration claims to cover what Next composes, and leaving two out makes that claim false the day someone adds one. Both raised in review on #7026 (Cursor and Greptile respectively); I merged before reading them, so this lands separately.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Also enumerates Reviewed by Cursor Bugbot for commit c01be22. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c01be22. Configure here.
Greptile SummaryThis follow-up tightens workspace route discovery by requiring a default export and completes the convention-entry filename set.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported omission of
|
| Filename | Overview |
|---|---|
| scripts/check-tool-registry-boundary.ts | Route-entry discovery now requires a recognized default export, covers the previously missed default re-export form, and enumerates two additional Next.js entry filenames. |
Reviews (2): Last reviewed commit: "fix(ci): count every form that declares ..." | Re-trigger Greptile
`export { default } from './page'` is a valid Next entry and the regex required
`as default`, so such an entry would have dropped out of the walk and skipped
both the registry gate and the graph-weight ratchet — silently, which is the
dangerous direction for a discriminator to fail in.
Latent rather than live: the form appears once under `app/workspace`, in a
barrel, not in an entry filename.
Four forms now count — `export default …`, `export { default } from`,
`export { default, … } from`, and `export { X as default }`.
`export { default as X }` still does not: it re-exports another module's default
under a name and leaves this one without one. Verified all ten variants,
including that last distinction.
Raised by both Cursor and Greptile on #7028.
|
@greptile-apps the score is a commit behind — last reviewed |

Follow-up to #7026. Both points were raised in review there and I merged before reading them, so they land here.
The filename was never the right test
#7026 added
error.tsxto the entry filenames, and with it picked up[workspaceId]/components/error/error.tsx— named like a boundary, and not one:Named exports only. It is the shared helper the thirteen real boundaries render, and Next would reject it as a boundary for having no default export.
Counting it inflated the coverage number and — the part that would have bitten — recorded a shared component in the graph-weight baseline as though it were a route.
Every convention-composed entry must default-export the thing Next renders, so that is the discriminator now.
Entry count 60 → 59. All thirteen real
error.tsxboundaries still walk; only the helper drops out.Completing the enumeration
Also adds
template.tsxanddefault.tsx. Neither exists underapp/workspacetoday, so this changes nothing right now — but the list claims to cover what Next composes, and leaving two out makes that claim false the day someone adds one. That is the same failure the surrounding TSDoc already warns about: "A hardcoded list goes stale silently."Verification
Credit
The non-route entry was Cursor's; the missing
template.tsx/default.tsxwas Greptile's. Both were correct.