Repository navigation
feat(list): confirm a state-machine move before a list cell saves it; the drawer says when the record changed - #35972
Conversation
Claude-Session: https://claude.ai/code/session_01L6bhgVhAK4uNYvjNY3H7XU Co-authored-by: Claude <noreply@anthropic.com>
…dit; tests for the S3 confirm Claude-Session: https://claude.ai/code/session_01L6bhgVhAK4uNYvjNY3H7XU Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVhAK4uNYvjNY3H7XU Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVhAK4uNYvjNY3H7XU Co-authored-by: Claude <noreply@anthropic.com>
…-f8vhdm # Conflicts: # ui/packages/i18n/src/locales/ar.ts # ui/packages/i18n/src/locales/de.ts # ui/packages/i18n/src/locales/en.ts # ui/packages/i18n/src/locales/es.ts # ui/packages/i18n/src/locales/fr.ts # ui/packages/i18n/src/locales/ja.ts # ui/packages/i18n/src/locales/ko.ts # ui/packages/i18n/src/locales/pt-BR.ts # ui/packages/i18n/src/locales/ru.ts # ui/packages/i18n/src/locales/zh-Hans.ts # ui/packages/i18n/src/locales/zh-Hant.ts # ui/packages/plugin-detail/src/useDetailTranslation.ts
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T02:04Z. The brief handed to the isolated declaration-face reviewer for PR #35972 (owed by the PR's Contract review brief — PR #35972 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T02:09Z. Contract reviewServed-tier: Inputs: card #35685 body and all 9 comments (rulings 7039615827 and 7042779557, the S1/S2/S3 claims, the S1/S2/S3 os-dev-reports), the PR #35972 body, its 23-file list, ① Derived judgments
F2 · should-fix: the PR's Tests claim is not met. The body's Tests line says the F3 · nit. The JSDoc on the exported F4 · nit. ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
…doc says who asks Claude-Session: https://claude.ai/code/session_01L6bhgVhAK4uNYvjNY3H7XU Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T02:41Z. The DELTA brief handed to the same isolated declaration-face reviewer for PR #35972 (delta of its record 7055688534 on Contract review brief — PR #35972 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T02:43Z. Contract reviewServed-tier: This is a delta of record 7055688534, which reviewed head Inputs
① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 席位核对 — ACCEPT (L1-a)维护者速读
Head reviewed:
Against the S3 brief (card #35685 body lines 25, 27, 41; ruling 7039615827)
Tests and evidence
Reviews of record
Nits (no action needed)
Landing terms
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-21T02:47Z · Slice S3 of #35685 (area b1-I4): editing a state-machine field from a list cell now asks for confirmation first, with the wording of maintainer ruling 7039615827 item 2, and the record drawer re-reads its record after a save. |
Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgVhAK4uNYvjNY3H7XU
Fixes #35685
(slice S3, the last of three: the state-machine confirm and the drawer sync. S1 #35864 and S2 #35898 are merged. Retiring
onBatchSavestays with #35827.)Clause-②: yes (widening) —
GridCellSelectionin@object-ui/componentstakes an optionalconfirmCommit(row, columnKey, value)member; nothing removed or renamedMetadata-protocol: none
Skills-docs:
content/docs/frontend/plugins/plugin-grid.mdx— the "On an object's list page" section gains two bullets (a state-machine field asks first; the record drawer follows a list save and keeps a draft). No skill underskills/teaches the list's save, so nothing there moves.Follow-up: #35928 (the confirm names the automation that would run; the ruling asked for a card, not this slice)
Flow: dev-thread rule (maintainer 2026-11-20 09:22:50Z): the card thread builds itself; L1 by L1-a, the declaration L2 by the seat on the green head.
维护者速读
What changes
A state-machine move asks first (
@object-ui/plugin-grid,ObjectGrid; only a grid withcellSelection, i.e. every gridListViewdraws).state_machinevalidation rule of the object names it and itseventscoverupdate(the spec default['insert','update']when absent). Severity does not matter: a move along the machine is what related automation listens for, blocking or not. Which moves are legal stays the server's call. (objectGridStateConfirm.ts)Change {{field}}?, body{{field}} changes from {{from}} to {{to}}. Saving may trigger related automation.(ruling 7039615827), buttons Cancel / Change. The values are shown as their option labels as the host translates them, the stored code when no option declares it, and the grid'sEmptyword for no value.The generic seam (
@object-ui/components):GridCellSelection.confirmCommitis asked at the table's commit point, before a value that changes what the cell shows is staged or saved, for the editor's commit (saveEdit) and forcommitCellValue(paste, toggle). A promise holds the write until it settles:truewrites,falseor a rejection writes nothing;null/undefinedmeans no question. Only an autosaving select-first table asks; a table outside a provider is byte-for-byte what it was.exitEdit's snapshot revert is factored out asrevertEditSessionso the held commit closes the editor the way Esc does.The record drawer follows a list save (
@object-ui/plugin-detail,InlineEditSaveBar). The drawer already re-reads the record when the list saves it (the data-invalidation bus from S1), so the new value shows. What is new: while an inline edit session is open and the record is read again at another version, the save bar says so (detail.inlineEditRecordChanged, arole="status"note). The draft stays as typed and Save writes it withIf-Matchthe version now read, as before (the drawer's draft wins, as the brief asked); only the note is new.Strings:
grid.stateChange.{title,description,confirm,cancel}anddetail.inlineEditRecordChangedin all eleven locale packs (zh-Hant regenerated bygen:zh-hant), with English fallbacks inobjectGridTranslations.tsanduseDetailTranslation.ts, byte-identical toen.Acceptance notes
ux-conventions.write-feedbackvariants[1] edits a Priority cell (no state machine), and its steps[4] already says the grid editor offers only legal moves.Tests
ui/packages/components/src/__tests__/data-table-autosave-35685.test.tsx, new block "a commit the host asks to confirm first": No writes nothing, the editor closes, focus returns to the cell; Yes gives exactly one update of that cell; a paste is asked as an editor commit is; an unchanged commit and a cell the host does not ask about are not held.ui/packages/plugin-grid/src/__tests__/ObjectGrid.autosave-35685.test.tsx, new block: the dialog names the field and both labels and says automation may run, Cancel sends nothing; Change sends one guarded update; a field with no machine, and an inactive machine, is not asked; a machine bound toinsertalone is not asked; a warning-severity machine is asked (round 1).ui/packages/plugin-detail/src/__tests__/InlineEditSaveBar.test.tsx, new block: the note appears when the record is read again at another version during the session, the draft is kept and Save sendsifMatchthe new version; no note while the version is the one the edit began on, nor in the next session.Ablation (committed first, mutated through
scripts/ablation-replace.mjs, restored to the HEAD blob withgit diff HEADempty):commitConfirmationOfreturnsnullunconditionally → 6 failed / 27 passed across the two confirm files; restored → green.the save bar's note never rendered → 2 failed / 9 passed in
InlineEditSaveBar.test.tsx; restored → green.round 1:
isStateMachineFieldreturnstrueinstead of readingevents→ "a machine bound to insert alone" fails (1 failed / 17 passed); it refuses aseverity: 'warning'rule → "an advisory (warning-severity) machine still asks" fails (1 / 17); each restored → 18/18.Migrated or voided: none.
Review round 1 (head
c904bd92, after1ef49fae)ObjectGridblock (insert-only machine not asked; warning-severity machine asked), so theevents.includes('update')branch and the ignored severity are both measured; ablated as above. F3 nit: theconfirmCommitJSDoc now says only a table wired withonRowSaveasks, and one ononBatchSavealone never does. F4 nit left, as the seat ruled.f1-trace.logbeside the other evidence; everyfetchto the object wrapped to print its call stack): with the list alone, a confirmed list cell save sends exactly one request, thePATCH, and no read. With the record drawer open on the same row, thePATCHis followed by three requests, all for that one record:GET /api/v1/data/showcase_project?populate=…&top=1&filter=["id","=","<the record id>"](the adapter'sfindOnewith$expand,readOne→rawFindWithPopulate, which reads one record through the collection route),POST …/<id>/pageandGET …/<id>/field-access. That is the drawer re-reading its own record, which is the drawer sync this slice delivers; it is not S2's related-grid re-read (7042779557) and not a reload of the list's other rows. S1's acceptance holds; nothing to file.c904bd92:ObjectGrid.autosave-3568518/18; eslint on the two changed files 0 errors;check:nul-bytesexit 0; overlap-check VERDICT clean.Verification
Local runs
vitestfromui/, one package at a time underos-verify-lock.shon head44ec496a(before the main merge):plugin-grid294 files / 2562 tests passed;plugin-detail393 / 3601 passed (1 file skipped);components493 / 4747 passed (1 file skipped);plugin-list182 / 1971 passed;i18n104 / 1956 passed with one red, the zh-Hant generated-catalogue pin, fixed by runninggen:zh-hantand re-run green (11/11).1ef49fae; conflicts only in the locale packs anduseDetailTranslation.ts, all adjacent additions, both sides kept, zh-Hant regenerated):app-shellwhole package 2356 files: the first run read a stale@objectstack/specdist (83 files red on exports main had just added, e.g.readFieldGroupMembership); after rebuilding@objectstack/specthose 83 files re-ran 83/83 passed (627 tests). The confirm and drawer tests plusi18nand everydata-table/ObjectGrid/InlineEditSaveBartest file re-ran on the merged head: 184 files / 2496 tests passed.type-check(tsc --noEmit) for@object-ui/components,@object-ui/plugin-grid,@object-ui/plugin-detail,@object-ui/i18n: clean on the merged head (after rebuilding the packages' dependency dists).eslinton every changed source and test file: 0 errors.node scripts/pm/dispatch-gates.mjs --commands: 73 families, each run with its exit captured before any pipe. 71 ran on8620e49e(before the zh-Hant regeneration and the main merge, which touch no gate input beyond the locale packs) and 2 on the merged head (check:type-check-debtunder the verify lock,vitest run scripts/underui/with one worker), all exit 0.--ranon the merged head: 73 derived, 73 run, 0 NOT-MEASURED, 0 UNRUN.node scripts/pm/overlap-check.mjs: VERDICT clean (main and feat(app-shell): connect your Slack account on the notification settings page, and an admin Slack page in Setup (Part of #34730) #35968, feat(list): a two-row list toolbar — View settings beside the view name, a resident condition row, ⋮ More at the far right #35918, feat(console)!: one way to open a record from an object's list; navigation.mode deprecated there #35910 merge cleanly).Browser
examples/app-showcase(objectstack dev --fresh --seed-admin, own port and temp DB) with theui/apps/consoleVite dev server over it, headless Chromium, zh-CN, light and dark, desktop 1600×1000 and 375×812. Project list,status(governed byproject_status_flow):PATCH {"status":"active"}withIf-Match; the cell reads 「进行中」.PATCH {"owner":…}with the latestIf-Match, no 409.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (eslint on the changed files: 0 errors)main, one pull request. (The branch is the platform-assignedclaude/project-thread-f8vhdm, named in the claim.)packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgVhAK4uNYvjNY3H7XU