Repository navigation
feat(console): the Audit Log drawer opens the selected row's record page, which lists the other changes to the same record - #30854
Merged
Conversation
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwL8YVfPjy1sSSSEkH
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwL8YVfPjy1sSSSEkH
Contributor
Author
|
domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Contributor
Author
|
domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp 维护者速读
席位核对 — ACCEPT · head b0f67dd
|
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 Tesla · project thread
Fixes #30748
Clause-②: yes (widening) — two new console keys (
console.system.auditLog.openEntryPage,console.system.auditLog.openEntryPageHint) ship in every published@object-ui/i18npack; nothing is narrowed.Metadata-protocol: none
维护者速读
record_id时,按钮下方一句话说明那一页会列出同一记录的全部变更。十种内置语言都有这两句文案。config_change行只有摘要,看不到改成了什么值;值在 CRUD 镜像写的同一设置行的 update 行里。服务端一半(feat(service-settings,plugin-audit,plugin-sharing): config_change rows name their settings row; record pages for audit rows and queues #30728)已经让审计记录页按record_id列出同记录的所有行,但管理员实际看审计的这个页面没有入口通向那一页。ui/apps/console/src/pages/system/AuditLogPage.tsx(抽屉头部新增的链接块与entryPageHref);ui/apps/console/src/pages/system/AuditLogPage.entryPage-30748.test.tsx。pnpm --dir ui exec vitest run apps/console/src/pages/system/AuditLogPage.entryPage-30748.test.tsx,预期 5 条全绿;或在 Setup → 审计日志点开一条设置变更行,点「打开条目页」,记录页下方「同一记录的变更」里能看到镜像的 update 行和新旧值。What changes
Setup → Audit Log (
AuditLogPage.tsx) is a custom page: a row click opens its own drawer, and nothing there reached the row's record page. Since #30728 the platform serves a default record page forsys_audit_log(sys_audit_log_detail,plugin-audit) whose related list holds every ledger row with the samerecord_id. A settings write'sconfig_changerow carries only a digest; the CRUD mirror's rows about the same settings row hold the value, one row down on that page.entryPageHref): the console's record route forsys_audit_logand the selected row's id, under the app segment the page is mounted in (the samelistBase"Open as list" uses,setupwhen none). It is offered on every row with an id: a row about no record still has its own page.state.fromback to this page, labelled by the page title, the shape the Approvals Inbox hands its record links, so the record page's crumb row leads back here in an app whose navigation does not listsys_audit_log.record_id, one muted line under the link says the entry page lists every change to the same record, newest first.@object-ui/i18n:console.system.auditLog.openEntryPageandconsole.system.auditLog.openEntryPageHintin all ten built-in packs. The page header's title now reads from onepageTitleconstant shared with the link state.The card's second option (listing the same-
record_idrows inside the drawer) was not taken: the record page already makes that read through the data API under the ledger's read gate and redaction, and a second list in the drawer would be a copy of it.Tests
ui/apps/console/src/pages/system/AuditLogPage.entryPage-30748.test.tsx(new, 5 tests), through a real router: the page at/apps/:appName/system/audit-logassystemRoutesmounts it, and a probe on/apps/:appName/:objectName/record/:recordId.config_changerow the drawer links to/apps/setup/sys_audit_log/record/ROW_ID(that row's id) and shows the hint;state.from= this page and its title, and the landed row'srecord_idis the one the mirror's update row names;/apps/crm/...);record_idstill links to its own page, without the hint;What this file does not pin, because it lives elsewhere: the page's same-record list (
plugin-auditsys-audit-log-page.test.ts, "the same-record list is the ledger, keyed onrecord_idon both sides, newest first, with no New") and the related list'srelationshipValueFieldread (plugin-detail,record-related-list.relationshipValueFieldUncast-9475.test.tsx).Acceptance notes
config_changerow the drawer reaches the mirror's update row") is held as a chain: this PR pins drawer → the row's record route; the two named tests above pin route page → same-record_idlist. No test here mounts the full record page.i18n-locale-enchunk a few dozen bytes; measured below, headroom stays about 2.9 KB of the 60,000-byte ceiling, ceiling untouched.b85081cd, a WIP commit) carries noClaude-Session/Co-authored-bytrailer pair; the branch is not force-pushable under AGENTS §3, so it stays. Later commits carry the pair.Verification
Readings below were taken on
ee3ec7bb(baseb6182249). Headb0f67ddechanges only the changeset'sClause-②:line; on itcheck-adr-0087-registration,check-changeset-no-major,check-empty-changeset(each--base origin/main),check:changeset-gate-self-testsandcheck-closing-keyword-parityexit 0.Tests
pnpm --dir ui exec vitest run --reporter=verbose apps/console/src/pages/system/AuditLogPage.entryPage-30748.test.tsx: Test Files 1 passed, Tests 5 passed.pnpm --dir ui exec vitest run apps/console/src/pages/system/AuditLogPage apps/console/src/pages/consolePagesLocale-secondPass-13460.test.tsx: Test Files 10 passed (10), Tests 56 passed (56).node scripts/ablation-replace.mjs, the link pointed atlistBaseinstead ofentryPageHref(...)): anchor 1 -> 0, 4 of 5 tests red (the zh leg reads labels only); restored, blob == HEAD,git diff HEADempty.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 36 families for this diff; every one recorded an exit code,--ranreconciliation: "36 derived famil(ies) accounted for — 36 run, 0 NOT-MEASURED". All exit 0, includingnode scripts/check-sdui-manifest.mjs(+--self-test),pnpm check:cross-package-test-inputs,pnpm check:test-source-alias,pnpm check:nul-bytes,pnpm check:published-files, the changeset family (check-adr-0087-registration,check-changeset-no-major,check-empty-changeset,check:changeset-gate-self-tests).pnpm --dir ui exec vitest run scripts/first exited 1: 7 tests incheck-doc-snippet-types.test.tsandspec-symbol-ledger-plugin-detail-7265.test.tsread@objectstack/spec's.d.ts, absent after theOS_SKIP_DTS=1dependency build ("expected 0 to be greater than 1000"). Afterenv -u OS_SKIP_DTS pnpm --filter @objectstack/spec buildthe two files pass: Test Files 2 passed, Tests 129 passed. The rest of the suite: 168 files passed, 4972 tests passed.Not run locally, CI's: console
type-check(needs the full.d.tsbuild of the console closure), the full UI test shards, repo-wide lint.eslinton the two touched console files: 0 errors (2 pre-existingreact-hooks/set-state-in-effectwarnings on the page's load effect).pnpm --dir ui check:new-line-citations: 0 new citations.Eager closure
CI=true vite buildofui/apps/console, thennode ui/scripts/check-eager-closure-budget.mjs, exit 0: "Console eager closure is 2156.2 KB gzipped across 103 of 2412 chunks (budget: 2431.6 KB, headroom: 275.4 KB)"; "chunki18n-locale-en55.7 KB measured / 58.6 KB ceiling (headroom 2.9 KB)". Shared box.