From c7374a6959530c0464d33e164111828eb6b7d477 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Wed, 22 Jul 2026 08:11:39 +0800 Subject: [PATCH] feat(showcase): enable the record History tab on Account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v16 sweep (#3358 §4 "Record History tab") couldn't exercise the tab because no showcase object opted into it: the console gates the History tab on object-level `enable.trackHistory` (RecordDetailView) — audit *capture* is always on, but the *tab* is opt-in — and the showcase only set `trackHistory` at the FIELD level (industry/status), which just selects which diffs are summarized. So the tab never rendered anywhere and #2691/#3293 (display-value diffs, computed-field exclusion) were undemonstrated. Set `enable: { trackHistory: true }` on Account (which already declares field-level `trackHistory` on `industry`/`status` for clean diffs). Verified in the running app: the Account detail now shows a **历史 / History** tab; after editing `industry`, it renders "Dev Admin · UPDATE · 行业: Retail → Technology" — field label + select **display values** (not raw stored codes/ids), no phantom value→null rows. `os validate` + `tsc --noEmit` pass. Follow-up to #3364 / #3393, from the #3358 sweep §4. Co-Authored-By: Claude Opus 4.8 --- examples/app-showcase/src/data/objects/account.object.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/app-showcase/src/data/objects/account.object.ts b/examples/app-showcase/src/data/objects/account.object.ts index aaf8e01864..13347c4d01 100644 --- a/examples/app-showcase/src/data/objects/account.object.ts +++ b/examples/app-showcase/src/data/objects/account.object.ts @@ -40,6 +40,14 @@ export const Account = ObjectSchema.create({ // every surface, no per-page config. highlightFields: ['status', 'industry', 'annual_revenue'], + // Show the record **History tab** (audit-trail UI). The console gates the tab + // on object-level `enable.trackHistory` (RecordDetailView) — audit *capture* + // is always on, but the tab is opt-in — so without this the tab never renders + // and the feature is undemonstrable. Paired with the per-field `trackHistory` + // on `industry` / `status` below so those changes get summarized diffs + // (display values, not raw ids; computed fields excluded — #2691/#3293). + enable: { trackHistory: true }, + fields: { name: Field.text({ label: 'Account Name', required: true, searchable: true, maxLength: 200 }), industry: Field.select({