Repository navigation
feat(nextly): warn at boot when a plugin ships without a description - #762
Conversation
Without one the admin can only show the package specifier wherever it lists that plugin, so a reader sees a name chosen for npm rather than for them. Warned rather than thrown: the omission is the plugin author's, it breaks nothing at runtime, and an operator cannot fix a third-party package from their config.
Boot wiring inside a several-hundred-line registration function can be deleted without any test noticing. Taking the logger rather than reaching for one puts the message under test, which is the part worth pinning.
|
Warning Review limit reached
Next review available in: 11 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex please review this PR |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
T-21. A plugin with no
admin.descriptionis one the admin can only ever show by its package specifier —@nextlyhq/plugin-page-builderwhere another plugin shows "Build pages visually from blocks". The reader is left inferring the purpose from a name chosen for npm rather than for them.Two corrections to the task note first
The tracker said this check "belongs beside the other plugin doctor diagnostics in
packages/nextly". There is no doctor.nextly pluginshaslistandinfoand nothing else, and no diagnostics command exists anywhere in the repo. So the check needed a home rather than a neighbour.It also said the plan "fills in the two first-party plugins that ship without a description". All three already have one — page-builder, form-builder and seo. So this PR fixes no plugin; its entire value is stopping the omission recurring, which is exactly what the note said was missing.
Where the check lives, and why not the alternatives
A boot warning, emitted beside the line that already names the registered plugins — because that line is the symptom: it is where a nameless plugin first shows up as a bare package specifier.
nextly plugins listis opt-in; the omission should surface to the person who will see its consequence, which is whoever boots the app.Shape
pluginsMissingDescription(plugins)is pure and returns names, so the same question asked from a boot warning, a future CLI report or a test cannot become three answers.warnUndescribedPlugins(plugins, logger)takes the logger rather than reaching for one.That second function exists for a specific reason. Wiring that lives only as a call site inside a several-hundred-line registration function can be deleted without any test noticing — I hit exactly that on #747, where removing a guard's call left every test on the guard itself green. Passing the logger puts the message under test.
Tests
Nine cases. The ones that matter:
!== undefinedand an optional chain, so a test covering only "absent" passes on an implementation that admits"";Break-verified: warning on every plugin instead of the undescribed ones fails two tests.
Note
packages/nextly/src/plugins/schema/caching.test.tsfails 2 tests here and onorigin/mainalike — pre-existing, unrelated call path.