Repository navigation
fix(console): a record page leaves out related lists and rail entries of an object the install does not hold - #27180
Merged
Conversation
… of an object the install does not hold Claude-Session: https://claude.ai/code/session_01JQwxbaQJGyCfqGqBduLgbq Co-authored-by: Claude <noreply@anthropic.com>
…d object Claude-Session: https://claude.ai/code/session_01JQwxbaQJGyCfqGqBduLgbq Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对ACCEPT · seat 席位意见:记录页上作者放的相关列表块或引用栏条目,如果绑定的对象在本安装里不存在(模块未装,ADR-0141),原先照样画出来,显示人性化的原始名("Crm Quote 0 — No related records found")并请求 404。现在按
|
This was referenced Oct 28, 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 Warren · project thread
Fixes #26988
Clause-②: no
Metadata-protocol: none
维护者速读
/meta/object、/data请求。requiresObject同一规则;回滚即撤掉RecordDetailView.tsx里两处pruneUnregisteredRecordPageObjects调用。recordPageChildObjects.ts(裁剪函数)、RecordDetailView.tsx(assignedPage/assignedSlots两个 memo)、新测试文件。pnpm --dir ui exec vitest run packages/app-shell/src/views/RecordDetailView.unregisteredObjectLists-26988.test.tsx,预期 2 个用例通过。What changes
recordPageChildObjects.tsgainspruneUnregisteredRecordPageObjects(page, registered). It reads the same two arms asrecordPageChildObjects(now shared helpers): arecord:related_listblock whoseproperties.objectNameordataSource.objectnames an object the registered list does not hold is removed; arecord:reference_railentry whoseobjectNamedoes is removed, and a rail left with no entries goes with it. Only a string names an object. While the registered list is empty it returns the page untouched (the deferralDashboardViewmakes), and it is identity-preserving: a page or subtree with nothing to leave out is returned itself.RecordDetailViewprunes the authored page and a slotted page's slots right whereassignedPage/assignedSlotsare resolved, so the effective page, the synthesized page, the composed page and the history page all read one pruned page.objectsprop, the listderiveRelatedListsalready reads. It is notuseMetadata().objects: that getter loads the whole registry, which the scoped record route (objectui#13046) exists to avoid. On that routeobjectsis the scope: the package's objects plus every object the page binds, each asked by name.deriveRelatedLists) were already safe: they come from the registered objects only.Tests
RecordDetailView.unregisteredObjectLists-26988.test.tsxuses the real page. It has a related list bound byobjectName, one bound bydataSource.object, and a rail entry, all three for absent objects, beside a registered contact list and rail entry.fetchURL names any of the three objects. The contact list and rail entry still draw and read.recordPageChildObjects.test.ts: pins what is left out and what is kept, the deferral (an empty set prunes nothing), identity preservation, that the authored page is never mutated, and that non-string names are kept.scripts/ablation-replace.mjsreplaced the guard lineif (registered.size === 0) return page;with an unconditionalreturn page;. The absent-arm test went red (expected '…' not to contain 'Crm Quote') and the present arm stayed green. The tool restored the file (blob == HEAD,git diff HEADempty).Acceptance notes
/meta/object/NAMEonce for each name the page binds, absent ones included. That read is how the console learns the object is absent; it is the one existence check, and this PR adds none. Everything the page itself asked (each block's schema read and/dataread) is gone.record:line_items(childObject) is not pruned. It is outside this card's two arms.Verification
Gate readings and the head they were taken on are in the os-dev report comment on #26988.
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (Local: eslint on the four changed files, 0 errors; the repo-wide run is CI's.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.@object-ui/app-shellisprivate: trueand nothing else changed, so this PR takesskip-changeset.Generated by Claude Code