Skip to content

⌘K 记录命中按面板所在应用拼 URL,打开后落在不含该对象的应用(cloud 控制面:从「账户」应用搜到的环境记录在「账户」应用里打开) #28890

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_6eb9ec2e0e3f410b91239dab7a337b9e

立卡门类别:① 已复现缺陷(reach: 界面实测 3/3,见「已实测」)

Reader: domain:ui 车道,ui/packages/app-shell/src/chrome/CommandPalette.tsx。不需要新组件,复用已有的「按对象找应用」解析即可。

Dedupe: repo:objectstack-ai/objectstack is:issue 全局搜索 应用 account 环境 total=0;command palette record app route wrong app total=40,均为无关卡或席位卡;cloud 侧 repo:objectstack-ai/cloud is:issue 全局搜索 total=3(#3122 #2789 #2435,不同题)、搜索 账户 应用 环境 total=2(#3125 #2920,不同题)。

业务理由:用户用 ⌘K 找到一条记录,期望打开后能在该记录所属应用里继续工作。现在记录落在一个没有这个对象的应用里,左栏和应用切换器都是错的,用户只能手动切回正确的应用。

来源

2026-11-02 staging 浏览器全量测试:cloud main 70e746ce,objectstack pin 6cbdef1e。控制面 https://cloud.objectos.app(组织 Release Check 1001,团队版,所有者账号),环境 https://os-2ph4c1.objectos.app(HotCRM 6.0.0)。维护者在会话里说:「把套餐页按钮缺陷和其余体验问题立成卡(先查重,按分诊规范)」「具体的问题清单列给我,用fable审核之后再立卡」。本卡的落点经第二个审核会话按 origin/main 核对过。

已实测(3/3)

  1. 打开控制面「账户」应用的个人资料页 /_console/apps/account/component/account/profile_card。
  2. 点顶栏「搜索…」,输入 Release,结果第一项是「环境 › Release Check 1001」,回车。
  3. 跳到 /_console/apps/account/sys_environment/record/<id>:应用切换器显示「账户」,左栏是账户应用的导航(只有个人资料),不是「云」应用。
  • 对照:在「云」应用首页 /_console/apps/com.objectstack.cloud/page/welcome 搜 Release,结果是「未找到结果」。

落点

  • CommandPalette.tsx:198 baseUrl = /apps/${appName || appRouteSegment(activeApp)};:486 记录命中 leaveTo(\${baseUrl}/${hit.objectName}/record/${hit.recordId}`)`。命中一律挂在面板所在应用下,不看哪个应用列出了这个对象。
  • :290-294 只把当前应用 type:'object' 的导航项作为搜索范围;cloud 的账户应用没有对象导航,于是范围变成全部对象(useRecordSearch.ts:210-226),搜到了 sys_environment,却仍按账户应用拼 URL。
  • cloud 的 account 应用导航只有一个 component(cloud packages/app-cloud/src/account.app.ts:72-92)。

修复方向

记录命中按对象解析目标应用:优先当前应用(若列出了该对象),否则取第一个列出该对象的应用(如 resolveHostAppSegment 一类的现有解析);都没有时再回退到当前应用。

验收

  1. 在账户应用里 ⌘K 打开环境记录,落到列出 sys_environment 的应用(cloud 控制面为「云」应用)。
  2. 当前应用本身列出了该对象时,行为不变。
  3. 单测覆盖「当前应用不含该对象」这一分支。

🤖 Generated with Claude Code

Activity

  1. added
    bugSomething isn't working
    domain:uiDomain lane — seat card indexed by label:pm:seat
    pm:queueReady for the PM dispatch loop
    on Nov 2, 2026
  2. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: p2 (priority added) · 2026-11-02T03:55Z

    ⛔ Not a claim.

    • Read fresh. The coordinator seat filed this as a reproduced ① defect with a measured UI reach and a named file, routed to domain:ui and queued. A user-visible defect with no protocol change: p2. Routing and the pm state are unchanged.

    Generated by Claude Code

  3. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

    Claim: PM loop round 9 · 2026-11-02T04:09Z
    Session: session_01QsR2jTYffwZcQvQX8pCSso (card thread, os-dev); dispatched by seat session session_01QsR2jR7ZFkpqmm4U8S1f9y
    Account: zhuangjianguo
    Branch: claude/project-thread-rs7pqj (platform-assigned to the card thread; it can push only this branch)
    Worktree: objectstack-issue-28890
    Domain: domain:ui
    Seat: domain:ui#4
    File surface: ui/packages/app-shell/src/chrome/CommandPalette.tsx (the record hit's URL), its tests, and a changeset (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate), effort: default
    Clause-②: no
    Metadata-protocol: none
    Responsibility: a ⌘K record hit opens under the palette's current app even when that app does not list the object, so the user lands in the wrong app with the wrong navigation | the console already resolves which app hosts an object for other record links | every user who searches from an app without that object
    Thread-read: 6568670760
    Premise: holds (at origin/main 9a9823d9, CommandPalette.tsx:198 builds baseUrl from the current app and :486 puts every record hit under it)
    Serial constraints cleared: none in flight on this file


    Generated by Claude Code

  4. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 2, 2026
  5. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#4 · zhuangjianguo · session_01QsR2jTYffwZcQvQX8pCSso
    os-dev-report

    {
     "issue": 28890,
     "status": "done",
     "branch": "claude/project-thread-rs7pqj",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/28964",
     "session": "session_01QsR2jTYffwZcQvQX8pCSso",
     "premise_still_valid": true,
     "head": "938ba76b",
     "summary": "A command-palette record hit now opens under the palette's app when that app lists the hit's object, else under the first openable app (filterActiveApps, metadata order) that lists it, addressed by appAddressSegment, else under the palette's app. 'Lists' = a type:object entry naming the object at any depth of navigation or areas[].navigation, among the entries navEntriesShownToMember shows the member under the palette's gates (activityObjectRoster's reading). Two private functions in CommandPalette.tsx; search scope untouched.",
     "files_changed": [
      ".changeset/28890-palette-record-hit-app.md",
      "ui/packages/app-shell/src/chrome/CommandPalette.recordHitApp-28890.test.tsx",
      "ui/packages/app-shell/src/chrome/CommandPalette.tsx"
     ],
     "line_budget": "changed lines 199 at af0d5914 (+198/-1, 3 files) per dispatch-gates; under the 3000 threshold; final head adds a type-only commit of a few lines",
     "tests": "new file CommandPalette.recordHitApp-28890.test.tsx 4/4 passed. All 71 test files naming CommandPalette (git grep -l; 66 ui/packages, 5 ui/apps/console) 609 tests passed at af0d5914; ui/packages/app-shell/src/chrome/ 23 files 144 tests passed at 938ba76b. Ablation via scripts/ablation-replace.mjs (anchor 1->0, blob 225af8a69833 -> 68e4b6b35994, restored == HEAD, git diff HEAD empty): hit base forced to baseUrl reds the 2 branch cases (Received /apps/account/sys_environment_28890/record/E1), 2 controls green. type-check: turbo run type-check --filter=@object-ui/app-shell exit 0 (tsc --noEmit + tsc -p tsconfig.test.json), both re-run on 938ba76b exit 0. eslint touched files: 0 errors, no new warning vs main.",
     "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 34 derived at af0d5914, all 34 exit 0 (incl. check-sdui-manifest + --self-test, changeset gates with the PR body as event, pnpm --dir ui exec vitest run scripts/ 169 passed 2 skipped). --ran reconciliation: 34 run, 0 NOT-MEASURED, 0 UNRUN. Re-run on final head 938ba76b: check-sdui-manifest, check-changeset-no-major, check-empty-changeset, check:nul-bytes, check:type-check-debt, check:type-check-coverage, check:undeclared-dep-imports all exit 0. PR-body gates before pr_create: check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity, check-partof-closing-keyword exit 0. CI check-runs: in_progress at report time.",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "3 — mcp__github__issue_read (get, get_comments x2); no MCP write",
     "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft, no labels, no assignees; read-back identical 6223 bytes) and this os-dev-report comment via post-stamped; plus 3 git pushes (not REST)",
     "deviations": [
      "Ruling said reuse the console's existing object-to-app resolution: none exists on main at 9a9823d9. resolveHostAppSegment takes no object; every other record-link producer uses the current app or resolveHostAppSegment. The fix composes filterActiveApps, appAddressSegment, navEntriesShownToMember and navigationNames; only the private 'app lists object' predicate is new, inside CommandPalette.tsx (file surface held).",
      "Derived gate sweep ran on af0d5914; main merge (2 commits, dogfood test + plugin-detail RelatedList, no overlap) and a type-only commit followed; key gates, chrome tests and type-check re-run on 938ba76b, not the full 34.",
      "Session context asked to assign and request review from the user after pr_create; the brief and os-dev.md forbid it, so the PR carries no assignee and no reviewer.",
      "PR body opens with the harness attribution HTML comment line, kept verbatim and reported."
     ],
     "open_questions": [],
     "out_of_scope_findings": [
      "carrier: none · noted in PR Acceptance notes: the search scope of an app with no object navigation (all objects) is left as ruled"
     ]
    }
  6. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

    ACCEPT · 2026-11-02T05:14Z · PR #28964 at 938ba76b, record 6569636825. Ordinary queue landing follows.


    Generated by Claude Code

  7. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

    Landed · 2026-11-02T05:28Z · PR #28964 merged through the merge queue as fed3a51b. Record: ACCEPT 6569636825 at 938ba76b.

    probe before (fed3a51b~1) now (origin/main)
    function recordHitAppSegment in app-shell/src/chrome/CommandPalette.tsx 0 1
    a record hit's link built on recordHitBaseUrl(hit.objectName) 0 1
    a record hit's link built on the palette's own ${baseUrl} 1 0

    The card closed through Fixes. pm:dispatched comes off with this note. Unchanged, as ruled: an app with no object navigation still searches every object from the palette.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdomain:uiDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions