docs: align route-prefix examples with the Host's /api/plugins/ (plural)#21
Merged
Conversation
Every illustrative route prefix said /api/plugin/<id>/ (singular): spec §7.3, two mentions in best-practices.md, and examples/full-plugin throughout (routes.py, screen.js, settings.html). The Host serves plugin routes under /api/plugins/ — ~90 occurrences across core's plugins/, zero singular — so a newcomer copying the official example registered routes whose derived client paths 404 against a real install. best-practices.md was also internally inconsistent: its other four route-prefix mentions already used the plural form. PATCH-level per CONTRIBUTING's bump table: the normative requirement (§7.4, derive every route path from the plugin id) is unchanged; the singular form only ever appeared in examples and prose. No schema change, no version bump — entry added under CHANGELOG [Unreleased]. Closes #20 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: gionnibgud <gionnibgud@gmail.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe full-plugin example now registers and requests settings through ChangesPlugin route prefix correction
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
byrongamatos
marked this pull request as ready for review
July 23, 2026 09:27
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.
Resolves #20 as the PATCH direction proposed there — draft until a maintainer confirms that direction (spec-side fix rather than Host-side).
What
Replaces every singular
/api/plugin/<id>/…with/api/plugins/<id>/…:spec/plugin-spec-v1.md§7.3spec/best-practices.md(lines 67, 110)examples/full-plugin/routes.pyexamples/full-plugin/screen.jsexamples/full-plugin/settings.htmlPlus a
### Fixedentry under CHANGELOG[Unreleased].Why spec-side
Beyond the asymmetry argued in #20 (changing the Host would break every existing plugin; §7.4's actual MUST — derive every route path from the plugin
id— never mandates the singular form), the repo was already internally inconsistent:best-practices.md's other four route-prefix mentions (lines 432, 623, 897 and the checklist) already use the plural. This PR makes the examples agree with both the Host and the rest of the guide.Scope notes
[Unreleased]already carries a pending MINOR entry (scriptType); the release cut stays with maintainers.tools/check_versions.pypasses unchanged.check_versions,validate.pyon both examples,pytest11/11,ruff.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
/api/plugins/<id>/…path, ensuring examples match the Host’s routing behavior.Documentation
/api/pluginsnamespace.