fix navigation context for direct app routes - #9564
Open
jinyitao123 wants to merge 4 commits into
Open
jinyitao123 wants to merge 4 commits into
jinyitao123 wants to merge 4 commits into
Conversation
This was referenced Sep 15, 2026
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.
Directly opening or refreshing a page inside an app with navigation areas left the first area selected and produced a generic
页面breadcrumb, even when metadata placed the route under another area's nested item.This change resolves one shared navigation trail from the current pathname and query parameters, uses it in both
UnifiedSidebarandAppHeader, and preserves authored query parameters for routes that intentionally share one page. A direct URL without navigation parameters now infers its context only when exactly one menu item owns that pathname; ambiguous shared routes continue to require a qualifier such asnav.Validation:
pnpm exec vitest run packages/layout/src/__tests__/resolveHref.test.ts packages/app-shell/src/utils/navigationContext.test.ts packages/app-shell/src/layout/__tests__/UnifiedSidebar.derivedAreaVisibility.test.tsx— 45 tests passed.pnpm --filter @object-ui/console build— passed./_console/apps/forge/page/page_output_invoices?verify=iab-sales4selected财务, expanded发票管理, highlighted销项发票, and removed the generic页面breadcrumb in a locally integrated Console build.