Skip to content

fix(console): Home's Recently Accessed leaves out a row whose object is not registered, and never asks it by name - #35368

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-34692-home-recents-disabled-package
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-34692-home-recents-disabled-package

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #34692

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:首页「最近访问」里,对象所在的包已被停用的行(记录、对象、列表视图)不再显示,也不再为它按名请求 /meta/object/NAME(此前每次进首页一次 404);首页改为用一次 ?names= 批量读确认这些对象是否还在。
  • 为什么改:与 Record page: a related list or rail entry bound to an object that is not installed draws a humanized raw name ("Crm Quote 0 — No related records found", "+3 empty (Crm Quote · …)") #26988 在记录页相关列表、仪表盘 requiresObject、导航 requiresObject 上的规则一致:注册对象列表里没有的对象,不画、不问。
  • 风险与回滚:只改界面。首页有对象类最近行时多一次 GET /meta/object?names=… 批量读;批量读回来之前,这些行照常显示(记录标题、类型图标),只是暂不按名读对象。回滚即 revert 本 PR。
  • 先看:① ui/packages/app-shell/src/console/home/HomePage.tsx 的 readRecentObjects(谁算不在、何时不读);② 同文件 recentApps 一段(先剔除再取前六条);③ describeRecent / labelRecent 里 unread 分支(未答复时不发按名读)。
  • 两分钟验证:cd ui && pnpm exec vitest run packages/app-shell/src/console/home/__tests__/HomePage.recentDisabledPackage-34692.test.tsx,预期 4 个用例全绿。
  • 需要你做的:无,席位落地。

What changes

Tests

  • New pin ui/packages/app-shell/src/console/home/__tests__/HomePage.recentDisabledPackage-34692.test.tsx (real HomePage + real MetadataProvider over a fake adapter that serves only the enabled packages' objects and answers 404 by name for a disabled one):
    1. a record visited while its package was enabled draws with its icon; after the package is disabled it is not drawn, and the only object reads are object?names=crm_account,pm_project and object/crm_account (CONTROL: the served object's row still draws with its icon);
    2. object and list-view rows of the disabled package are left out too, with no by-name read for it;
    3. a left-out row holds no place among the six;
    4. while the presence read is held unanswered, the row is drawn with the kind's icon and nothing is asked by name; once it answers, the row goes and still nothing is asked by name.
  • Ablation (committed fix first; mutation through scripts/ablation-replace.mjs, anchor 1 to 0, blob 3e5623c964c7 to 21043f3e6b70, restored to the HEAD blob with git diff HEAD empty): readRecentObjects's presence branch replaced by an always-read answer turns all 4 cases red.
Readings
  • Head 20ff7c49: cd ui && pnpm exec vitest run packages/app-shell/src/console/home: Test Files 1 failed, 40 passed (41); Tests 2 failed, 251 passed (253). The 2 reds are HomePage.recentObjectReads-29121.test.tsx; see Acceptance notes.
  • Head 20ff7c49: pnpm --filter @object-ui/app-shell type-check (both tsc --noEmit and tsc -p tsconfig.test.json): VERDICT command-exit 0.
  • Head fbbb05a6 (adds only the module-top import '@objectstack/lint' to the new pin, which check:test-source-alias asked for): pnpm check:test-source-alias exit 0.

Acceptance notes

  • The 29121 pin, fixed on this branch: HomePage.recentObjectReads-29121.test.tsx's fake adapter recorded the new ?names= presence read under the bare object spelling (the whole-list read). Its area widened this card's file surface to that file, fixture only: the fake now records a names read with its query and filters by names, and the two exact read sets each gain the one presence read (object?names=crm_account,crm_contact / object?names=crm_account,crm_lead); no assertion was removed or weakened (baa81840, plus the module-top import '@objectstack/lint' that check:test-source-alias asks of an edited test, bf43e6ed). It passes.
  • perm-home-namespace-3546.test.tsx pins HomePage.tsx's literal useObjectTranslation import line; useObjectLabel is imported on its own line so that line stays as pinned (e847ae4c).
  • Merged origin/main at be42dd0e; at that head the two Home pins plus perm-home-namespace-3546 pass (Test Files 3 passed (3), Tests 43 passed (43)).
  • One extra request on Home when recent rows name objects: the batched presence read. Served objects are still read by name afterwards for their icon and label, as before.

Verification

  • Local gate subset derived by node scripts/pm/dispatch-gates.mjs --commands at 03d658a6: all 37 run, all exit 0 except check:test-source-alias (red on the new pin, fixed at fbbb05a6, then exit 0). check:type-check-debt first answered PREREQUISITE NOT MET (lock); re-run under the lock at fbbb05a6: --re-measure: OK, VERDICT command-exit 0. pnpm --dir ui exec vitest run scripts/ at fbbb05a6: Test Files 171 passed, 2 skipped (173).
  • Every other family: CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd

2026-11-19T07:34Z Final head for review: e847ae4c7790d16aa0a150b6f21cf926986616a3. CI on this head: 39 success, 13 skipped, 0 failed. Clause-②: no · Metadata-protocol: none. L1 requested from L1-a.

Since the PR opened (os-dev-report deltas 7002049418, 7002480861 on #34692):

  • The fence was widened by the area to HomePage.recentObjectReads-29121.test.tsx: its fake adapter now records the ?names= presence read with its query; no assertion removed or weakened. The body's Acceptance note about that pin failing is stale: it passes at this head.
  • Test UI (1/16) was red at bf43e6ed because perm-home-namespace-3546.test.tsx checks the literal useObjectTranslation import line in HomePage.tsx; e847ae4c puts useObjectLabel on its own import line. Behaviour unchanged.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:首页“最近访问”不再显示已停用应用包里的记录、对象或视图;空出来的位置由其他最近访问项补上。
  • 为什么做:以前这些行点进去是打不开的页面,而且首页每次打开都会为它们发出报错请求。
  • 出错会怎样:最坏情况是这类行又出现在首页,和修之前一样;其他最近访问项的显示不受影响。
  • 要你做什么:不需要你做任何事,区域审完自己落地。

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head e847ae4c7790d16aa0a150b6f21cf926986616a3 · 2026-11-19T07:37Z

  • 形态 — 4 files, +395/−15: app-shell/src/console/home/HomePage.tsx, the new card pin, the 29121 pin, and one changeset. check-governed-merges.mjs --pr 35368: not governed, under the 3000-line limit. Clause-②: no, Metadata-protocol: none. RecentObjectReading / readRecentObjects are exported from the HomePage module, but @object-ui/app-shell's entry does not export them.
  • Fixes vs card console Home: "Recently accessed" keeps a record row whose object's package is disabled, and fetches /meta/object/<name> for its icon (404) #34692 — readRecentObjects(metadata, names):
  • Changeset — @object-ui/app-shell patch, read sentence by sentence against the diff: the stale row, the per-render 404, the one ?names= read, "takes no place among the six", the unread/failed drawing with nothing asked by name, the loaded-registry path, and the Record page: a related list or rail entry bound to an object that is not installed draws a humanized raw name ("Crm Quote 0 — No related records found", "+3 empty (Crm Quote · …)") #26988 family all match.
  • Pins — HomePage.recentDisabledPackage-34692.test.tsx:
    • a record row is drawn while enabled, then is neither drawn nor asked by name once the package is disabled;
    • object and list-view rows of the disabled package are left out;
    • a left-out row holds no place among the six;
    • while the presence read is unanswered, the row is drawn and nothing is asked by name.
  • Fence widening (29121 pin): accepted. The fixture's getItems double learns names. Both by-name assertions keep their exact by-name reads and add the one object?names= read the new path makes, so no assertion is weakened. The import '@objectstack/lint' at collection moves a first-load cost out of a clocked waitFor; it is test-only. Nit: the PR body's Acceptance note that says this pin fails is stale; correct it with the next push.
  • 门禁 — 52 check-runs on this head: 39 success, 13 skipped, 0 failure.
  • 接受的偏差 — only the fence widening above.
  • 范围外去向 — none found.
  • 落地条款 — not governed. Base 81c09477; main has moved K=19 first-parent commits (≥ 15), so merge main and wait for a green re-run before queueing. git merge-tree against current main is clean, and main has not touched HomePage.tsx, useObjectPresence or appObjectScope since the base. This ACCEPT carries over to that head if it brings nothing beyond main and the PR-body nit. pkg-2 lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd

2026-11-19T08:07Z Landing PR #35368 (card #34692) at head be42dd0e499f67c003170bf2be5bbbdb416d6e8b. L1-a ACCEPT 7002876888 (at e847ae4c, carries: this head adds only a clean merge of main and the PR-body nit fix).

Probe Reading
Check-runs on be42dd0e 41 success, 15 skipped, 0 failure
check-governed-merges.mjs --pr 35368 NOT governed; 410 changed lines ≤ 3000

State: ready + auto-merge armed by area pkg-2. On MERGED the area closes #34692 and clears its labels.

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

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console Home: "Recently accessed" keeps a record row whose object's package is disabled, and fetches /meta/object/<name> for its icon (404)

2 participants