Repository navigation
fix(console): Home's Recently Accessed leaves out a row whose object is not registered, and never asks it by name - #35368
Conversation
…red, and never ask it by name Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
…ith its query Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
…ds pin Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
|
repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd 2026-11-19T07:34Z Final head for review: Since the PR opened (os-dev-report deltas 7002049418, 7002480861 on #34692):
|
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
|
repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd 2026-11-19T08:07Z Landing PR #35368 (card #34692) at head
State: ready + auto-merge armed by area pkg-2. On MERGED the area closes #34692 and clears its labels. |
Requested by Bill · project thread
Fixes #34692
Clause-②: no
Metadata-protocol: none
维护者速读
/meta/object/NAME(此前每次进首页一次 404);首页改为用一次?names=批量读确认这些对象是否还在。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
HomePage.tsxgainsreadRecentObjects(metadata, names): what Home may do with the object a recent row names,read/unread/absent.GET /meta/object?names=presence read throughreadObjectPresence(console/appObjectScope.ts, the helper the navigation, thenav:menublock and the record route share). A name the read answered served isread, a name it left out isabsent, a name not answered yet (or whose read failed) isunread.objectPresence(hooks/useObjectPresence.ts) answers from that list; only a list that answered and holds other objects can sayabsent.recentAppsdropsabsentrows BEFORE taking the six, so a dropped row holds no place.unreadrow is drawn and nothing is asked by name for it:describeRecentreturns the object's bundle label (else its name) as a record's context and no icon;labelRecentgives an object or list-view row its object's bundle plural label (else its name), a record row its stored title. This is 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 deferral (an entry its list has not answered is drawn) plusservedByName's rule (a name joins the by-name scope once the presence read answered it served).pruneUnregisteredRecordPageObjects,DashboardView's widget filter, the navigation gate) all remove the entry, so this follows them.Tests
ui/packages/app-shell/src/console/home/__tests__/HomePage.recentDisabledPackage-34692.test.tsx(realHomePage+ realMetadataProviderover a fake adapter that serves only the enabled packages' objects and answers 404 by name for a disabled one):object?names=crm_account,pm_projectandobject/crm_account(CONTROL: the served object's row still draws with its icon);scripts/ablation-replace.mjs, anchor 1 to 0, blob3e5623c964c7to21043f3e6b70, restored to the HEAD blob withgit diff HEADempty):readRecentObjects's presence branch replaced by an always-readanswer turns all 4 cases red.Readings
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 areHomePage.recentObjectReads-29121.test.tsx; see Acceptance notes.20ff7c49:pnpm --filter @object-ui/app-shell type-check(bothtsc --noEmitandtsc -p tsconfig.test.json): VERDICT command-exit 0.fbbb05a6(adds only the module-topimport '@objectstack/lint'to the new pin, whichcheck:test-source-aliasasked for):pnpm check:test-source-aliasexit 0.Acceptance notes
HomePage.recentObjectReads-29121.test.tsx's fake adapter recorded the new?names=presence read under the bareobjectspelling (the whole-list read). Its area widened this card's file surface to that file, fixture only: the fake now records anamesread with its query and filters bynames, 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-topimport '@objectstack/lint'thatcheck:test-source-aliasasks of an edited test,bf43e6ed). It passes.perm-home-namespace-3546.test.tsxpinsHomePage.tsx's literaluseObjectTranslationimport line;useObjectLabelis imported on its own line so that line stays as pinned (e847ae4c).origin/mainatbe42dd0e; at that head the two Home pins plusperm-home-namespace-3546pass (Test Files 3 passed (3), Tests 43 passed (43)).Verification
node scripts/pm/dispatch-gates.mjs --commandsat03d658a6: all 37 run, all exit 0 exceptcheck:test-source-alias(red on the new pin, fixed atfbbb05a6, then exit 0).check:type-check-debtfirst answered PREREQUISITE NOT MET (lock); re-run under the lock atfbbb05a6:--re-measure: OK, VERDICT command-exit 0.pnpm --dir ui exec vitest run scripts/atfbbb05a6: Test Files 171 passed, 2 skipped (173).🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd