Repository navigation
fix(grid): a grouped row moves to its new group once its row is left, and group subtotals and the footer total follow a cell save (#35689 slice B) - #36476
Conversation
… and group and footer figures follow a cell save (#35689 slice B) Claude-Session: https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds Co-authored-by: Claude <noreply@anthropic.com>
…35689 slice B) Claude-Session: https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds Co-authored-by: Claude <noreply@anthropic.com>
…ck (#35689 slice B) Claude-Session: https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jUc3qp6bHKSWijbjds Final head (area f7-list, 2026-11-22T13:40Z): |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT · head 维护者速读
席位核对
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jUc3qp6bHKSWijbjds Landing (area f7-list, 2026-11-22T13:53Z): head |
Fixes #35689 — slice B (groups and totals after a save). Slice A (touch, accessibility, checked rows) landed earlier on its own PR, so nothing else on the card is left.
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Measured first on
origin/main285ad8d, in a list that selects a cell first (the list page's grid), with the card-named pins below run against the unchanged source:Why: a select-first save redraws only its own row (the row patches of #35685) and the list lets its own write go by on the bus, so nothing is read again. The groups, the group headers' numbers and the footer's row figures read the rows as loaded, not as saved. The whole-set footer listens to the bus itself, so it already re-asked.
What this PR does, all in
@object-ui/plugin-grid:rowsAsSaved(inobjectGridRowPatch.ts) gives the rows with each saved row in place of the one read, while that read is the one held. The footer reads it, so a flat grid's total includes the saved value at once. A grid that groups the rows it was handed buckets it, so its counts and subtotals follow the save.writeRowInPlacenotes such a record inheldInGroup. The browser bucketing reads that record as it was loaded (it stays in its group, counted and summed there).onCellSelecton a cell of another row lets it go: the browser bucketing then moves it, and a server-grouped grid reads its group headers and open groups' rows again (regroupNonce). A cell of the same row does not let it go. Any later save on a held row waits with it.savedFigureNonce), so subtotals update at once and no row is read again.objectGridGrouping.tsnow keys the header query on that nonce and the row pages onregroupNoncealone.Docs:
content/docs/frontend/plugins/plugin-grid.mdxgains one bullet under the per-cell save section. Changeset:@object-ui/plugin-gridpatch.Tests
One new top-level describe in the component's existing select-first save harness,
ObjectGrid.autosave-35685.test.tsx: "ObjectGrid — groups, subtotals and the footer total after a cell save (objectstack#35689)". It covers both grouping paths: the server, where the grid asks its own group headers and group pages, and the browser, where it buckets rows a host hands it.cellSelection, a write on the bus re-reads the grouped grid at once.Ablations: one run per leg through
scripts/ablation-replace.mjs. Every anchor hit x1 and went to x0, and every restore came back to the HEAD blobf5aebf14withgit diff HEADempty. The suites import the grid by relative path (source), so no dist leg was owed:onCellSelectno longer lets a held row goReadings (all through scripts/pm/os-verify-lock.sh)
origin/main285ad8d before any source edit, the new describe gave 5 failed and 2 passed (the paged footer and the control). The failures: Won expected Bolt and Cord, got Cord only (both paths); the subtotal stayed 2 · 150 (both paths); the footer stayed Sum: 180.pnpm turbo run build --concurrency=2 --filter='@object-ui/plugin-grid^...' --filter='@objectstack/client-react...': 54 successful. Thenpnpm --filter @object-ui/plugin-grid run type-check(script echoed): exit 0. Thenpnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-grid/: Test Files 304 passed (304), Tests 2706 passed (2706). Andpnpm --dir ui exec vitest run --maxWorkers=2 scripts/: Test Files 172 passed, 2 skipped; Tests 5127 passed, 2 skipped; exit 0.pnpm check:nul-bytesexit 0.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat e96aa67 derived 72 families (6 paths vs merge base d8628ac). All ran with exit 0. Three needed a second attempt:check:skill-examplesfirst exited 3 because client-react had no dist (built, then exit 0);check:type-check-debtfirst exited 3 because the lock was busy (run under the lock, exit 0, 0 raw tsc errors); the uiscripts/suite first got no turn on the lock (exit 99), and its reading is above.--ran: 72 derived, 72 run, 0 NOT-MEASURED, 0 UNRUN, with every exit code recorded.node scripts/pm/overlap-check.mjsat 1285fe4: VERDICT clean exit 0, against origin/main 7ae5e07 and 4 open heads (fix(grid): phone record cards load more as the card list scrolls #36453, feat(record-page): the side preview opens 460 wide, puts the record's name first with one labelled action, and lists a child tab one row per record #36438, feat(spec,ui)!: every grid that renders editable selects a cell first, and object-grid singleClickEdit is retired #36357, feat(automation): the stage confirms name the flows a move would start (#35928) #36316).Acceptance notes
Verification
Files to read first, by risk:
ui/packages/plugin-grid/src/ObjectGrid.tsx:noteSavedPlace,leaveHeldRows, and thesavedDataandgroupedDatamemos.ui/packages/plugin-grid/src/objectGridGrouping.ts: the header and row reload keys.ui/packages/plugin-grid/src/objectGridRowPatch.ts:rowsAsSaved.Two-minute check:
pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/ObjectGrid.autosave-35685.test.tsx. Expect 29 passed, including the seven under "(objectstack#35689)".Generated by Claude Code