You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(detail): distinguish "in approval (editable)" from locked, and stop losing write warnings (#2914)
* fix(detail): distinguish "in approval (editable)" from locked, and stop losing write warnings (framework#3794)
The record page told the user the opposite of what the backend does, in both
directions.
The approval band rendered "Locked for approval" on any pending request,
ignoring the node's `lockRecord`. A `lockRecord: false` node is pending WITHOUT
locking — that is how an approver amends a record while deciding on it — so the
band hid the feature; meanwhile the header Edit button stayed enabled on a
genuinely locked record, letting the user fill a form the save would reject with
RECORD_LOCKED. `useRecordApprovals` now reads `locks_record` off the pending
request (framework#3794), `RecordDetailView` derives `approvalPending` and
`approvalLocked` separately and threads both through `InlineEditProvider`, and
the band picks the amber lock or a neutral "In approval (editable)" from the
host's signals. With no approvals-aware host the `approval_status` fallback is
unchanged and still assumes a lock.
The write-warning toast (framework #3431/#3455) never fired on
`batchTransaction`, which is the record form's save path for a master-detail
record — precisely where a user edits a `readonlyWhen`-locked field. It now
emits per event, resolving each back to its operation via the response `index`.
The toast is localized (en + zh) and worded by reason: a `readonly_when` strip
says the field is not editable in this record's current state, not that it is
read-only.
Finally, the user-state adapter no longer hand-stamps the server-managed
`updated_at`, which the server strips and reports — that fired a "Some fields
were not saved" warning about a field no user touched, on ordinary page loads.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(i18n): backfill the new detail keys into all ten locale packs (framework#3794)
The full ten-pack parity ratchet (#2872) landed after this branch was cut, so
the six new `detail.*` keys existed only in en/zh. Translated into ja, ko, de,
fr, es, pt, ru and ar.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
0 commit comments