Skip to content

feat(console): the Audit Log drawer opens the selected row's record page, which lists the other changes to the same record - #30854

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-rww6gn
Nov 6, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-rww6gn

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

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/i18n pack; nothing is narrowed.
Metadata-protocol: none

维护者速读

  • 改了什么:Setup → 审计日志的详情抽屉里加了一个「打开条目页」按钮,点开就是这条审计行自己的记录页;行上带 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 列出同记录的所有行,但管理员实际看审计的这个页面没有入口通向那一页。
  • 风险与回滚:只加一个链接和两条文案,不改任何读取;记录页本身和它的读权限、脱敏都是服务端既有的。回滚即 revert 本 PR。
  • 先看: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 for sys_audit_log (sys_audit_log_detail, plugin-audit) whose related list holds every ledger row with the same record_id. A settings write's config_change row carries only a digest; the CRUD mirror's rows about the same settings row hold the value, one row down on that page.

  • The drawer header gains an Open entry page link (entryPageHref): the console's record route for sys_audit_log and the selected row's id, under the app segment the page is mounted in (the same listBase "Open as list" uses, setup when none). It is offered on every row with an id: a row about no record still has its own page.
  • The link carries state.from back 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 list sys_audit_log.
  • On a row that carries a 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.openEntryPage and console.system.auditLog.openEntryPageHint in all ten built-in packs. The page header's title now reads from one pageTitle constant shared with the link state.

The card's second option (listing the same-record_id rows 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-log as systemRoutes mounts it, and a probe on /apps/:appName/:objectName/record/:recordId.

  • on a config_change row the drawer links to /apps/setup/sys_audit_log/record/ROW_ID (that row's id) and shows the hint;
  • clicking it lands on the record route with that id, state.from = this page and its title, and the landed row's record_id is the one the mirror's update row names;
  • the app segment follows the mount (/apps/crm/...);
  • a row with no record_id still links to its own page, without the hint;
  • under zh the link and the hint read the zh pack (guarded as real zh rows).

What this file does not pin, because it lives elsewhere: the page's same-record list (plugin-audit sys-audit-log-page.test.ts, "the same-record list is the ledger, keyed on record_id on both sides, newest first, with no New") and the related list's relationshipValueField read (plugin-detail, record-related-list.relationshipValueFieldUncast-9475.test.tsx).

Acceptance notes

  • The card's pin ("on a config_change row 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_id list. No test here mounts the full record page.
  • The language-pack addition costs the eager i18n-locale-en chunk a few dozen bytes; measured below, headroom stays about 2.9 KB of the 60,000-byte ceiling, ceiling untouched.
  • The first commit on the branch (b85081cd, a WIP commit) carries no Claude-Session / Co-authored-by trailer 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 (base b6182249). Head b0f67dde changes only the changeset's Clause-②: line; on it check-adr-0087-registration, check-changeset-no-major, check-empty-changeset (each --base origin/main), check:changeset-gate-self-tests and check-closing-keyword-parity exit 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).
  • Ablation (node scripts/ablation-replace.mjs, the link pointed at listBase instead of entryPageHref(...)): anchor 1 -> 0, 4 of 5 tests red (the zh leg reads labels only); restored, blob == HEAD, git diff HEAD empty.
Gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 36 families for this diff; every one recorded an exit code, --ran reconciliation: "36 derived famil(ies) accounted for — 36 run, 0 NOT-MEASURED". All exit 0, including node 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 in check-doc-snippet-types.test.ts and spec-symbol-ledger-plugin-detail-7265.test.ts read @objectstack/spec's .d.ts, absent after the OS_SKIP_DTS=1 dependency build ("expected 0 to be greater than 1000"). After env -u OS_SKIP_DTS pnpm --filter @objectstack/spec build the 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.ts build of the console closure), the full UI test shards, repo-wide lint. eslint on the two touched console files: 0 errors (2 pre-existing react-hooks/set-state-in-effect warnings on the page's load effect). pnpm --dir ui check:new-line-citations: 0 new citations.

Eager closure

CI=true vite build of ui/apps/console, then node 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)"; "chunk i18n-locale-en 55.7 KB measured / 58.6 KB ceiling (headroom 2.9 KB)". Shared box.

@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 6, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp

Contract review

Served-tier: TIER_DEFAULT
Head-sha: b0f67dde55a3dba640fd3b90374c810a4b3ab62c
Local-runs: none

① Derived judgments

  • The declaration names the whole widening: two new leaves under console.system.auditLog (openEntryPage, openEntryPageHint) in all ten ui/packages/i18n/src/locales/*.ts packs, +2 lines each, nothing removed or renamed (git diff --stat origin/main...b0f67dde). No other published face moves: AuditLogPage.tsx lives in ui/apps/console (the app, not a library entry), and its new entryPageHref helper is module-local.
  • The link targets the console's existing record route /apps/:appName/:objectName/record/:recordId with sys_audit_log; no new route, no new read: the record page and its same-record_id list are the platform's (sys_audit_log_detail, PR feat(service-settings,plugin-audit,plugin-sharing): config_change rows name their settings row; record pages for audit rows and queues #30728), so the ledger's read gate and redaction apply unchanged.

② Semver level

@object-ui/console patch and @object-ui/i18n patch, Clause-②: yes (widening), Metadata-protocol: none: additive keys, no break, matching the lane's patch convention for new pack keys.

③ Boundary flags

  • Eager-pack budget: the dev measured i18n-locale-en 56.3 KB / 58.6 KB after merging origin/main locally; Build & E2E UI (check:eager-closure) is green on this head. ⛔ No ceiling raise.
  • Commit b85081cd on the branch lacks the trailer pair (dev-reported); the PR squash-merges, so the landed commit carries the PR title, and no required context failed on it.

Implemented-by: claude/project-thread-rww6gn
Reviewed-by: session_01L9qibxW6qraU2Z3mwupUGp

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibxW6qraU2Z3mwupUGp

维护者速读

  • 改了什么:Setup → 审计日志的行抽屉里加一个「打开条目页」链接,打开这条审计行自己的记录页;行上带 record_id 时,链接下方说明「条目页按时间倒序列出同一记录的全部变更」。
  • 为什么改:设置写入记的 config_change 行只有摘要,看不到改成了什么。PR feat(service-settings,plugin-audit,plugin-sharing): config_change rows name their settings row; record pages for audit rows and queues #30728 已让审计行的记录页列出同一记录的其他变更(含镜像写入的新旧值),但从管理员实际看日志的地方到不了那页。
  • 风险与回滚:只加一个链接和两条文案(十种语言),走现有的记录路由,读权限与脱敏照旧。首屏英文包仍在上限内(约 56.3 / 58.6 KB)。回滚即撤本 PR。
  • 先看:ui/apps/console/src/pages/system/AuditLogPage.tsx 抽屉头部新增的那一段。
  • 两分钟验证:cd ui && pnpm vitest run apps/console/src/pages/system/AuditLogPage.entryPage-30748.test.tsx,预期 5 条全绿。
  • 需要你做的:无,席位落地。
  • 席位意见:可合。卡上第二种做法(抽屉内直接列同记录变更)没做,链接已满足卡的预期,不另立卡。

席位核对 — ACCEPT · head b0f67dd

  • 形态:13 个文件,+292/−2(页面、一个新测试、十个语言包各 2 行、一份 changeset)。check-governed-merges --branch origin/claude/project-thread-rww6gn:0/13 路径在受管面,294 行 ≤ 3000。Fixes #30748,目标 main。与认领 6678211779 及修订 6678248614、6678969287(Clause-② 改 yes)一致。本 PR 由本席派出的卡线程实现,席位不写码。
  • 契约:Clause-②: yes (widening),Metadata-protocol: none,两包 patch。TIER_DEFAULT 申报面复核 6679326013 在本 head 上 PASS。
  • 席位自己核对(读 diff):链接 entryPageHref(listBase, selected.id) = /apps/<app>/sys_audit_log/record/<id>,与列表的 listBase 同一 app 段;state.from 带回本页路径与标题,记录页的面包屑能回来;提示只在 record_id 存在时出现;两条新键 en/zh 文案读过,其余八种语言各 2 行。changeset 正文逐句对 diff:两个键名、十种语言、链接目标与回路都与代码一致。
  • 前提实测:dev 报告 6678954051(status done)。新测试 5/5,原 AuditLogPage 测试 56/56,消融 4/5 变红;派生门禁 36/36 exit 0;check-sdui-manifest exit 0;合入 main 后首屏英文包仍有余量。
  • 门禁 check-runs:本 head 全部 success 或 skipped,0 红,十个必需上下文都绿;mergeable_state clean。
  • 接受的偏差:分支上 b85081cd 缺 trailer 对,PR 压缩合并,落地提交以 PR 标题为准。
  • 落地条款:维护者常设令 「按 pm-dispatch 审过的pr你可以自主落地」(2026-10-30T14:20Z),本场 「ui 车道跟进一下 3小时内没更新的pr和已派发的issue,接手处理。」。中继 pr_ready + automerge_enable(后者等维护者在席位线程的明确放行)。合并即关卡,同笔摘 pm:dispatched。

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 6, 2026 07:09
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit c1da957 Nov 6, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-rww6gn branch November 6, 2026 14:36
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.

Setup → Audit Logs: the row drawer has no way to open the audit row's record page, which lists the other changes to the same record

1 participant