From fb33dad859e9c57da68b89ff4ed5d9c91b6c4aeb Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Mon, 10 Aug 2026 05:04:47 +0000 Subject: [PATCH] fix(plugin-audit): localize tracked-change labels and render lookup titles (#7230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `sys_activity.summary`'s tracked-change branch (ADR-0052 §5b) shipped strings like `Rating Owner: ∅ → oBK25…` onto every feed surface at once. Two causes, both fixed here: - `renderTrackedChangeSummary` was the one summary branch never handed the locale-bound `translate` its three siblings resolve through (ADR-0053 / #3039). The field label now resolves through it on the bundles' own key shape, falling back to the authored label and then the machine key. - `displayFieldValue` resolved select option labels only, so a lookup / master_detail / user value printed its raw id. It now renders the referenced record's title via ADR-0079's `resolveDisplayField`, falling back to the raw id when unresolvable. The resolution is batched: 0 added reads unless a tracked reference field actually moved, then exactly one `id: { $in: [...] }` per distinct target object — so #6656 / PR #6977's retirement of the redundant pre-image read from this write path is not handed back. Read counts are pinned with the same counting driver that measured that retirement. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01BM1tNf5U3nEbHKR4fo5qVQ --- ...racked-change-summary-locale-and-lookup.md | 48 ++ .../src/audit-lookup-summary.test.ts | 522 ++++++++++++++++++ .../plugins/plugin-audit/src/audit-writers.ts | 228 +++++++- 3 files changed, 790 insertions(+), 8 deletions(-) create mode 100644 .changeset/audit-tracked-change-summary-locale-and-lookup.md create mode 100644 packages/plugins/plugin-audit/src/audit-lookup-summary.test.ts diff --git a/.changeset/audit-tracked-change-summary-locale-and-lookup.md b/.changeset/audit-tracked-change-summary-locale-and-lookup.md new file mode 100644 index 0000000000..030aa0c546 --- /dev/null +++ b/.changeset/audit-tracked-change-summary-locale-and-lookup.md @@ -0,0 +1,48 @@ +--- +"@objectstack/plugin-audit": patch +--- + +fix(plugin-audit): localize the tracked-change activity label and render lookup titles instead of raw ids (#7230) + +`sys_activity.summary` is composed at write time and shipped verbatim to every +feed surface at once — the record discussion feed, console home activity, the +header inbox, the Setup `sys_activity` list, and mobile/REST/SDUI. Its +tracked-change branch (ADR-0052 §5b, `"