Repository navigation
fix(console): the record edit dialog opens locked with the closed sentence on a closed record (ADR-0162) - #39019
Conversation
…tence on a closed record (ADR-0162) AppContent reads recordClosedByLock from the hook the dialog already uses and hands ModalForm lockedBy 'closed' (closed wins over an approval hold, as on the record page). The lock rides the existing chain: RecordFieldAccessScope refuses the row with 'record-closed', fieldWriteGate maps it to the 'closed' affordance (no Save), and the notice says the record page's closed sentence (detail.lockedClosedTooltip). Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ Final green head · 2026-12-02T02:33Z · zone osa-data
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #39019 (#38997) · head c564f48 · 2026-12-02T02:37ZREWORK — one must-fix, in the declaration only. The code is right. Must-fix
Read and right
Next: fix both declaration lines (changeset body and PR body), then send the green head. I run the |
…dening (#38997) The exported lockedBy prop of RecordFieldAccessScopeProps and ModalFormProps now accepts 'closed' beside 'approval': a widening of two published packages. Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…38997) Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ Final green head · declaration fix · 2026-12-02T03:02Z · zone osa-data
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head 9e70d53 · 2026-12-02T03:04Z |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm Contract reviewServed-tier: Declaration face, PR #39019 (card #38997, item 2). ① Derived judgmentsWhat the published packages export, read from each entry at the head:
Every derived public-surface change is named right: two input widenings, nothing else exported moved. ② Semver level
Changeset, sentence by sentence:
③ Boundary flags
④ Design judgment
N1 (nit) — Changeset sentence 5, "It sends no request of its own", reads over a list as if the dialog sends nothing. In fact it adds no request: the No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 delta · PR #39019 (#38997) · head 9e70d53 · 2026-12-02T03:09ZACCEPT, on head
Next: zone landing. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ 2026-12-02T03:10Z · Landing: L1 delta ACCEPT on head 9e70d53 (7333606891) and declaration review at |
Fixes #38997
Clause-②: yes (widening)
Metadata-protocol: none
The widening (L1 7333040997): the exported
lockedByprop ofRecordFieldAccessScopeProps(@object-ui/permissions) and ofModalFormProps(@object-ui/plugin-form) accepts'closed'beside'approval'. Level stayspatch.维护者速读
What changes
Item 2 of the card: the console's full-record edit dialog locks on a closed record. Item 1 (the edit-state save order) landed in #39007.
ui/packages/app-shell/src/console/AppContent.tsx): readsrecordClosedByLockfrom theuseRecordApprovalshook the dialog already uses for its approval lock, and handsModalFormlockedBy: 'closed'. Precedence: closed wins over an approval hold, as on the record page (recordClosedByLockis true for a record both closed and held). An approval-held record that is not closed keepslockedBy: 'approval', unchanged.ui/packages/permissions/src/RecordFieldAccessScope.tsx):lockedByaccepts'closed'beside'approval'. The row's update is refused with the new reasonrecord-closed, and every field of it is not writable, exactly as for'approval'. A projection answeringwritable: falsekeeps its own reason, as it already does over'approval'.ui/packages/plugin-form/src/fieldWriteGate.ts):record-closedmaps to a new'closed'affordance, andclosedForRecordtreats it like'approval', so the dialog (and the drawer) offer no Save.closedAffordanceNotice.tsx):'closed'says the record page's closed sentence,detail.lockedClosedTooltip("This record is closed, so it can't be changed."). No new locale key; the provider-less defaults row repeats the en value (check:i18n-keysgreen).ModalForm.tsxandrecordFieldAccess.tsxwidenlockedByto the scope's own prop type..changeset/38997-edit-dialog-closed-lock.md(permissions, plugin-form, app-shell; patch).Tests
Written first and run red (6 red, 23 existing green), then green after the fix.
AppContent.editDialogApprovalLock-27138.test.tsx, new describe: a closed record handslockedBy: 'closed'; a closed record a pending approval also holds hands'closed'; a closed record sends exactly the three lock reads an open one sends. The approval-held cases above it are the control and are unchanged ('approval').recordFieldAccess.rowWritable-27138.test.tsx, new describe:ModalFormwithlockedBy="closed", on a writable row and on a data source without the projection, draws every field read-only, the notice withdata-affordance="closed"and the closed sentence, and no Save.RecordFieldAccessScope.rowWritable-27138.test.tsx:lockedBy: 'closed'refuses the update withrecord-closedbefore any answer and overwritable: true; read stays allowed.Ablation (restored, blob equal to HEAD)
AppContent.tsx: the closed test replaced byfalseturns the 3 new dialog cases red; the 6 approval and control cases stay green.Acceptance notes
DrawerForm) shares the gate and would draw the'closed'affordance too, but no host passes it alockedBytoday; not changed here.Verification
Two-minute check, from
ui/:pnpm exec vitest run packages/app-shell/src/console/__tests__/AppContent.editDialogApprovalLock-27138.test.tsx: 9 passed, including the three closed cases.Read first:
AppContent.tsx(the precedence line), thenRecordFieldAccessScope.tsx(the refusal reason), thenfieldWriteGate.ts.Local readings, head c564f48
AppContent*files plus the five one-request record-open pin files: 60 files, 626 passed.type-check: permissions, plugin-form and app-shell exit 0 (after rebuilding the permissions and plugin-form dist the downstream tsc reads).--no-inline-configone error stands inModalForm.tsx("Cannot create components during render"), present at the same place on main.dispatch-gates --ranat c564f48: 38 derived, 38 run, 0 NOT-MEASURED. uicheck:i18n-keys: exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ