Repository navigation
fix(console): the record page's edit-state save writes a closing header after its lines (ADR-0162 D4) - #39007
Conversation
…er after its lines (ADR-0162 D4) buildRecordEditBatch takes the object's closedStates and, when the field draft sets a closing value, puts the record's update after every line write, as buildMasterDetailEditBatch does. The edit-state controller reads closedStates off the object definition the page's RecordContextProvider carries, and drops an empty draft's update by its owner, not by index 0. Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
…the record page A Save that picks a closing status and edits the lines sends the lines first and the record last; the control picks a status the object does not close on and keeps the record first. Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
…tch operation type Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ Final green head · 2026-12-01T23:45Z · zone osa-data
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #39007 (Part of #38997) · head 79b7870 · 2026-12-01T23:47ZVERDICT: ACCEPT. No must-fix and no should-fix.
Next: zone landing. #38997 stays open with |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ 2026-12-01T23:47Z · Landing: L1 ACCEPT on head 79b7870 (7329775188, no must-fix, no should-fix). Not governed (0 of 5 paths), 176 lines ≤ 3000, no L2 owed, CI 39 success / 0 failure, mergeable clean. Ready for review and auto-merge (squash). |
Part of #38997
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Item 1 of the card (the edit-state save order). Item 2, the full-record edit dialog's closed lock, waits on the record-page lock work of #37773 (branch
claude/issue-37773-record-page-lock), which adds the data-layer lock to the record approvals hook; this PR adds no lock read of its own and touches no file of that work.ui/packages/plugin-form/src/RecordBodyTableEditor.tsx,buildRecordEditBatch): takes the object'sclosedStatesas a new optional fifth argument, theMasterDetailEditOptionsthatbuildMasterDetailEditBatchtakes. When the field draft sets a value the object lists inclosedStates(judged by the sharedclosesRecord), the record's update is written after every line write and owned as{ kind: 'parent' }at the end. Otherwise the record's update stays op 0. Callers that pass nothing get the old order. ADR-0162 D4.ui/packages/app-shell/src/views/recordEditState.tsx): readsclosedStatesoff the object definition the page'sRecordContextProvideralready carries (no request), hands it to the builder, and drops an empty draft's record update by its owner instead of slicing index 0..changeset/38997-edit-state-closing-order.md(@object-ui/plugin-formand@object-ui/app-shell, patch).Tests
RecordBodyTableEditor.recordEditBatch-35599.test.ts, new describe: a closing draft puts the record update last with its owner last, and a refusal is still placed on the record field and on the line; CONTROL: a non-closing value, a non-state field, and noclosedStateskeep the record first.RecordDetailView.harness.test.tsx,recordEditState-35599block: two new cases drive the real record page. Edit lines, pick the closing status, Save: the one batch ends with the record update. CONTROL: the same edits with a status the object does not close on keep the record first.Ablations (each restored, blob equal to HEAD)
{}instead of{ closedStates }turns the closing harness case red (record update not last); its control and the other 9 cases stay green.closing = falseturns the closing unit case red; the other 9 in the file stay green.Acceptance notes
closesRecordjudges only the edited keys of the draft, as the master-detail form does: a save that edits lines on a record that is already closed is still refused by the server (that is the lock the dialog and the page should show, item 2).Verification
Two-minute check:
pnpm --dir ui exec vitest run packages/plugin-form/src/RecordBodyTableEditor.recordEditBatch-35599.test.ts(from the repo root): 10 passed, including the closing describe.Read first:
recordEditState.tsx(the owner-based drop of the record op), thenbuildRecordEditBatch.Local readings, head 79b7870
RecordDetailView.harness.test.tsxandrecordEditState.helpers-35599.test.ts: 98 passed.type-check: plugin-form exit 0, app-shell exit 0. eslint on the four touched source and test files: 0 errors.dispatch-gates --ran(taken at 23ace6e): 39 derived, 39 run, 0 NOT-MEASURED. The set is unchanged at 79b7870; the ratchet families (type-check coverage and debt, test-source-alias, cross-package-test-inputs, nul-bytes, undeclared-dep-imports) re-run there: all exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ