Repository navigation
fix(console): word a closed record apart from one in approval, and save a closing header last (ADR-0162 item 4) - #38994
Conversation
… from in approval, save a closing header last (ADR-0162 item 4) Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…d row 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>
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>
…nsole-closed-lock Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…k test Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…nsole-closed-lock Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…ing it Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…ock half moves to a follow-up The record page's data-lock read, its closed wording and its two strings are kept on claude/issue-37773-record-page-half-wip for the record-page payload card to re-apply. The grid, the line grid and the closing-header-last save stay. Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…nsole-closed-lock Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ Co-authored-by: Claude <noreply@anthropic.com>
…g header last 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-01T20:12Z · zone osa-data
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #38994 (Part of #37773) · head 0ac0c97 · 2026-12-01T20:15ZVERDICT: ACCEPT. No must-fix and no should-fix.
Next: zone landing. #37773 stays open with |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ 2026-12-01T20:16Z · Landing: L1 ACCEPT on head 0ac0c97 (7324367731; both zone questions answered: no L2 owed, hiding Edit is acceptable with greying as #38996; three accepted nits). Not governed (0 of 28 paths), 808 lines ≤ 3000, CI 54 success / 0 failure, mergeable clean. Ready for review and auto-merge (squash). |
…ad request (ADR-0162 item 4) Re-applies the record-page half held back from #38994. Edit and Delete read the data layer's lock (`dataLock`), which the page payload now carries (`dataLock: true` on `POST /data/:object/:id/page`), so a closed record is greyed and worded as closed without a second request. Reads the hook sends itself (the edit dialog over a list, a refresh after a change) keep asking `GET /data/:object/:id/lock`. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Part of #37773: this PR lands the grid, the line grid and the closing-header-last save. The record-page half stays open on the card and waits on #38995.
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ADR-0162 item 4, the grid half: the grid and the line grid ask the data layer's one lock read (D9, landed in #38913) for a row's edit and delete affordances, and word the reason from its
lockReason. The master-detail form writes a closing header last.ui/packages/plugin-grid/src/hooks/useRowApprovalLocks.ts): the on-demand page read now goes toPOST /api/v1/data/OBJECT/locks, chunked atRECORD_LOCKS_MAX_RECORD_IDS. It is gated onroutes.datain discovery (not on the approvals service), and the 501 latch is kept. Each answer keepslockReason. New membersclosed(id)anddeleteRefused(id);heldByMasteris gone.deleteRefusedis true onclosed_statefor either source, and onapprovalonly forlockSource: 'master', which is the published rule. Same request count as before.objectGridCellFacts.ts,ObjectGrid.tsx,objectGridTranslations.ts): a newclosedLockedread-only kind, checked beforeapprovalLocked. A cell on a closed row opens no editor and says "This record is closed, so it can't be changed."; a closed row that is also held reads as closed.objectGridActionsColumn.tsx): Edit and Delete read the same answer, so a closed row offers neither. Greying Edit instead of hiding it is Console grid: grey the row menu's Edit on a locked row with the reason, instead of hiding it #38996.ui/packages/plugin-form/src/masterDetailTx.ts,MasterDetailForm.tsx): an edit save whose header data sets a value the header object lists inclosedStatesputs the header update after every line write (ADR-0162 D4). Otherwise the header stays first. The form readsclosedStatesfrom the header's own served definition, and the result mapping finds the parent by object and id, not by index 0. Create stays parent-first, because its lines point at operation 0.grid.readOnlyReason.closedLockedin all eleven console locales; zh-Hant is generated from zh-Hans.content/docs/data-modeling/closed-states.mdx, § Line edits go before the closing write): the passage that said the console's master-detail form saves the header first now says it writes a closing header last, so such a save lands whole. Only that passage changes.userActionspredicates and action buttons are untouched: the lock read hides no action.Tests
plugin-form/src/masterDetailTx.closingHeaderLast-37773.test.ts(7) andMasterDetailForm.closingHeaderLast-37773.test.tsx(2). The second drives the real form: it pickspaid, edits a line, and pins['update invoice_line', 'update invoice']. A second save diffs against what the first wrote, and the control keeps the header first.rowMenuApprovalLock-36911.test.tsx(2: closed own and closed line offer neither Edit nor Delete, own approval keeps Delete) andObjectGrid.cellSelection-35684.test.tsx(closed wording; closed and held reads as closed).Ablations (one per fix, each restored)
closing = falseinbuildMasterDetailEditBatchturns 3 of the 9 new plugin-form tests red.closed_statefromdeleteRefusedandclosedturns the three closed pins in 36911 and 35684 red (42 of 45 still pass).Acceptance notes
claude/issue-37773-record-page-half-wipatca71605f. Its record-page files, against main:ui/packages/app-shell/src/hooks/useRecordApprovals.ts,views/RecordDetailView.tsx,views/recordDeleteHeldByMaster.ts, the testsuseRecordApprovals.lockSource-37195,RecordDetailView.approvalLock-25934,RecordDetailView.harness(§ closedLock-37773) andAppContent.editDialogApprovalLock-27138, and the stringsdetail.lockedClosed/detail.lockedClosedTooltip. Until it lands, the record page reads the approvals lock as main does: a closed record there still shows Edit (the server refuses the write), with no closed wording.recordDeleteHeldByMaster.tsheader comment still namesuseRowApprovalLocks.heldByMaster, which this PR removes. The comment only; the record-page half rewrites that file.Verification
Browser, on the showcase (paid invoice from #38917) through this branch's console source: https://claude.ai/artifact/1WWaA6gcswQuZHN2yJDnW8 (private until shared). For this PR, the grid frame applies: an edit on the paid row INV-1003 opens no editor and shows the closed sentence. The record-page frames there show the half that moved to #38995.
Two-minute check: in the showcase, open Invoices, select the Owner Email cell of a paid invoice and press Enter. Expect "This record is closed, so it can't be changed." and no editor; a draft invoice's cell opens its editor.
Local readings
dispatch-gates --ranon the final tree (73 derived, the docs families included): 73 run, all exit 0, 0 NOT-MEASURED.check:spec-symbols,check:i18n-keys,check:i18n-driftandcheck:new-line-citations: exit 0.overlap-check: clean against origin/main.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ