feat(console): DocPage resolves docs package-scoped (ADR-0048)#1708
Merged
Conversation
The doc viewer at /apps/:appName/docs/:name now threads the route's package-id
segment into meta.getItem('doc', name, { packageId: appName }) so the single-doc
fetch is package-scoped (prefer-local) on the server. Two installed packages may
ship a doc with the same bare name and each resolves within its own package, so
doc names no longer need a globally-unique namespace prefix. The legacy
top-level /docs/:name path (no appName) keeps context-free behavior.
Verified end-to-end in the browser against a real collision: /apps/
com.example.showcase/docs/showcase_index and /apps/com.objectstack.studio/docs/
showcase_index render each package's own doc.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
What
The doc viewer at
/apps/:appName/docs/:namenow threads the route's package-id segment intometa.getItem('doc', name, { packageId: appName }), so the single-doc fetch is package-scoped (prefer-local) on the server.Why
Under ADR-0048 (option A), the route segment is the package id. Two installed packages may ship a doc with the same bare name (e.g.
intro); previously a single-doc fetch was context-free and always resolved to whichever package registered first. With the package threaded through, each resolves within its own package — sodocnames no longer need a globally-unique namespace prefix (the prefix becomes a convention, likepage/dashboard/report).The legacy top-level
/docs/:namepath (noappName) keeps its context-free behavior.Server dependency
Requires the framework serving-path fix in framework#1816 (the cacheable single-item REST path was dropping
?package=; now it bypasses the cache and threadspackageIdthroughgetMetaItem).Verification
End-to-end in the browser against a real registry-level collision (two packages each shipping
doc/showcase_index):/apps/com.example.showcase/docs/showcase_index→ Showcase's conformance-fixture doc/apps/com.objectstack.studio/docs/showcase_index→ "STUDIO VERSION" docNo console errors.
🤖 Generated with Claude Code