This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
test(components,plugin-grid): pin which body cells the schema-level cellClassName reaches, correct the census root (#6921) - #8657
Merged
Conversation
…ellClassName reaches (objectui#6921) The schema-level `cellClassName` on `DataTableSchema` was described as folded "into every body cell's className". Measured against `data-table.tsx` on this tree it reaches exactly three UTILITY cells — selection, row-number, row-actions — and never a data cell, which folds the per-column `col.cellClassName` instead. - components: a DOM pin renders the table with every utility column on, classifies the one body row's cells by content, and asserts the data cell folds ONLY the column key (the fence: making the old sentence true in the renderer goes red), that each of the three utility cells folds the schema key (non-regression), that the two slots are disjoint, and that with no utility column the schema key reaches zero cells (control). - plugin-grid: a prose pin locates the census entry in ObjectGrid.tsx and asserts it is PRESENT, names the measured cells and the per-column twin, records the hold as over, and no longer carries the stale HELD-pending wording; the entry gains a pointer to the measurement. - types: the one surviving in-repo copy of the false sentence (a test docblock) is corrected to name the measured population. - changeset: empty frontmatter — nothing publishes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
…ellClassName pin docblocks The count was already understated when written: the sweep for this card found a ninth in-repo copy and a second GitHub copy of the sentence. A comment about a miscounted claim should not carry its own miscount. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
os-justin
marked this pull request as ready for review
September 8, 2026 20:07
os-justin
enabled auto-merge
September 8, 2026 20:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6921
What this does
The schema-level
cellClassNameonDataTableSchemawas described — in a census that originated on the #6459 work (PR #6637) and was copied forward through #6882 and PR #6918 — as folded "into every body cell'sclassName". That is false, and was false the day it was written. This PR (a) re-derives the population and pins it in the rendered DOM, (b) pins the corrected census prose inObjectGrid.tsx, (c) corrects the one live in-repo copy of the sentence that the card's eight-place table missed, and (d) records the GitHub-side correction of the census root, done in the same landing. No renderer behaviour changes — that is the card's fence — and the fence is now a test.Re-derivation, on this tree (
3e0a306e0)Every fold site of the key in
packages/components/src/renderers/complex/data-table.tsx, by grep on this tree (line numbers as of this commit; they move)::725—cellClassName,destructured off the schema (the schema-level key):2226— selection cell:cn(cellClassName, "px-3", …)— folds the schema-level key:2243— row-number cell:cn("text-center w-10 relative", cellClassName, …)— folds it:2571— row-actions cell:cn("text-right", cellClassName)— folds it:2329— MAIN DATA cell:cn(col.cellClassName, …)— folds the PER-COLUMN key only; the schema-level key is not in thatcn()So: three utility cells, never a data cell. Then measured in the DOM rather than read: rendering with
selectable,showRowNumbersandrowActionsall on and one data row gives fourtdelements; exactly three carry the schema-level probe class (selection, row-number, row-actions), exactly one carries the column probe class (the data cell), none carries both; with the three utility columns off, the schema-level class reaches ZERO cells while the column class still reaches the data cell. That last reading is the one that broke the original mdx example (itsdata: []and no utility column meant itscellClassNamereached nothing) and here it is the control that the schema class is not being sprayed onto every cell.Premise check against origin/main — one half of the card was already discharged
The card and its dispatch describe the
ObjectGrid.tsxseam-census comment as (1) misstating the mechanism and (2) recording both keys as HELD pending a ruling. Onorigin/mainat3619792bfneither is true any more: objectui#7196 / PR #7202 (f08cbd996, 2026-09-01) rewrote the entry — "the hold is over (declared by the same #6882) … folds the SCHEMA-level key at exactly three sites and every one is a UTILITY cell — the selection checkbox, the row-number cell, the row-actions cell. It never reaches a data cell" — and objectui#7201 / PR #7556 (834c41e25, 2026-09-03) added the compile-time declaredness gate. Evidence:git log -S "into every body cell" -- packages/plugin-grid/src/ObjectGrid.tsxlistsf241a4df4(added, PR #6637) andf08cbd996(removed, PR #7202) only; the phrase survives in that file solely as a quotation inside its own correction. The card was triaged on 2026-09-04 with a fresh cell re-derivation but without re-reading that comment.What was NOT there, and is added here: nothing pinned the corrected wording, so the next drift would again have been caught by a reader or not at all. The entry gains a short GUARDED SINCE paragraph pointing at the two pins.
The census root (the other half), corrected on GitHub in this landing
The sentence's earliest text is PR #6637's body census table (2026-08-28T07:45Z), relayed by two comments on #6459 — the dev report at 07:47Z (option A of its open question) and the decision-facets comment at 08:13Z (in Chinese: "折进每个 body cell 的 className") — and from the facets into #6882's body. Done alongside this PR:
renderCellEditorand schema-levelcellClassNameonDataTableSchema#6918 precedent);const dataTableSchema: any, so theDataTableSchemait imports is never applied #6459 comments are left as closed records (the same treatment the card gives [Decision] DeclarerenderCellEditorand schema-levelcellClassNameonDataTableSchema? — the two live undeclared keys the #6459 census measured #6882's body), and a dated correction comment is posted on finding(plugin-grid): ObjectGrid builds its data-table schema asconst dataTableSchema: any, so theDataTableSchemait imports is never applied #6459 naming both and pointing here.The ninth copy — a bounded in-place fix, declared
packages/types/src/__tests__/data-table-declared-keys-6882.test.ts:19carried the live sentence ("cellClassNameby destructuring into every body cell's class"). It is not in the card's eight-place table: PR #6918 introduced it in the same commit whose four other new copies were corrected under review. Corrected here under the bounded in-place exemption, all four conditions checked: same defect class (the identical sentence); mechanical with a pinned shape (the wording #7196 established, now pinned); no other claim holds the file (all 148claude/*remote heads fetched into a private ref namespace and diffed against their merge-base for that path — zero touch it); same gate family (vitest and the same changeset gate; no new verification surface). Comment-only.Sweep for surviving copies
Query
every(?:\s|\*)+body(?:\s|\*)+cell— comment-continuation tolerant, because the ObjectGrid quotation wraps across a*-prefixed line and a plain\s+misses it — over the 6928git ls-filespaths, hidden dirs included (a barergskips.changeset/and misses a hit). Hits on this tree before the fix: 4 lines in 3 files —.changeset/7196-plugin-grid-held-key-census.md:29(quotation inside a correction record; left),ObjectGrid.tsx:834-835(quotation inside its own correction; left),data-table-declared-keys-6882.test.ts:19(live; corrected here). Controls on the same command shape:folds(?:\s|\*)+the(?:\s|\*)+SCHEMA-level(a real cross-line comment span) fired;Re-derives the held-key censuses(a.changeset/file) fired. Chinese forms (每个 body cell,所有 body cell): zero in-repo hits.Pins added
packages/components/src/renderers/complex/__tests__/data-table-cellClassName-population-6921.test.tsx— DOM: the fence (the data cell foldscol.cellClassNameand NOT the schema-level key), non-regression (selection, row-number, row-actions each fold it, named one by one), the count and disjointness census, and the zero-cells control.packages/plugin-grid/src/__tests__/cellClassNameCensusProse-6921.test.ts— theObjectGrid.tsxentry is PRESENT, names the three measured cells andcol.cellClassName, says the hold is over, and no longer carries the HELD-pending wording; the holds-type member docblock agrees; extractor controls (finds the sibling entry, reports a never-listed key absent).Red before green — every pin observed to fail
Committed tree; each mutation proven on disk by anchored occurrence counts and a changed blob hash; each restore proven by blob hash equal to HEAD and an empty
git diff HEAD.\n +col\.cellClassName,1→0;cellClassName, col.cellClassName,0→1)expect(element).not.toHaveClass("probe-schema-slot-6921")on the data cell; 3 failed, 1 passedtoHaveClass("probe-column-slot-6921")on the data cell; 3 failed, 1 passedOne VOID attempt, declared: the first
fence-addrun was refused by my own anchor rule — the replacement text still containscol.cellClassName,, so "the pre-anchor must drop to 0" could never hold — and no test ran on it (the blob had changed; the rule, not the mutation, was wrong). Re-run with a line-start regex anchor; the row above is that re-run. No dist leg applies: the DOM pin imports the renderer by relative source path (../data-table), not through a packageexportsentry.Leg D (vitest JSON reporter, clean tree, both pins): 9 tests, 9 passed, 0 failed, 0 pending; both files
passed; zero death strings (Element type is invalid,Failed Suites,No test suite found in file,Tests no tests,Transform failed) in the log.Verification — union at the final commit
3e0a306e0pnpm exec vitest run packages/plugin-grid/—Test Files 118 passed (118),Tests 1045 passed (1045); lock lineVERDICT command-exit 0. JSON: 0 failed suites; the prose pinpassedon all five tests.pnpm exec vitest run packages/types/ packages/components/src/renderers/complex/__tests__/plus the three components suites that enumerate test directories —Test Files 171 passed (171),Tests 3032 passed (3032);VERDICT command-exit 0. JSON: the DOM pinpassedon all four; the edited 6882 suitepassed.turbo ls --affectedfrom the base lists nearly every package (apackages/typeschange reaches all dependents); the full farm is CI's run. Locally the risk surface of this diff is the two new suites, the suites that readObjectGrid.tsxsource text (all inpackages/plugin-grid, run in full above — the added comment lines mentioncellClassName, so a line census there could have reacted), and the suites that enumerate test directories (run above).data-table.tsxis unchanged, so no other components suite can observe this diff.pnpm --filter @object-ui/components exec tsc -p tsconfig.test.json --noEmit --listFiles— 0 errors, the new.tsxpin listed in the program;pnpm --filter @object-ui/plugin-grid exec tsc -p tsconfig.test.json --noEmit --listFiles— 0 errors, the prose pin listed.pnpm exec eslinton all four touched files — 0 errors (224 pre-existing warnings; the one in the new components test is the sameno-explicit-anyon the registry-resolved component that the sibling wrap test carries).node scripts/check-changeset-presence.mjs— verdict line:✅ 4 source file(s) of 3 released package(s) changed, and this change declares 1 changeset(s): .changeset/6921-cellclassname-cell-population-pins.md.(empty frontmatter; nothing publishes).check-changeset-no-major.mjs:✅ No changeset declares a major bump.node scripts/check-control-bytes.mjs—✅ check-control-bytes: OK.node scripts/check-governed-queue-guard.mjs --test …—✅ NOT GOVERNED — 4 path(s) checked against 5 governed surface(s); none matched.Out of scope, recorded
renderCellEditorand schema-levelcellClassNameonDataTableSchema? — the two live undeclared keys the #6459 census measured #6882's body table carries the same sentence in its Chinese form; left as a closed decision record, per the card.Worktree cleaned after PR creation. No service was started.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Generated by Claude Code