Skip to content

fix navigation context for direct app routes - #9564

Open
jinyitao123 wants to merge 4 commits into
objectstack-ai:mainfrom
jinyitao123:codex/navigation-route-context
Open

jinyitao123 wants to merge 4 commits into
objectstack-ai:mainfrom
jinyitao123:codex/navigation-route-context

Conversation

@jinyitao123

@jinyitao123 jinyitao123 commented Sep 15, 2026

Copy link
Copy Markdown

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 UnifiedSidebar and AppHeader, 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 as nav.

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.
  • Forge deep link /_console/apps/forge/page/page_output_invoices?verify=iab-sales4 selected 财务, expanded 发票管理, highlighted 销项发票, and removed the generic 页面 breadcrumb in a locally integrated Console build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant