Repository navigation
fix(app-shell): a package's non-first app opens itself from the avatar menu, palette, switcher, Home tiles and report index - #29327
Merged
Conversation
…r menu, palette, switcher, Home tiles and report index The avatar menu's hidden-app entry, the palette's app switch, the app switcher's rows, Home's tiles and the report index's other-apps links linked to an app's package id, which /apps/SEGMENT resolves to the package's FIRST app. They now use appAddressSegment, the app's one address: the package id where it resolves back to the app, else its name. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSQKM1ZF6P3HSnWrEQ
Contributor
Author
|
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m 席位核对 · ACCEPT · 2026-11-02T12:18ZHead-sha:
|
This was referenced Nov 2, 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.
Requested by Steedos · project thread
Fixes #29024
Clause-②: no
Metadata-protocol: none
The two lines are copied from the claim (comment 6575066708) and its amendment (comment 6575119383).
维护者速读
appAddressSegment):包 ID 能回到它本身时用包 ID,否则用应用名。⌘K 面板的「切换应用」、顶栏应用切换器、首页「Your apps」磁贴(含app:launcher块)和空报表索引页的「其他应用」链接同病同治。/apps/包ID总是打开该包的第一个应用。一个与主应用同包的隐藏应用(例如设置类应用)从头像菜单点进去,落到的是主应用,这个隐藏应用从菜单根本到不了(QA QA run · release-18.3.0-w4-c3b1 (36/36) · 7fa9873f · 2026-11-02 · 29 PASS / 0 PARTIAL / 7 FAIL / 0 BLOCKED / 0 NOT-RUN #29002 复现 3 次)。同包的其他非首个应用在上述四处也会被带到第一个应用。HomeAppsStrip新增必填 proprouteApps(内部组件,未导出)。回滚即撤销本 PR。layout/AppHeader.tsx隐藏应用DropdownMenuItem的onClick;console/home/HomeAppsStrip.tsx的routeApps与磁贴to;新测试AppHeader.hiddenAppAddress-29024.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/AppHeader.hiddenAppAddress-29024.test.tsx,预期 4 个用例通过。What changes
layout/AppHeader.tsx): the hidden-app entry navigates to/apps/plusappAddressSegment(metadataApps, app), the app's one address among the metadata app list, instead ofappRouteSegment(app) ?? app.name(its package id).appAddressSegmentis the existing helper inutils/appRoute.tsthatAppContentalready resolves the open app's address with; no new helper.chrome/CommandPalette.tsx: the "Switch app" item handsonAppChangethe app's address among the palette'sapps(the metadata list, hidden apps included).layout/AppSwitcher.tsx: each row handsonAppChangethe app's address among the metadata list.console/home/HomeAppsStrip.tsx: a tile links to the app's address among a new required prop,routeApps, the list/apps/SEGMENTresolves on. The strip only holds the launcher list (hidden apps filtered out), so resolving among the tiles would still misroute a visible app whose package's first app is hidden. Its two callers pass the metadata list:console/home/HomePage.tsxandviews/app-launcher-renderer.tsx(theapp:launcherblock). The prop stays internal; the strip is not exported.views/AppReportIndexView.tsx: the empty index's "Reports in your other apps" links carry the app's address among the metadata list.console/home/AppCard.tsxbuilds the same package-id address for its favourite, but nothing renders it (zero JSX call sites; exported only fromconsole/home/index.ts, which nothing imports, and absent from the package'sexports).Tests
layout/__tests__/AppHeader.hiddenAppAddress-29024.test.tsx, the card's reproduction through the avatar-menu harness ofAppHeader.myOrganizations:com.qa.r6navshipsqsixn_app(first) and hiddenqsixn_hidden_app; the hidden entry navigates to/apps/qsixn_hidden_app. A hidden app alone in its package keeps/apps/com.qa.solo; a hidden app that is its package's first app keeps/apps/com.qa.lead; visible apps are not menu entries.chrome/CommandPalette.packageAppAddress-29024.test.tsx: a package's second app is switched to by name, the first by package id.layout/__tests__/AppSwitcher.packageAppAddress-29024.test.tsx: same, plus a visible app behind its package's hidden first app is switched to by name.console/home/__tests__/HomeAppsStrip.packageAppAddress-29024.test.tsx: tile hrefs for a second app, an app behind a hidden first app, and an app alone in its package.views/__tests__/AppReportIndex.otherAppsAddress-29024.test.tsx: the other-apps links for a package's first and second app.HomeAppsStrip.branding-27386andHomeAppsStrip.tilesAreLinks-12305passrouteApps(their pinned hrefs are unchanged).scripts/ablation-replace.mjs, restored to HEAD's blob,git diff HEADempty): the avatar entry back to the package-id address (app._packageId ?? app.name, whatappRouteSegment(app) ?? app.namecomputes) turns the card's case red (expected/apps/qsixn_hidden_app, received/apps/com.qa.r6nav); the two keep-address cases stay green.Acceptance notes
appRouteSegment(activeApp)(UnifiedSidebarbasePath;nav-menu-rendererbuilds itsbasePaththe same way), so they point at the package's first app. Measured through the realUnifiedSidebar,MetadataProviderand route helpers (jsdom): withcrmandcrm_servicesharingcom.example.crm, insidecrm_serviceits "Cases" entry links to/apps/com.example.crm/crm_case, which openscrm.Verification
Head
fe50df22. The fix is commit0e477fce(based onorigin/main47ee57fe);a5bf2129mergesorigin/main39951d2a(it changedCommandPalette.tsx,HomeAppsStrip.tsxandHomePage.tsxelsewhere; clean) andfe50df22merges5a2bdf9c(none of this PR's files; clean). The branch's delta againstmainis the 15 files above both times. Readings name their head; the final head's are CI's check-runs.Tests
0e477fce: the five new test files plus the two updated strip tests: 8 files (with a throwaway sidebar probe, since deleted), 24 tests passed.0e477fce: every ui test file naming a touched component (git grepfor AppHeader, CommandPalette, AppSwitcher, HomeAppsStrip, HomePage, AppReportIndexView, AppLauncherRenderer): 199 files, 1833 tests passed, in five locked batches at--maxWorkers=2.a5bf2129, after rebuilding the app-shell dependency closure: every app-shell test file naming CommandPalette, HomeAppsStrip or HomePage (the files the merge changed) plus the five new files: 110 files, 938 tests passed.0e477fce: ablation, see Tests.Type-check and gates
turbo run type-check --filter=@object-ui/app-shell(tsc --noEmitandtsc -p tsconfig.test.json): 65 of 65 tasks successful on0e477fceand again ona5bf2129.a5bf2129:node scripts/pm/dispatch-gates.mjs --commandsderived 34 families for this diff; all 34 ran with exit 0,pnpm --dir ui exec vitest run scripts/among them (169 files passed, 2 skipped; 4900 tests passed).--ranreconciled 34 derived, 34 run, 0 NOT-MEASURED. The changeset, ADR-0087 and closing-keyword gates ran against this body.node scripts/check-sdui-manifest.mjs: exit 0 (no registry change).pnpm check:new-line-citations(underui/): 0 new citations.Generated by Claude Code