feat(app-shell): ADR-0048 (A) — package-id app routing (resolution layer)#1693
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
First, non-breaking slice of the unified package-id routing refactor. - New `appRoute` helpers: `appRouteSegment(app)` (canonical link segment = package id, name fallback) and `matchAppBySegment(apps, seg)` (resolve a route segment to its app, preferring `_packageId`, falling back to `name`). - AppContent's active-app selection now uses `matchAppBySegment`, so `/apps/<packageId>` resolves — while `/apps/<appName>` keeps working (the name fallback doubles as a per-tenant alias / legacy URL). No emitted URL changes yet, so live behaviour is unchanged. Remaining (browser-verified follow-up): switch href emission from app objects to package id at the ~13 nav sites (AppSidebar/UnifiedSidebar/AppSwitcher/ AppHeader/CommandPalette/SearchResultsPage/UnpublishedAppBar/useNavigationSync/ ConsoleFloatingChatbot), and move docs to /apps/:packageId/docs/:name (DocPage prefer-local + DocsIndex package-scoped links). Test: utils/__tests__/appRoute.test.ts (7). Typecheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ss nav (selection layer) Now that each platform app is its own package (framework #1813), package-id routing is unambiguous. Route the active-app lookup in every nav surface through `matchAppBySegment` (prefer `_packageId`, fall back to app name) so `/apps/<packageId>` resolves WITH sidebar + header intact — while `/apps/<name>` keeps working (the name fallback doubles as a per-tenant alias). Additive and non-breaking: no emitted URL changes. Sites: AppSidebar, UnifiedSidebar, AppSwitcher, AppHeader, SearchResultsPage, UnpublishedAppBar, useNavigationSync (AppContent done in the foundation commit). Browser-verified against a live app-showcase backend with the split: - /apps/com.objectstack.studio → Studio renders with full sidebar + header - /apps/studio (name) → still renders (fallback) Typecheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
xuyushun441-sys
force-pushed
the
feat/adr-0048-package-id-routing
branch
from
June 13, 2026 12:42
0c52f1a to
8178598
Compare
xuyushun441-sys
marked this pull request as ready for review
June 13, 2026 12:43
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.
Resolution layer of ADR-0048 option-A routing, on top of the merged platform-app split (framework objectstack-ai/objectstack#1813, which made each app its own package so package-id routing is unambiguous).
What
appRoutehelpers:appRouteSegment(app)(canonical link segment = package id, name fallback) +matchAppBySegment(apps, seg)(resolve a route segment to its app, prefer_packageId, fall back toname).matchAppBySegmentin every nav surface:AppContent,AppSidebar,UnifiedSidebar,AppSwitcher,AppHeader,SearchResultsPage,UnpublishedAppBar,useNavigationSync.So
/apps/<packageId>resolves the app with sidebar + header intact, while/apps/<appName>keeps working (the name fallback doubles as a per-tenant alias). Additive / non-breaking — no emitted URL changes.Verified
/apps/com.objectstack.studio→ Studio renders with full sidebar + header;/apps/studio(name) → still renders. setup/account confirmed too.appRoute.test.ts(7). app-shell typecheck clean.Follow-ups (separate, deliberate)
/apps/<packageId>(currently still emit/apps/<name>). Changes visible URLs; verbose-but-transparent per ADR §3.6./apps/:packageId/docs/:name(structural move of DocPage).🤖 Generated with Claude Code