Repository navigation
fix(app-shell): a tracked record's field-change history shows again on a record page with no declared page - #29917
Merged
Conversation
…ked object Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUeSi3TcT4sErYm6GQ
…og for a tracked object Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUeSi3TcT4sErYm6GQ
…ld changes Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUeSi3TcT4sErYm6GQ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUeSi3TcT4sErYm6GQ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUeSi3TcT4sErYm6GQ
Contributor
Author
|
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m 席位核对 · ACCEPT · 2026-11-03T12:02ZHead-sha:
|
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 Steedos · project thread
Fixes #29878
Clause-②: no
Metadata-protocol: none
维护者速读
trackHistory的对象的字段变更历史。记录路由按名读取sys_audit_log,并在首屏渲染前等它返回。sys_audit_log。于是记录页的「变更」筛选只剩活动摘要,用户会以为没人改过记录;同一条记录在抽屉里仍能看到变更。这是 18.3.0 的回归。trackHistory时请求不变;有的话多一次小的按名元数据读取,首屏要等它。读取被拒、不存在或失败时历史保持关闭,页面照常渲染,不会退回读整份注册表。回滚就是 revert 本 PR。ui/packages/app-shell/src/console/appObjectScope.ts的readObjectRouteNames末尾(新增的streamRead等待)和recordStreamObjectNames;再看AppContent.packagelessRecordRelated-29552.test.tsx末尾新增的 describe。cd ui && pnpm exec vitest run packages/app-shell/src/console/__tests__/AppContent.packagelessRecordRelated-29552.test.tsx,预期 23 个用例全绿;新增的 6 个用例在 main 上有 4 个是红的。What changes
ui/packages/app-shell/src/console/appObjectScope.tssynthesizedRecordPage. InreadObjectRouteNames, once the route object's definition is in hand and it declaresenable.trackHistory === true,sys_audit_logis asked by name (views: false) through the same scope as the lookup targets, and the route'sreadywaits on it (routeReadDone). The route'sfailedNamesandrouteObjectRefusalstill read the route's own object only..../__tests__/AppContent.packagelessRecordRelated-29552.test.tsxMetadataProviderunder the realAppContent). The harness gains arefusemap for by-name reads and records the objects each record-view render is handed..../views/RecordDetailView.timelineCount-28737.test.tsxtimelineasksfieldChanges: truefor a tracked object whensys_audit_logis in the objects, with a CONTROL that asksfalsewithout it.boot()takes the objects..changeset/29878-record-route-field-history.md@object-ui/app-shellpatch.Only
sys_audit_logwas missing. The step-1 census of every record-page reader that looks an object up by name in the scoped list found no other:resolveFeedWriteGatesgives the same verdict forsys_commentandsys_comment_reactionwhether the schema is present or absent (both aremanagedBy: 'platform', the absent default). The reaction store's presence uses its own by-name read. Lookup targets, inbound objects and cascade labels are already in the scope.A declared record page never held
sys_audit_log, and that is not a gap: an assigned page has no history consumer.pageColumnsEligible = !assignedPagegates thetimelineask, and the audit read needs!assignedPage.Tests
a tracked object's record route asks sys_audit_log by name (objectstack#29878):sys_audit_log, the object calls are exactly the package list (packaged) plusobject/sys_userandobject/sys_audit_log, there is noobject(registry) call, and the related lists keep the registry's set and order.trackHistoryasks nothing more.PERMISSION_DENIED) and an absent object (404) keep it out of the objects and still draw the page, with no registry read.appObjectScope.ts(00f72f94): 4 failed / 25 passed (29), across both files.recordStreamObjectNamesreturns[]): 4 failed / 19 passed. Restored blob7f44431a,git diff HEADempty.readywithoutrouteReadDone(streamRead)): both first-render cases red (2 failed / 21 passed). This proves the pin holds the wait, not only the ask.Per-PR pin, not the live spec:
ui/e2e/live/record-history-display.spec.tsstays ontest:e2e:live:nightly. Moving it to:ciwould add a live backend to every PR for a contract the unit pin above holds in Test UI (gates are added only when named by a maintainer).Acceptance notes
page,app,object?package=app.crm,object/sys_user. First render: the route object plus the related objects;sys_user(a lookup target) lands later.object/sys_audit_log, sent in the same render as thesys_userlookup ask, after the package list and the route object answer. First render waits on the package list, the route and related names, and thesys_audit_loganswer. That is one extra by-name round trip, in parallel with the lookup target, and only for a tracked object.589049b0names the route, and the harness reproduces it.Verification
Local gate union at
f8dab480(see the report comment on #29878).Generated by Claude Code