Skip to content

删除记录后,命令面板「最近访问」仍列出该记录 #33826

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_0b694aec78a6416c9b4b75ecd4ac7112

Filing gate: ① 用户可见的体验缺陷,reach: 界面实测一次。

来源

2026-11-15 staging 浏览器全量测试(cloud 部署 c4153027,objectstack pin 181ad7d4),环境 os-6hf1jq(Jack,免费版,HotCRM 6.1.2)。报告:https://claude.ai/artifact/XaMk7Uo36seWMKsPy5ETPM

复现

  1. HotCRM → 客户 → 新建「浏览器测试公司-1115」→ 打开记录 → 更多 → 删除 → 确认(提示「已删除」并可撤销)。
  2. 立即按顶部搜索(⌘K)打开命令面板。
  3. 「最近访问」第一条仍是「浏览器测试公司-1115 · 客户」。

业务理由

用户点进去会落到一条不存在的记录;最近访问越用越不可信。

修复方向

删除成功后把该记录从最近访问(objectui-recent-items:* 本地存储与服务端的同类列表)移除;打开最近访问项时若记录已不存在,静默剔除。Studio 首页同类问题已在 objectstack#32615 / #32724 修过,可复用思路。

验收

  1. 删除记录后,命令面板与环境首页「最近访问」都不再出现它。
  2. 撤销删除后可重新出现。

Reader

objectstack console 车道(domain:ui)。

Dedupe

Activity

  1. added
    bug
    domain:ui
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p3 · 2026-11-15T12:59Z

    ⛔ Not a claim.

    A deleted record stays in the palette's recents. p3.

  3. added
    pm:queue
    on Nov 15, 2026
  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Claim: PM loop round 2 · 2026-11-15T18:33Z
    Session: session_01ADHkmTS7jKcrSq1mgNofuy (card thread, dev) · seat session_01ADHkmSzhXR4yUAgwq1bQRi
    Account: os-steve (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-u5sd7i
    Worktree: objectstack-issue-33826
    Domain: domain:ui
    Seat: domain:ui#2
    File surface: ui/packages/app-shell/src/context/RecentItemsProvider.tsx and the record-delete success path that calls it (named in the report), their tests, root .changeset/; CommandPalette.tsx only if the palette itself must change; ⛔ not RecordDetailView.tsx / recordSaveEcho.ts while seat 1's #33827 (PR #33983) is open (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default judgement tier (dispatch-gates --tier: "no path-derived mandate: the surface hits none of the 4 declared glob(s)"), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: ui/packages/app-shell recents store (objectstack) | none | every Console user who deletes a record and then opens ⌘K or the home recents
    Thread-read: 6894686161
    Premise: holds
    Serial constraints cleared: #33863 (same palette file) closed not_planned 16:23Z; seat 1 #33827 (PR #33983) fenced off; no other open PR touches RecentItemsProvider.tsx (read 18:33Z)

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmTS7jKcrSq1mgNofuy
    os-dev-report

    {
      "issue": 33826,
      "status": "done",
      "branch": "claude/project-thread-u5sd7i",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34108",
      "session": "session_01ADHkmTS7jKcrSq1mgNofuy",
      "premise_still_valid": true,
      "summary": "Premise held on origin/main 63db7240: nothing removed a record entry from the recents on delete (the provider's removeRecentItem had one caller, the Studio package delete). New module-internal hook useDropDeletedRecordsFromRecents subscribes to the data source's onMutation and, on a delete event naming resource and id, calls the existing removeRecentItem('record:OBJECT:ID'); ConnectedShellInner mounts it once (DeletedRecordsLeaveRecents) on the connected adapter, so the palette, Home and sidebar (all under ConsoleShell's RecentItemsProvider) read the trimmed list, localStorage and the ui.recent save. Undo: the record page's Undo navigates back to the restored record and that visit re-adds it via the existing addRecentItem effect. No public surface change (useRecentItems value and package exports unchanged).",
      "tests": "head a6cbed12: pnpm --dir ui exec vitest run (RecentItemsProvider.test.tsx + ConnectedShell.deletedRecordLeavesRecents-33826.test.tsx): Test Files 2 passed (2), Tests 28 passed (28), lock VERDICT command-exit 0. Ablation 1 (ablation-replace, anchor 1->0, restored blob == HEAD): mount removed from ConsoleShell.tsx -> shell pin Tests 2 failed (2). Ablation 2: hook's removeRecentItem call no-op'd -> 3 failed / 25 passed (28); restored, git diff HEAD empty. ui vitest resolves @object-ui/* to src via ui/vitest.config.mts aliases, so no build between legs.",
      "gates": "head a6cbed12: dispatch-gates --commands = 37 commands, all exit 0; --ran: 37 derived, 37 run, 0 NOT-MEASURED, 0 UNRUN. Extra: turbo build @object-ui/app-shell^... exit 0; pnpm --filter @object-ui/app-shell type-check (tsc --noEmit + tsc -p tsconfig.test.json) VERDICT command-exit 0; ui check:new-line-citations 0 new; eslint on the 4 changed ui files 0 errors (warnings only, same classes as existing lines). CI families: PR #34108 check-runs in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "line_budget": "297 changed lines (296 additions, 1 deletion) over 5 files; src 2 files ~50 lines, tests ~230, changeset 10",
      "files_changed": [
        ".changeset/33826-deleted-record-leaves-recents.md",
        "ui/packages/app-shell/src/console/ConsoleShell.tsx",
        "ui/packages/app-shell/src/console/__tests__/ConnectedShell.deletedRecordLeavesRecents-33826.test.tsx",
        "ui/packages/app-shell/src/context/RecentItemsProvider.tsx",
        "ui/packages/app-shell/src/context/__tests__/RecentItemsProvider.test.tsx"
      ],
      "deviations": [
        "ConsoleShell.tsx is outside the claim's two named files: it is the one mount of the delete seam (the claim's 'record-delete success path that calls it, named in the report'); RecordDetailView.tsx and CommandPalette.tsx untouched.",
        "New shell-mount pin is a new file (ConnectedShell.*-33826.test.tsx): ConnectedShell has no single shared harness file; the provider-level pins went into the shared RecentItemsProvider.test.tsx as one top-level describe."
      ],
      "mcp_calls": "0 — no mcp__github__ calls",
      "api_writes": "2 — fleet relay pr_create (objectstack-ai/objectstack#34108, draft, assignees os-steve); post-stamped os-dev-report comment on #33826. (git push to claude/project-thread-u5sd7i is not a REST write.)",
      "open_questions": [
        {
          "question": "Bulk deletes emit one id-less resource-level delete, so their records stay in the recents. Close it?",
          "options": [
            "A: separate card widening DataSourceMutationEvent with the deleted ids (types + data-objectstack bulkDelete/bulk) and let this hook drop each",
            "B: leave it; entries drop when opened (needs the 404 path in C)",
            "C: separate card on the record page: a recent whose record answers not-found is dropped silently (RecordDetailView.tsx, fenced off on this card)"
          ],
          "recommendation": "C first (covers deletes by other sessions too), A only if bulk-delete users report it"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat · noted, not filed — bulk delete leaves its records in the recents (id-less mutation event); records deleted in another session stay listed until opened. Both in PR #34108 Acceptance notes. dedupe words: recent items bulk delete, recents deleted elsewhere, recent record not found"
      ]
    }

    Stamped 2026-11-15T19:17Z.


    Generated by Claude Code

  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    File surface amendment · 2026-11-15T19:37Z
    The delete door turned out to be the data source's onMutation event rather than a per-door call, so the single mount point joins the surface: ui/packages/app-shell/src/console/ConsoleShell.tsx (mounts DeletedRecordsLeaveRecents once) and its pin ui/packages/app-shell/src/console/__tests__/ConnectedShell.deletedRecordLeavesRecents-33826.test.tsx. RecordDetailView.tsx / recordSaveEcho.ts stay untouched (seat 1's #33827 fence holds).

  8. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    席位核对 ACCEPT 已发在 PR #34108(head a6cbed1,评论 6900134396),已转 ready 并开启自动合并 · 2026-11-15T19:39Z

  9. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Landed · 2026-11-15T23:10Z

    reading value
    PR #34108 MERGED as c1c86a3a on main (Fixes #33826)
    card closed

    State: pm:dispatched removed, assignee cleared.

  10. removed
    pm:dispatched
    on Nov 15, 2026
  11. added a commit that references this issue on Nov 16, 2026
    c1c86a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdomain:uipriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions