feat(console): resolve post-login landing from app metadata, not a hardcode#2027
Merged
Conversation
…rdcode Replace CloudAwareRootRedirect's hardcoded PREFERRED_APPS=['cloud_control'] with RootLandingRedirect, resolving the landing from app metadata: the isDefault app (its homePageId picks the page) → else the single visible app → else /home. This gives isDefault routing semantics (was a display-only badge) and removes the cloud-specific bake-in, so any product declares its landing in source rather than forking the Console. Pure resolveLandingPath() extracted + unit-tested (7 cases). Back-compat: no isDefault app + ≥2 visible apps still lands on /home; cloud is unaffected (cloud_control already isDefault). The landing is a build-time product decision in metadata, not a runtime Settings-UI preference. Co-Authored-By: Claude Opus 4.8 <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 root route (
/) resolved the post-login landing via a hardcodedPREFERRED_APPS = ['cloud_control']inCloudAwareRootRedirect— baking one product's policy (cloud) into the shared Console, with no supported way for a deployment to opt out of the/homelauncher or land somewhere custom without forking the SPA.This replaces it with
RootLandingRedirect, resolving the landing purely from app metadata via a pure, unit-testedresolveLandingPath:isDefault: true→/apps/<it>— and that app's ownhomePageIdthen selects the landing page within it;active !== false && hidden !== true) → that app (a one-app deployment shouldn't show a one-tile launcher);/home— the multi-app workspace launcher (the legacy default, unchanged).Contract change (the durable note)
isDefaultgains routing semantics — it was previously a display-only badge (AppCard). A product/ISV now declares its landing in metadata/source at build time (mark the appisDefault, set itshomePageId), rather than via a runtime Settings-UI preference. This is deliberately not a per-tenant runtime setting.Back-compat
isDefaultapp + ≥2 visible apps → still/home, byte-for-byte today's behavior.cloud_controlis alreadyisDefault: true, so it still lands there — minus the hardcode. (Cloud will drop its reliance on the hardcode and can pointcloud_control.homePageIdat a custom landing page.)isDefaultpurely for the badge and has exactly one such app will now land on it.Tests
resolveLandingPathunit-tested (7 cases: isDefault wins, single-visible-app, multi-app→/home, hidden/inactive excluded, empty/null, unnamed entries). Full@object-ui/consolesuite green (4677 passed).🤖 Generated with Claude Code