Repository navigation
feat(studio): the Field History setting offers Default, On and Off, and Default says what it resolves to - #36580
Conversation
…nd Default says what it resolves to The fieldHistory rows on the field form, the object form's field list and the object's capabilities were a plain switch: unset drew as off, and a switch turned off could not go back to unset. They now name the new `field-history` widget, a three-way choice whose Default removes the key and names what it resolves to for the row. The resolution is `fieldChangeValuesShown` in @objectstack/spec/data, beside the no-line type list that used to be private to the audit writer; plugin-audit now asks the same predicate, so the form's default and the writer cannot drift. Help text updated in every locale. Claude-Session: https://claude.ai/code/session_01ADHkmPedgY4mKE12ad7oAo Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 8 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 178 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 372f5c1f1df4131fba7273e175ee95ae6e5145e2 && git checkout 372f5c1f1df4131fba7273e175ee95ae6e5145e2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 79d9c1435586d9b411b51a0ac395ea0c23dc3ddc e285ca09502985b49cddd2bb50a0387a5c4549f1 && git checkout -B drift-repro 79d9c1435586d9b411b51a0ac395ea0c23dc3ddc && git merge --no-ff e285ca09502985b49cddd2bb50a0387a5c4549f1
node scripts/docs-audit/affected-docs.mjs --json 79d9c1435586d9b411b51a0ac395ea0c23dc3ddc
|
… protocol does not move Claude-Session: https://claude.ai/code/session_01ADHkmPedgY4mKE12ad7oAo Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY Seat ruling on the new public names in this PR (card #36482). Read at main today and the PR's diff at
Rename in the export-origins and api-surface baselines, the changeset and the PR body in the same push. L2 still reviews semantics; this ruling covers names only. Addendum (head |
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head a0607f1 · 2026-11-23T00:52Z |
…ldHistory, FIELD_HISTORY_DEFAULT_OFF_TYPES Seat naming ruling on the new public names: the predicate is the resolved value of the authored `fieldHistory` key (as resolveDisplayField is for displayField), and the type set is the types whose fieldHistory defaults to off. The two input interfaces follow: FieldHistoryField, FieldHistoryObject. Baselines regenerated. Claude-Session: https://claude.ai/code/session_01ADHkmPedgY4mKE12ad7oAo Co-authored-by: Claude <noreply@anthropic.com>
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract reviewServed-tier: Read for this record: card #36482 (body, 3 comments), PR #36580 (body, 3 comments, net diff against merge-base ① Derived judgments
② Semver levelClause-②: yes (widening)
③ Boundary flags
④ Design judgmentM1 (must-fix) — The head publishes N1 (nit) — N2 (nit) — Field-row help text ( N3 (nit) — The widget always passes Checked and holding (the seat's a to f): (a) Writer equivalence. Old arms in order: object (b) Default label. Field rows: (c) Default removes the key. Field form: (d) Help text. No false sentence found; the gaps are N2 and N3. The (e) Exports. (f) Performance: nothing added on the write path. Implemented-by: VERDICT: FAIL |
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head cdad001 · 2026-11-23T00:58Z |
…dential field never shows values Contract review nits N1 and N2: the module header no longer calls the default-off types a class that never shows values, and the field rows' help text (with its 11 translations) says On does nothing on a credential field. Claude-Session: https://claude.ai/code/session_01ADHkmPedgY4mKE12ad7oAo Co-authored-by: Claude <noreply@anthropic.com>
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head 5df919c · 2026-11-23T01:00Z |
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract reviewServed-tier: Delta round 1 on the at-tier record 7088768550 (head ① Derived judgments
② Semver levelClause-②: yes (widening)
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. M1: closed — N1: closed — the module header now reads as the function does: a credential field never shows values whatever its flags say; a type in the list shows them only with N2: closed — both field rows ( N3: accepted — the widget still passes N4 (nit) — Tried against the rework and holding: no stale mention of the old names in comments that the grep would miss by spelling (the writer docblock and the Implemented-by: VERDICT: PASS |
…d is always off The widget docblock and the changeset read as if Track History could turn a credential field's values on. It cannot: the predicate answers off for a masked type whatever the field's flags say. Claude-Session: https://claude.ai/code/session_01ADHkmPedgY4mKE12ad7oAo Co-authored-by: Claude <noreply@anthropic.com>
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head e285ca0 · 2026-11-23T01:40Z |
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract reviewServed-tier: Delta round 2 on the at-tier record 7088846404 (head ① Derived judgments
② Semver levelClause-②: yes (widening) Stands. The changeset frontmatter ( ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. N4: closed — both sentences are rewritten and both are true at the head.
N3: accepted — unchanged; the PR body's Acceptance notes still carry it. N5 (nit) — Per face, the rest of 7088846404:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmPedgY4mKE12ad7oAo 席位核对ACCEPT — PR #36580 at head Checklist conclusions
Changeset sentences checked against the diff
Spot-check readings
Accepted deviations
Out of scope: none filed; no adjacent fix in the diff. The writer's carrier card #36290 is untouched by this PR. Landing: this PR carries a spec contract face (L2 hit), so it goes to the seat to land or hand off; this thread does not land it. |
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY 维护者速读
ACCEPT → PR #36580 comment 7089819969 · Contract review PASS → comment 7089359334 · Head-sha |
…ar, live at once (objectstack-ai#36597) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi96kzyjcbK53dPTb3U2Eb422)_ Part of objectstack-ai#36511 Clause-②: no Metadata-protocol: none This is the first of three PRs for the card. It covers the object page. Still to come: - PR 2: flows, the enable switch, permissions, and the object page's hooks and an installed app's own actions. - PR 3: field layout, the AI-draft notice with its 「放弃 AI 的改动」 button, and the card's closing line. ## 维护者速读 - 用户能看到什么变化:在 Studio 的对象页(字段、校验规则、动作、设置)改完后,顶栏右侧原来「发布」的位置出现「取消」「保存」。点保存后改动立刻生效,不再每隔一秒半自动存草稿。「变更」「发布」只在有待发布草稿时出现。 - 为什么做:维护者裁定,人类改一项就确认一项、点保存直接生效。本单是「保存即生效」这一系列的第一步,先做对象页。 - 出错会怎样:保存被服务器拒绝时,改动留在页面上,并写明原因;同一次保存里成功的项会被列出来。删掉或改类型已生效的字段前会先问一句。出问题可以直接撤回本单,回到原来的自动存草稿。 - 要你做什么:无。两人同时改同一对象时后保存的人可能覆盖先生效的改动,这件事已交席位按决策卡流程处理。 ## What changes **Mechanism.** A new top-bar coordinator in `studioSaveBar.tsx` does the following: - Editors register their buffers with `useStudioSaveEntry`. - The surface draws Cancel and Save at the right of the top bar, where Publish was, and only while a registered buffer is dirty. They are the column's last actions; only the right-slot icon follows them, as it followed Publish. - One Save sends every dirty buffer in order. A refused buffer does not stop the others. - When something is refused, the toast names each refused item with its reason, then lists the items that were saved. - If any buffer holds an edit it cannot send yet, Save refuses before anything is written. - Save first waits out the editors' expression check of the last keystroke. That is `LINT_DEBOUNCE_MS`, now in its own module `celLintDebounce.ts` (which `CelPredicateField` imports), plus 50 ms. Without the wait, a formula or rule guard typed and saved at once could be sent before its check had judged it (the objectui#4306 rule). **Save = draft + that item's publish.** `publishSavedItem` calls `MetadataClient.publish(type, name, { packageId })`, which is `POST /api/v1/meta/:type/:name/publish?package=` at the package the draft was written to. It is never the package batch. If the publish is refused: - The draft the Save wrote is discarded, unless a draft was already pending before the Save (a copilot's). A pending draft is kept: it now carries the page's edits too. - The edits stay on the page, unsaved, and the reason is shown in the refusal strip. **Editors moved to explicit save in this PR.** All of them are on the object page, as one buffer with one Save: - Fields: - Add, from the Records grid's plus column and from the Form toolbar. - Edit in the field inspector. - Remove. - Column reorder. This is now a buffer edit, not a save of its own. - Validation rules. - The object's own actions. - Settings. - Field groups. - An installed app's object: base-field patches and added `__c` fields. These are saved into its `.custom` pair as an `object_extension` and published there, so they take effect at once. **Editors not changed here** (they keep their draft autosave): - Hooks. The hooks buffer lives in `ObjectHooksPanel` and unmounts on a tab switch, so it has to be lifted into the pillar first. - An installed app's own actions in the pair (`pairObjectActions`). - List and form views, navigation, flows and permissions. **Top bar.** - Changes and Publish are drawn only while drafts are pending. The "No drafts pending publish" disabled state is gone, because nothing is drawn in its place. - Publish refuses, with a toast, while the page holds edits Save has not sent: its re-read would drop them. - The surface's comment saying there is no per-item publish is corrected. **Confirmations.** Save asks before it sends a change that removes or retypes a published field (`objectSaveConfirm.ts`). The field-remove dialog at edit time stays, and its body now says the field leaves once the change is saved and live. Studio has no delete-object affordance (measured: none in the Data pillar or its item tools), so no dialog was added for that. **Leaving.** Opening another object with unsaved edits asks through `confirmDropUnsavedWork`. The switch sends nothing. The unsaved-edit registry the console's leave prompt reads now includes the Save bar's dirty state. **i18n** (`namespaces/studio`, en + zh): - New keys: `engine.studio.save.{save,saving,cancel,title,cancelTitle,done,refused,refusedLine,savedLine,itemSeparator,held,publishFirst,confirmIrreversible,confirmRemoveField,confirmRetypeField}` and `engine.studio.held.lineExplicit`. - `designer.field.removeConfirmBody` is reworded. - Alternatives considered: `engine.studio.saveBar.*` and `engine.studio.commit.*`. The name `save` matches the button's word. ## Tests New files, named for this card: - `DataPillar.saveCancel-36511.test.tsx`. Covers: - Nothing is sent before Save. Save sends a PUT of the draft with `?package=`, then a POST to publish with `?package=`. - Cancel re-reads the object with no writes. - A refused publish discards the draft. A refusal strip appears, the edit is kept, and Save is still offered. - A held picklist blocks Save. - Removing a published field asks at Save. Declined, nothing is sent; accepted, PUT then publish. - `studioSaveBar.partialSave-36511.test.tsx`. Covers ordering, a partial refusal naming the item and its reason, the saved list, a held buffer, and Cancel. - `StudioDesignSurface.saveBar-36511.test.tsx`. Covers: - With no draft, the top bar has no Changes or Publish, and Cancel then Save are the last actions. - With a draft, the order is Changes, Publish, Cancel, Save, and Publish waits for Save. - `__tests__/studioSaveHarness.tsx`. A harness so a pillar mounted alone gets the same coordinator and buttons. **Retired, with the reason:** - `DataPillar.savedAtDisplayLocale-10232.test.tsx` (3 tests). The "Saved HH:MM" hint they pinned is gone: there is no autosave left to time. - `StudioDesignSurface.draftVersionConflict-11773`, the case where two editors each load and save once with no draft pending. A Save now publishes, so no draft is left for the second editor's `If-None-Match: *` to collide with. See Acceptance notes. - `StudioDesignSurface.publishReadOnlyReason-12303`, the objectstack#31495 "nothing pending" block (3 tests). Replaced by one case: no Publish and no reason are drawn. - `StudioDesignSurface.interfacePolish`, "no draft: disabled Publish with visible reason". Replaced by: no Publish at all. **Rewritten to the new semantics.** Each flipped pin asserts nothing sent before Save, then the draft write and the item's publish after Save, or that Cancel or a declined question leaves the page as it was: - DataPillar, Save-gate suites: `celGate`, `panelGate`, `panelHold-27629`, `heldIncomplete-11786`, `choiceWithoutOptions-11253`, `summaryHeld-27461`, `authorRefusal-11785`, `actionRefusal-26736`, `showMeFocus-26730`, `picklistServedOptions-10202`. - DataPillar, other suites: - `hiddenSystemFields-11780`, `recordsTab-34794`, `addFieldPopover-12516`, `copilotDraftMarks-12725`. - `destructiveChange-34931`, `draftSavedNamed-28984` (the toast is now "Saved, live now: Task" under one sonner id), `draftUnreadable-29148`. - `authoredBuffer-29793`, `pairActions-30088` (only its writable control), `baseObjectExtension-28575` (its double now publishes the pair's extension). - `validationVerdictHold-27644` (its double's publish refuses the guard the door refuses), `railSwitchFlush-27511` (the switch asks and sends nothing; a saved edit leaves nothing to ask about). - StudioDesignSurface suites: `autosaveInFlight-11204` (Data block: an edit taken during a Save is the next Save's), `autosaveSwitch-11232` (Data cases), `draftVersionConflict-11773` (the race over a pending draft is refused, with reload and overwrite), `customizePublish-28562`, `narrowHeader-12509`, `packageListErrorPosture`, `publishPosture-12517`. - `DataPillar.internalFormRetired-36425`, added on main by objectstack-ai#36543 while this branch was open, now presses Save before its two Add group saves. `DataPillar.formViewLayout-30057` was deleted on main by that PR, and its one Data-page edit went with it. - 17 edited suites gained a module-top `import '@objectstack/lint'`, as `check:test-source-alias` asks of an edited file that reaches the linter. <details><summary>Studio-design suite after the last commit</summary> Final head `1d6c0845`, same tree as the run except the registry method rename, which the scripts run below covered. ``` cd ui && pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/studio-design \ (+ CelPredicateField, ObjectFieldInspector.celGate, ResourceEditPage.celGate, PermissionMatrixEditor.saveSurface-12725, i18n studio-namespace, studio-namespace-lazy) Test Files 359 passed (359) Tests 2774 passed (2774) cd ui && pnpm exec vitest run --maxWorkers=2 scripts/ (+ the three new 36511 suites) Test Files 175 passed | 2 skipped (177) Tests 5138 passed | 2 skipped (5140) os-verify-lock: VERDICT command-exit 0 ``` Before the pins were rewritten, the same studio-design run read: 33 failed files and 89 failed tests out of 2733. Those are the pins this PR flips. </details> <details><summary>Type-check (both configs) and dependency build</summary> ``` pnpm --filter @object-ui/app-shell type-check (tsc --noEmit && tsc -p tsconfig.test.json) os-verify-lock: VERDICT command-exit 0 · held the lock 119s pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build (after merging origin/main) os-verify-lock: VERDICT command-exit 0 · held the lock 433s ``` </details> <details><summary>Gates (dispatch-gates --ran)</summary> Head `1d6c0845`. `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE`: ``` Run reconciliation — 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN. ✓ dispatch-gates --ran: 39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED ``` ``` node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-empty-changeset.mjs --base origin/main :: exit 0 node scripts/check-empty-changeset.mjs --self-test :: exit 0 node scripts/check-sdui-manifest.mjs :: exit 0 node scripts/check-sdui-manifest.mjs --self-test :: exit 0 node scripts/ci/snapshot-next.mjs --self-test :: exit 0 node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0 node scripts/release-pending-publish.mjs --self-test :: exit 0 pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0 pnpm --filter @objectstack/spec run check:error-code-provenance :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:dispatcher-error-vocabulary :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:engine-double-contract :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:published-files :: exit 0 pnpm check:query-options-erasure :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:registry-log-declared :: exit 0 pnpm check:rest-log-spy-declared :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:test-source-alias :: exit 0 pnpm check:tier-file-adoption :: exit 0 pnpm check:type-check-coverage :: exit 0 pnpm check:type-check-debt :: exit 0 pnpm check:undeclared-dep-imports :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm check:where-matcher :: exit 0 pnpm --dir ui exec vitest run scripts/ :: exit 0 ``` `node scripts/check-nul-bytes.mjs`: OK. `node scripts/pm/overlap-check.mjs`: VERDICT clean exit 0 (against objectstack-ai#36580 and objectstack-ai#36579, which share the studio namespace files). </details> ## Acceptance notes - **Concurrent editors over a published object** (seat ruling 7089589821 on objectstack-ai#36511: accepted as a transitional window; the server guard is tracked on objectstack-ai#36601, not awaited here). The draft-version guard pins drafts only. After a Save publishes, no draft is left, so the second editor's next Save asserts no draft and succeeds over the first editor's live change. The server serves no published-layer version a save could pin. When a draft was pending at open, the race is still refused with the conflict dialog; that case is pinned in `draftVersionConflict-11773`. Until objectstack-ai#36601 lands, the second editor's Save overwrites the first editor's live change. - **AI and a human on one item.** While the page holds unsaved edits, the refresh pulse is held, so a copilot draft written meanwhile is not shown over them. Save is pinned to the draft read: if the copilot wrote a draft in between, the conflict dialog offers reload or overwrite, so neither side is lost silently. If the publish is refused, a pending copilot draft is kept and carries the page's edits. - **A rule guard refused by the publish.** The object publish locator does not place a `validations.N.condition` path, so the strip reads "Not published: the server refused this draft. Details say why." and the rule's reason is under Details. This is the locator's existing reach, not new here. - **The served-verdict hold** (objectstack#27644) still holds a rule whose stored draft the door refused, when that draft was pending at open. A Save the publish refuses now shows the reason at once instead of leaving a draft whose re-read holds the next edit. - **Removing a published field** asks twice: once in the remove dialog at edit time, and once at Save. The card names a confirmation for both removal and type changes. Folding them into one is a product call left to the card. - **ADR sentences the new behaviour contradicts**, for objectstack#36086: - ADR-0027 M2, "explicit, batched publish". - ADR-0037, "Publish remains the single commit gate". - The surface comment "There is no per-item publish". This one is corrected in code. - **Not measured.** - The single-item publish was not run against a live server in this run. The route `POST /api/v1/meta/:type/:name/publish` (`publishMetaItem`) and the existing caller `saveAndPublishRuntimeMetadata` are cited. - The full-farm CI families were not run locally (local scope rule). ## Verification Read first: 1. `ui/packages/app-shell/src/views/studio-design/studioSaveBar.tsx`. The coordinator's held and settle check, and `publishSavedItem`'s discard rule. 2. `StudioDesignSurface.tsx`, the DataPillar `doSave` and `doSaveExt` hunk. Riskiest: the refused-publish restore of `objStoredRef` and `hasDraft`. 3. `DataPillar.saveCancel-36511.test.tsx`. Two-minute check: `cd ui && pnpm exec vitest run packages/app-shell/src/views/studio-design/DataPillar.saveCancel-36511.test.tsx`. Expected: 5 passed, including the case where nothing is sent before Save, then a PUT with `mode=draft&package=` followed by a POST to `/publish?package=`. Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#2 · os-steve · session_01ADHkmPsv99YG2tCHoSe8Nb --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…ty entry, old → new (objectstack-ai#36613) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9NRmimMwnUgR1DbqgHtBWM3)_ Part of objectstack-ai#36290 Clause-②: yes (widening) — four new `detail.*` language-pack keys in every locale `@object-ui/i18n` ships, and new optional props on the exported `FieldChangeItem`; nothing removed or renamed Metadata-protocol: none PR 2 of 4 on the card (part ②: card items 1 and 2, and the activity half of item 5). PR 1 (objectstack-ai#36399, merged as `70194ffc`) made the activity stream serve each changed field's old and new values, narrowed per reader. This PR draws them on the record page. Part ① (the designer producers of `fieldHistory`) waits for objectstack-ai#36580; part ③ (the per-field history card and the field and grid-cell entry points) closes the card. Ruling-ref: 7076513167. ## 维护者速读 - 记录页「动态」里,每次保存现在先写改了哪些字段,下面每个字段一行「字段名:旧值 → 新值」;旧值为空写「空」,长文字截成一行,点「展开」看全文;单选显示选项名,关联记录和人员显示名字。 - 属于「记录详情页重做」专题下的字段修改历史:以前动态里只写「更新了 客户备注」,看不到改前改后的值;服务器上周已经按读取权限发送这些值,这次是把它们画出来。 - 出错时,用户会看到动态里的修改行排版不对或展开按钮失灵;不会多看到任何字段,因为没有读取权限的字段服务器本来就不发送;可以整体撤回,数据不受影响。 - 无 ## What changes **The served values reach the timeline** (`ui/packages/plugin-detail/src/renderers/recordActivityFeed.ts`) - New `activityFieldChangesOf(row)`: reads the field-change code plugin-audit serves in `sys_activity.metadata` (`summary_message`, key `fieldChanges`) and turns it into one `FieldChangeEntry` per field. `activityRowToFeedItem` puts it on the item as `fieldChanges`. An option side keeps the option it matched; a yes/no side keeps the boolean; the writer's empty mark (`∅`, or an empty text) becomes an empty side. A code it cannot read whole gives nothing, and the row draws its summary as before. - Nothing is filtered in the browser. The server already drops a change of a field the reader may not read, and a reference change whose record title the reader is not served (PR 1, `activity-field-redaction.ts`). The timeline draws exactly the changes it is handed. **One line per changed field** (`RecordActivityTimeline.tsx`, `FieldChangeItem.tsx`) - An entry with changes (an activity row's served code, an audit-log entry, or the audit entry paired onto an activity row) draws its usual one-line row, then one line per changed field under it: `Label: old → new`. - The row's own text: for an entry whose changes are its own, `Updated Phone, Email` (its stored summary would repeat the lines). An activity row carrying its paired audit entry keeps its own summary. The record's creation is unchanged (one row, values beside the summary). - Each side: an option reads as the field's option label in the reader's language (`fieldOptionLabel`, falling back to the schema label, then the served text); a lookup or user reads as the record name the server served; a yes/no reads as `common.yes` / `common.no`; an empty side as `detail.fieldChangeEmpty`. - Each side is cut to its line (`truncate`). A side that overflows (measured), holds a line break, or is longer than 48 characters offers `Show all`, which wraps both sides in full, and `Show less`. - The row's markers (`data-stream-row`, `data-stream-system-row`) sit on the whole entry (the line plus its field lines), so a reader of the row reads both; the 30 px line is `data-stream-line`. - The compact one-line change text (the activity panel's peek rows, the creation row's diff) now uses the same label, words and empty word: `Status: New → Contacted`, where it read `Status New → Contacted` with `—` for empty. - `FieldChangeItem` (exported, previously unused) is the line: new optional `label`, `oldText` / `newText`, `emptyLabel`, `expandLabel` / `collapseLabel`; with none of them it draws as before except the arrow is text and the empty word defaults to `(empty)`. **Language packs** (`ui/packages/i18n/src/locales/*.ts`, 11 locales; `useDetailTranslation.ts` defaults mirror `en`) - `detail.fieldChangeLabel` (`{{field}}:`; fullwidth colon in zh-Hans, zh-Hant, ja; `{{field}} :` in fr), `detail.fieldChangeEmpty` (`Empty`, `空`), `detail.fieldChangeExpand` (`Show all`, `展开`), `detail.fieldChangeCollapse` (`Show less`, `收起`). ## Tests New pins, as top-level describes in the existing harness files: - `renderers/__tests__/record-activity.test.tsx` — `record:activity — one line per changed field, old → new (objectstack#36290)`: one field (`Customer notes: Old words → New words`); phone and email in one save is ONE row with two lines; empty side reads `Empty`, never `∅`; select, lookup, user and yes/no read as option label, record names and words; only the served changes draw (a field left out of the code has no line); a long value truncates and toggles; the stream fold opens to each save's own lines; CONTROL: a short value has no toggle, and a row with no code draws its summary. - `renderers/__tests__/recordActivityFeed.test.ts` — `activityFieldChangesOf`: mapping of text, option, boolean and the empty mark; the item carries the changes beside its summary; no code, another code, an empty or unreadable code give nothing. Forced test changes (each because the line format moved from `Label old → new` on one element to `Label: old → new` drawn over several elements): - `__tests__/recordTimelineStream-27055.test.tsx`: a `changeLines()` reader over `[data-field-change]`; the six `getByText(/… → …/)` matches read it instead (a text matcher cannot see a line split over spans). The negative `queryByText(/New → Contacted/)` was moved too, since it would have become vacuous. The two creation-diff strings gain the colon. - `__tests__/RecordTimelinePanel-27524.test.tsx`: the peek line reads `Status: New → Contacted`. - `ui/packages/app-shell/src/views/RecordDetailView.harness.test.tsx`: the audit-date and currency diff readers read `[data-field-change]` lines, and their expected strings gain the colon (`Close date: 3.3.2020 → 4.3.2020`, `Amount: €1,500.00 → €2,500.00`). The values themselves are unchanged. - `ui/packages/i18n/src/__tests__/untranslated-identity-4376.test.ts`: `detail.fieldChangeLabel` joins `LEGITIMATE_IDENTITIES` as a format string (ko/ru/ar keep `:`), like `grid.summary.pattern`. The permission half is the server's, pinned by PR 1 in `packages/plugins/plugin-audit/src/activity-field-redaction.test.ts` (`[objectstack-ai#36290] masked: …`, `[objectstack-ai#36290] not served: the code and the summary are served without the change of the field not served`, `[objectstack-ai#36290] control: a reader served every field is served the whole code`). This PR adds the UI side: the timeline draws only what is served. ## Acceptance notes - Card lines, as this PR covers them: 「改一条客户的「客户备注」并保存:动态里出现「客户备注:旧文字 → 新文字」。」 — yes (zh-Hans label template `{{field}}:`). 「一次保存同时改电话和邮箱:一条动态,下面两行。」 — yes. 「单选、关联记录、人员字段:前后值显示的是选项名和记录名,不是内部编号。」 — yes for single select, lookup and user (option label read per reader; record names as served). 「用一个没有某字段读取权限的账号:动态里没有那个字段的修改行」 — the server leaves the change out (PR 1); the UI draws what is served. The 「修改历史」 half of that line is part ③. - Screenshots of the activity: NOT MEASURED in this PR (no local backend and console build in this run). To reproduce: `OS_PORT=3000 pnpm dev`, open a showcase record, edit a long text field and, in one save, two short fields; the record's 动态 tab shows one entry per save with one line per field; a long value shows `Show all`. - The empty side is recognised by the writer's text `∅` (or an empty text), the notation plugin-audit's `summaryValueOf` writes and its tests pin; the served code carries no separate empty mark. A structural mark would be a server change, outside this PR. - Multi-select and `tree` sides still read as the stored text the writer wrote (PR 1 nits, not taken there either). - Docs: `ui/AGENTS.md` objectstack-ai#2 asks for the package README and the `content/docs/frontend/` page; both are outside this dispatch's file surface, so neither is edited here. - No change to which entries the activity shows, how consecutive edits fold, the activity filters, or audit storage. ## Verification Read first: 1. `ui/packages/plugin-detail/src/renderers/recordActivityFeed.ts` — `activityFieldChangesOf` (the only new read of server data; the empty mark). 2. `ui/packages/plugin-detail/src/RecordActivityTimeline.tsx` — `fieldChangeLinesOf`, `changeSideText`, and `renderSystemLine` (which entries get lines, and the row-marker move in `streamRow`). 3. `ui/packages/plugin-detail/src/FieldChangeItem.tsx` — truncation, the measured overflow and the toggle. Two-minute check: `pnpm --dir ui exec vitest run packages/plugin-detail/src/renderers/__tests__/record-activity.test.tsx` — expect 35 passed, among them the eight `one line per changed field` tests. Readings below are at head `f281417b` (after merging `origin/main` once). <details><summary>Tests (local, under the verify lock)</summary> - `pnpm --dir ui exec vitest run packages/plugin-detail/ packages/i18n/ packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx` plus the 22 app-shell `RecordDetailView.*` / record-page activity test files, at `f281417b`: `Test Files 543 passed | 1 skipped (544)`, `Tests 6159 passed | 31 skipped (6190)`, lock `VERDICT command-exit 0`. - `pnpm --filter @object-ui/plugin-detail run type-check` and `pnpm --filter @object-ui/i18n run type-check` (each `tsc --noEmit && tsc -p tsconfig.test.json`; the test project lists the four edited test files): exit 0, before the merge. - `ui`: `check:i18n-keys` 0, `check:i18n-drift` 0, `check:i18n-dead-keys` 0, `check:new-line-citations` 0 (`0 new citation(s)`), before the merge. </details> <details><summary>Ablation</summary> Committed head first, then `node scripts/ablation-replace.mjs` replaced `const lines = fieldChangeLinesOf(item);` in `renderSystemLine` with `const lines = null …` (anchor 1 → 0, blob `5cc789c3a1d9` → `0061c6cdd8de`) and ran `record-activity.test.tsx` under the lock: `Tests 8 failed | 27 passed (35)` — all eight `one line per changed field` tests red, every older test green. Restored: blob after restore `5cc789c3a1d9` == HEAD, `git diff HEAD` empty. No `dist` is involved: the ui vitest config aliases `@object-ui/plugin-detail` to its source. </details> <details><summary>Gates</summary> `node scripts/pm/dispatch-gates.mjs --commands` at `f281417b`: 41 commands, each run with its exit code recorded before any pipe; all 41 exit 0. `--ran`: `Run reconciliation — 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN.` CI owns the rest (Lint UI, Type Check UI, Test UI, the repo-wide lint); not re-run here. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmPq6z7KER4Sr6Uu7Ht --------- Co-authored-by: Claude <noreply@anthropic.com>
… write Field change values (objectstack-ai#36290 part 1) (objectstack-ai#36641) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9NRmimMwnUgR1DbqgHtBWM3)_ Part of objectstack-ai#36290 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 管理员在 Studio 的字段设置和字段设计器里,原来的「记录历史」开关换成「字段修改值」三选一(默认 / 开 / 关),对象设置的「功能开关」里新增「字段修改值」;普通用户无感。 - 属于记录页「字段修改前后值」专题,落实「默认显示、对象或单个字段可关」的裁决:以前 Studio 写的是不再起作用的旧开关,管理员在界面上关不掉前后值。 - 若出错,管理员可能看到「默认」标成开而动态里实际不显示前后值(或相反),或关掉后回不到默认;改动只在设置界面,可直接撤回。 - 要你做的:无。 ## What changes Card objectstack-ai#36290 part ① (PR 3 of 4; ruling 7076513167 point 1: "Old → new is shown by default on every object's record page; an object, or a single field, can turn it off."). PR 1 (objectstack-ai#36399) gave the runtime `fieldHistory` (field) and `enable.fieldHistory` (object); objectstack-ai#36580 gave the metadata form a three-way `field-history` widget. The Studio's own producers still wrote the old key. This PR moves all three named in the release comment. **Field inspector** (`ObjectFieldInspector.tsx`, Advanced section) - The "Track history" box (`value={!!def.trackHistory}`, `patchDef({ trackHistory: v || undefined })`) is gone. Measured reason: since PR 1 a field's `trackHistory: false` reads like absent and `true` does only what `fieldHistory: true` does for a media or JSON type (spec describe of `FieldSchema.trackHistory`), so a second box beside Field change values could only mislead. A stored `trackHistory` is never written or removed here; it is still read, because `resolveFieldHistory` reads it. - New row "Field change values": Default / On / Off over the field's `fieldHistory`. Default removes the key (`unsetDefKey`, not a patch to `undefined`); On / Off write `true` / `false`. - Default names what it resolves to through `resolveFieldHistory` from `@objectstack/spec/data`, the predicate the activity writer uses. Unlike the form widget, this rail holds the object document, so it passes the object: an object with `enable.fieldHistory: false` makes every field's Default read "Default (Off)", and a note under the row says the object's off wins. - The row sits inside the existing `DisplayPatchLock`, so on a read-only base field it is locked with the same reason as its neighbours (`fieldHistory` is not on `BASE_FIELD_DISPLAY_WHITELIST`). **Object settings** (`ObjectSettingsPanel.tsx`, Features card) - New row "Field change values" (`enable.fieldHistory`), next to "Field change history" (`enable.trackHistory`). Ticked unless the stored value is a literal `false`. Unticking writes `false`; ticking again REMOVES the key (unset already means on, so no `true` the author did not need). Sibling `enable` keys are kept, as for every other row. - The Field change history description no longer says "pair with per-field history tracking to pick which field diffs are summarized" (no longer true); it points to Field change values. **Field designer** (`plugin-designer` `FieldDesigner.tsx`, the drawer behind `MetadataFieldsPage` and the `field-designer` SDUI type) - The Advanced section's Track History switch wrote `trackHistory: data.trackHistory === true` on every save, create and edit. It is replaced by Field Change Values with the same three choices. The update path no longer names `trackHistory`: a stored value rides the `...editingField` spread, and a created field carries neither key at Default. - Default's label depends on the type, which the author can change in the same drawer, and a drawer select's options are static. So the choice is drawn as two rows under form-local names, one per resolved default, each shown by a `visibleWhen` built from `resolveFieldHistory` over `DESIGNER_FIELD_TYPES` (with the field's stored `trackHistory`). The save reads the row shown for the saved type, which is the one on screen at the click. Neither form-local name reaches the model. - `DesignerFieldDefinition` (`@object-ui/types`) and its zod mirror gain an optional `fieldHistory`. Both save paths carry it: `MetadataFieldsPage` (`toDesignerField` / `fromDesignerField`) and `MetadataService.toFieldPayload`. Default writes `fieldHistory: undefined`, which overrides the carried value and is dropped on the wire, so a stored key is removed. That is the converters' existing clear-by-absence rule. - It cannot import `fieldHistoryChoice.ts`, because app-shell depends on plugin-designer. What it shares is the rule (`resolveFieldHistory` from `@objectstack/spec/data`). Its own copy of the choice-to-value mapping is two lines. Its strings are the language-pack keys `appDesigner.fieldDesigner.fieldHistory`, `fieldHistoryDefault`, `fieldHistoryOn` and `fieldHistoryOff`, in all 11 locales and the designer's defaults table. They replace `appDesigner.fieldDesigner.trackHistory`. **Shared logic** (`metadata-admin/fieldHistoryChoice.ts`, new): the three choices, the value each writes and their wording, used by both the inspector row and the objectstack-ai#36580 `field-history` widget (refactored onto it; its behaviour and its 10 pins unchanged). The controls stay separate on purpose: the widget is a `WidgetProps` renderer that sees one form row and no object; the inspector row is an `InspectorSelectField` with the inspector's label and lock semantics and the whole object in hand. **Strings** (studio namespace, en + zh; the other locales fall back to en by that namespace's design): `designer.field.fieldHistory`, `designer.field.fieldHistoryObjectOff`, `engine.studio.settings.capFieldHistory`, `engine.studio.settings.capFieldHistoryDesc`; `engine.studio.settings.capTrackHistoryDesc` reworded; `designer.field.trackHistory` removed with its box. Not in this PR: record-page rows (part ②, landed as objectstack-ai#36613), the per-field history card (part ③). ## Tests - New `ObjectFieldInspector.fieldHistory-36290.test.tsx` (7): Default (On) for a one-line type; Default (Off) for image / json / password and Default (On) once `trackHistory: true`; Off writes `false`, On writes `true`; Default after Off removes the key; no Track history box, no `trackHistory` written, a stored one kept; the object's off makes Default (Off) and shows the note; control: no note otherwise. - New describe in `ObjectSettingsPanel.test.tsx` (4): checked for unset and `true`, unchecked only for `false`; untick writes `false` with siblings kept; re-tick removes the key with siblings kept; labelled by its own title. - New `FieldDesigner.fieldHistory-36290.test.tsx` (9), on the real `FieldDesigner` with a drawer double that captures its schema and calls its own `onSuccess`. The cases: two rows and no Track History row, with the labels; for every designer type exactly one row's `visibleWhen` evaluates true (through `evalFieldPredicate`, the form's own evaluator), and it is the one `resolveFieldHistory` names; a stored `trackHistory: true` moves a media type to the Default (On) row; an untouched edit writes neither key; Off writes `false`, On on a media type writes `true`; a stored `false` opens as Off and Default removes it; a stored `trackHistory` is kept; a type changed in the drawer saves what is on screen; a created field at Default carries neither key. - New `MetadataFieldsPage.fieldHistory-36290.test.tsx` (4), on PUT bytes through the real page and a real `MetadataClient`. A stored `fieldHistory: false` survives and no `trackHistory` is written; a stored `trackHistory: true` survives and gains no `fieldHistory`; a field with neither key gains neither; every PUT field parses through `FieldSchema`. - Extended: `MetadataService.fieldKeyCarryOver.test.ts` adds `fieldHistory` to its populated entry and its clearable keys; `designer-zod-arms-10859.test.ts` adds `fieldHistory` to the fully populated `field-designer` document. - Forced test changes: `ObjectFieldInspector.displayPatchReason-28986.test.tsx` names the Field change values combobox instead of the removed Track history checkbox among the locked controls; `ObjectSettingsPanel.businessWording-36512.test.tsx` lists `enable.fieldHistory` among the keys the tab writes. `ObjectFieldInspector.externalIdNotOffered-26674.test.tsx` and `ObjectFieldInspector.retiredIndexed.test.tsx` listed Track history among the Advanced siblings that still render; they name Field change values, and (being edited) now pay the formula and lint loads at module top, as `check:test-source-alias` requires. `FieldDesigner.externalIdNotOffered-26674.test.tsx` and `MetadataFieldsPage.externalIdRoundTrip-26674.test.tsx` used the Track History row as their positive control; they now use the Field Change Values row. ## Acceptance notes - The field designer's Default label follows the drawer's type and the object is not in hand, so an object with `enable.fieldHistory: false` is not reflected there, the same accepted bound as objectstack-ai#36580's widget. Neither `FieldDesigner` nor `MetadataFieldsPage` is mounted by the Console today; both are published exports, and `field-designer` is a registered SDUI type. - A stored field `trackHistory: true` on a media or JSON type makes Default read "Default (On)"; such a field can still be turned off with Off, but not returned to the type's off-by-default without editing the key in the form. That is the resolver's answer, not a UI choice. - `ui/AGENTS.md` objectstack-ai#2 (package README and `content/docs/frontend/` page) not edited: outside this part's file surface. - Screenshots NOT MEASURED (no Console build or backend run here). ## Verification Read first, by risk: 1. `ui/packages/plugin-designer/src/FieldDesigner.tsx`: the `fieldHistoryRows` memo (two rows, `visibleWhen` built from `resolveFieldHistory`) and `fieldHistoryFromForm`, which picks the row for the SAVED type on both save paths. 2. `ui/packages/app-shell/src/views/studio-design/ObjectSettingsPanel.tsx`: `patchEnable` with `unsetWhenOn` (re-ticking removes `enable.fieldHistory`, keeps siblings). 3. `ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx`: the Field change values row and the object-off note inside `DisplayPatchLock`. Two-minute check: open Studio, an object, Settings, Features: "Field change values" is ticked. Untick, save, and reopen the object JSON: it shows `enable.fieldHistory: false`. Tick again: the key is gone. Then open a field's Advanced section: "Field change values" reads "Default (Off)" with the note under it. <details><summary>Runs (local, head 3b5b130 after merging origin/main 9e2a4ac)</summary> - Builds under the verify lock: the `@objectstack/{spec,formula,lint,client,sdui-parser}` closure, and `@object-ui/app-shell^...` again after the merge (VERDICT command-exit 0 each). - `type-check` (tsc plus `tsconfig.test.json`) of `@object-ui/app-shell`, `@object-ui/i18n`, `@object-ui/types` and `@object-ui/plugin-designer`: all four Done, exit 0 (after the merge; plugin-designer again at 3b5b130). - Post-merge union at ffa608d: `vitest run packages/app-shell/src/views/metadata-admin/inspectors/ packages/app-shell/src/views/studio-design/ObjectSettingsPanel packages/app-shell/src/views/metadata-admin/FieldHistoryWidget-36482.test.tsx packages/app-shell/src/views/metadata-admin/SchemaForm packages/plugin-designer/ packages/types/ packages/app-shell/src/services/ packages/i18n/ packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx` gave Test Files 851 passed (851) and Tests 16838 passed, 14 skipped. 3b5b130 changes only the designer pin's types; that file re-run: 9/9. - Pre-merge union at 3fa510b (`metadata-admin/`, `studio-design/`, `i18n/`) gave Test Files 1232 passed and 2 failed (1234). The 2 were sibling pins still naming Track history, fixed in 58cef60. - Ablations, each through `scripts/ablation-replace.mjs` (anchor 1 to 0), restored with blob equal to HEAD and `git diff HEAD` empty: - The inspector writes `trackHistory` again: 2 of 7 new inspector pins red. - The settings switch writes `true` instead of removing the key: 1 of 14 red. - The designer's update path writes `trackHistory: data.trackHistory === true` in place of `fieldHistory`: 7 of 13 red across the two new designer files. - `dispatch-gates --commands` at 3b5b130 derived 42 families; all 42 ran locally with exit 0; `--ran` reconciliation gives "42 derived, 42 run, 0 NOT-MEASURED, 0 UNRUN". - `overlap-check` at 3b5b130: VERDICT clean exit 0 against origin/main d7411fa (three commits past the merged 9e2a4ac; `git merge-tree` is also clean) and objectstack-ai#36634, objectstack-ai#36629, objectstack-ai#36606, objectstack-ai#36587, objectstack-ai#36525. - ui extras: `check:new-line-citations` 0, `check:i18n-keys` 0, `check:i18n-drift` 0, `check:i18n-dead-keys` 0. eslint on the changed source and test files: 0 errors, and no warnings on added lines. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmPq6z7KER4Sr6Uu7Ht --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Steve · project thread
Fixes #36482
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
Spec (
packages/spec/src/data/field-history-default.ts, new, exported from@objectstack/spec/data):resolveFieldHistory(field, object): whether a changed field's old → new values show on the activity timeline. Off when the object writesenable.fieldHistory: false, or the field writesfieldHistory: false, or the field is a credential (isMaskedOnReadFieldType, with the object'smanagedBy). On when the field writesfieldHistory: trueortrackHistory: true. Otherwise on unless the type is inFIELD_HISTORY_DEFAULT_OFF_TYPES.FIELD_HISTORY_DEFAULT_OFF_TYPES: the 14 types that were a privateSetin the audit writer, unchanged, now frozen and typedFieldType[].isMaskedOnReadFieldType(finding(spec): the protocol declares no masked field-type set — objectql'scollectMaskedReadFieldsand objectui'sMASKED_FIELD_TYPESeach own a copy of one fact #20141): two consumers ask the question, so it is declared once.field.form.tsandobject.form.ts: the threefieldHistoryrows (field form, thefieldsrepeater, theenablecomposite) namewidget: 'field-history'; the repeater and composite rows droptype: 'boolean'so the widget is what renders. Help text rewritten: no "though the switch shows off"; the field rows say what Default means per type (fixes the L2 nit on feat(audit): the activity stream shows each changed field's old → new values by default, served only for fields the reader may read #36399 that "Unset means ON" was too broad for media, JSON and credential fields).resolveFieldHistory(the resolved value of the authored key, asresolveDisplayFieldis fordisplayField),FIELD_HISTORY_DEFAULT_OFF_TYPES, input interfacesFieldHistoryField/FieldHistoryObject.api-surface/data.jsonandexport-origins/data.jsonregenerated: 4 added, 0 removed.Writer (
packages/plugins/plugin-audit/src/audit-writers.ts):changeValuesShownFor(objectDef)now returns(_key, field) => resolveFieldHistory(field, objectDef). The localNO_LINE_VALUE_TYPESset is gone. Equivalence: the old credential test wascollectMaskedReadFields(objectDef).has(key), which isisMaskedOnReadFieldType(def.type, objectDef.managedBy)overobjectDef.fields; every caller passesfield = getObjectDef(object).fields[key](getFieldDefs), so the two read the same definition. The full plugin-audit suite passes unchanged.Studio (
ui/packages/app-shell/src/views/metadata-admin/widgets.tsx): new registered widgetfield-history, labellingcontrol(the host label names the Select trigger). Three options:Default (On|Off),On,Off. Default callsonChange(undefined), which removes the key. A field row (one carryingtype) resolves Default throughresolveFieldHistory({ type, trackHistory }, undefined); theenableblock resolves to on. A non-boolean stored value draws as Default, as the writer reads it. New i18n keysengine.form.fieldHistoryDefault/fieldHistoryOn/fieldHistoryOffin the studio namespace (en, zh).Translations: the three help texts in all 11
*.metadata-forms.generated.tsbundles, hand-translated (extract does not overwrite a present leaf).Tests
packages/spec/src/data/field-history-default.test.ts(new, 12): each arm of the predicate, every no-line type, the better-auth password exemption, literal-boolean reads.ui/.../FieldHistoryWidget-36482.test.tsx(new, 10): the three published rows name the widget; Default (On) / Default (Off) per type and withtrackHistory: true; storedtrue/falsedraw On / Off; choosing Default after Off callsonChange(undefined); On / Off writetrue/false; read-only disables it. Ablation: with the resolver replaced bytrue, "names Default (Off) for a media, JSON or credential type" fails; with Default writingfalse, "a stored false goes back to unset" fails.field-historyrow, as each one requires for a new key:SchemaForm.widgetLabelling.test.tsx,SchemaForm.controlWidgetGridNaming-9889.test.tsx,__tests__/SchemaForm.controlWidgetFailureArmNaming-9931.test.tsx(164/164).src/data190 files / 6778 tests; platform-objects translations 26 files / 610 tests. Derived gates are in the seat's gates file; CI runs the full farm.Acceptance notes
enable.fieldHistory(a field form, a repeater row has only the field), so Default names the field's own resolution; the help text says the object's off wins.resolveFieldHistory, so two cases differ from the writer: an object withenable.fieldHistory: false(disclosed in the help text), and apasswordfield on amanagedBy: 'better-auth'object (label Default (Off), writer on). No better-auth object declares apassword-typed field today, so the second is unreachable; passing the object needs row-to-document plumbing inRecordField, not owed by this card.5df919cb: module header wording; the field rows' help text now says a credential field never shows values (11 locales).e285ca09: the widget docblock and the changeset no longer read as if Track History could turn a credential field on; a credential field's Default is Off always. Wording only, no code change.FieldHistoryWidgetdocblock is 121 characters. Comment formatting only; ESLint is green one285ca09. Left for a later touch of the file rather than moving the head.FieldDesigner.tsx,ObjectFieldInspector.tsx) and anenable.fieldHistorycontrol inObjectSettingsPanel. They do not render these spec form rows.Generated by Claude Code