docs(types): correct the NamedListView member figures and pin the count exactly (objectui#7947) - #7969
Merged
Merged
Conversation
…nt exactly (objectui#7947) `NamedListView`'s two quoted figures were wrong in four places, and the pin that should have caught them was floored below the truth. Re-derived on this branch's base d4864f3, with the pin file's own `namedListViewMemberCount()` regex — the instrument the assertion itself uses: 47 declared top-level members. A looser count that drops the two-space indent anchor and so also matches nested object-literal lines gives 59 on the same declaration; the retired "about 52" was a hand figure between the two instruments, matching neither. The derived "unread" figure is 41, not 45. The renderer reads seven keys off a named view, but only six of them (`label`, `type`, `columns`, `filter`, `sort`, `options`) are declared `NamedListView` members. The seventh, `data`, is not declared on the interface at all — it reaches the renderer through an `as any` cast on the named-view config, `(currentNamedViewConfig as any)?.data` in `packages/plugin-view/src/ObjectView.tsx`. So the arithmetic is 47 - 6 = 41, not 52 - 7 = 45, and every site now says so in its own words. The pin moves with the figures: `toBeGreaterThanOrEqual(40)` was chosen against the wrong count and constrained nothing — at a true 47 it permitted the declaration to shed seven members, including a shrink toward the read set, which is the exact condition that re-opens the `listViews` value-type decision, and a floor cannot catch growth at all. It is now an exact `toBe(47)` whose failure message names the three sibling files whose figures must move with it, plus a comment recording how the count is taken and where the loose 59 comes from, so the next reader does not re-derive it and re-introduce the middle number. Text and figures only: no schema, no type, and no assertion about what is accepted or refused changed. `REGISTRATION_TEXT` in the shared pin file is untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s
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
|
This was referenced Sep 6, 2026
This was referenced Sep 6, 2026
Picks up objectui#7932 (c6198c2), which retired `ComponentInput.label` and rewrote the three REGISTRATION_TEXT expectations in the shared pin file. This branch never owned that region; origin/main's side stands. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s
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
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #7947
Two figures about
NamedListViewwere wrong in four places, and the pin that should have caught them was floored below the truth. Text and figures plus one pin tightening; no schema, no type, no change to what a document must contain to validate.Re-derived, not inherited
Both figures were re-taken on this branch's own base (
d4864f3a4) and again after theorigin/mainmerge (859de84a0), with the instrument the assertion itself uses — the pin file'snamedListViewMemberCount()regex, whose two-space indent anchor is what makes it a TOP-LEVEL count:47, not "about 52". A looser count that drops the indent anchor also matches nested object-literal lines inside members' inline types and gives 59 on the same declaration. "About 52" was a hand figure sitting between two instruments, matching neither. Both readings agree with the card.
41 unread, not "about 45".
namedViewReads()returns seven keys read off a named view —columns, data, filter, label, options, sort, type— but only six of them are declaredNamedListViewmembers. The seventh,data, is not declared on the interface at all: it reaches the renderer through anas anycast on the named-view config,(currentNamedViewConfig as any)?.datainpackages/plugin-view/src/ObjectView.tsx(line 1815 on this head — verified present; the cast is the fact, the line number only a pointer). So the arithmetic is 47 minus 6 = 41, not 52 minus 7 = 45. Every one of the four sites now says that in its own words.The pin now binds
toBeGreaterThanOrEqual(40)was chosen against the wrong count and constrained nothing: at a true 47 it permitted the declaration to shed seven members — including a shrink toward the read set, the exact condition that re-opens thelistViewsvalue-type decision (objectui#7928) — and a floor cannot catch growth at all, so the quoted figures could stale silently in either direction. It is now an exacttoBe(47).Its failure message names the three sibling files whose figures move together, so the next person who legitimately changes
NamedListViewis told where to go rather than told a number. A comment above it records how the count is taken (this file's own regex, and why the indent anchor matters) and that the looser count gives 59 — which is where the retired "about 52" came from, so the next reader does not re-derive the middle number and re-introduce it.File face, to the region level
packages/types/src/__tests__/object-view-unmirrored-keys-7779.test.tsis a shared file. I touch exactly two regions:listViewsdescribe block near the end of the file.I do not touch
REGISTRATION_TEXT(lines 113-117),NAMED_VIEW_READS,namedListViewMemberCount()itself, or any other block in that file. PR #7932 edits onlyREGISTRATION_TEXT; the two edits are disjoint.origin/mainwas merged once before opening this PR, and #7932 had not landed at that point (REGISTRATION_TEXTis byte-identical to its base here).The other four files are edited whole-file-uncontended:
.changeset/object-view-unmirrored-keys-7779.md(thelistViewsparagraph only),.changeset/7947-named-list-view-figures.md(new),packages/types/src/zod/objectql.zod.ts(theObjectViewSchemadocblock'slistViewsbullet only),packages/types/src/__tests__/zod-mirror-parity.test.ts(theUnmirroredDeclarednote'slistViewsparagraph only).Reverse verification — the pin was made to fail
Perturbed
NamedListViewby exactly one member on disk, in a script with atraprestore on absolute paths:The failure it produced, in full:
Restored with
git checkout HEAD -- <the declaration>and proved clean by bytes, not by an exit code:Then the three pins were re-run green on the restored tree.
Gates (exit captured before any pipe)
All run on the merged head
27bb40b2a:vitest runthe three pin filesTest Files 3 passed (3)/Tests 137 passed (137), exit 0vitest run packages/types/Test Files 129 passed (129)/Tests 2388 passed (2388), exit 0@object-ui/types type-checktsc --noEmit+ examples + test projects)@object-ui/types lint274 problems (0 errors, 274 warnings), all pre-existingcheck-changeset-presence.mjs.changeset/7947-named-list-view-figures.md, empty frontmatter acceptedcheck-changeset-no-major.mjsNo changeset declares a major bump.check-changeset-fixed.mjsAll workspace packages are in the changeset fixed group.check-changeset-overwrite.mjscheck-control-bytes.mjsscanned 6418 tracked text file(s)check:spec-symbolsspec member citations: no comment cites a key its spec symbol does not declarecheck:handler-key-readscheck-governed-queue-guard.mjs --test(my five paths)NOT GOVERNED — 5 path(s) checked against 5 governed surface(s); none matched.Narrowing, declared and measured. The only published source file in this diff is
packages/types/src/zod/objectql.zod.ts, and the change there is confined to a JSDoc block. Measured rather than asserted: with comments stripped and whitespace collapsed, base and head are character-identical (30654 / 30654,CODE-ONLY IDENTICAL: true) while raw bytes differ (66612 / 67026).turbo ls --affectednames all 43 packages because@object-ui/typesis a universal dependency, but no consumer can observe a behaviour change from a comment; the repo-wide farm is CI's run, not a local one.Two things the card did not anticipate
The stale line range
objectql.ts:1957-2134is not in the tree. Card item 4 asks for it to be dropped where it appears.git grepfor1957-2134returns exit 1 both on this branch's base and on the card's own head5b5a5c3a3, with a positive control on the same refs returning hits, and a wider grep for the bare numbers finds only unrelated chart hashes and a#2134issue reference. The requirement therefore holds vacuously: nothing was dropped because nothing was there, and no line range has been introduced anywhere in this diff.The changeset guards refuse the in-place-only route, so there are two changesets. The card says to correct
.changeset/object-view-unmirrored-keys-7779.mdin place "unless the changeset guards refuse that". They do:check-changeset-presence.mjscounts only added changesets (filter: 'A'), so an in-place correction on its own leaves that gate red. The existing changeset is corrected in place — that is the deadline the card names, and its wrong figures never reach a published CHANGELOG — and.changeset/7947-named-list-view-figures.mdis added alongside with an EMPTY frontmatter, the gate's documented first-class "this releases nothing" declaration, which is the honest grading for a comment-and-figures change.Scope
Part of the objectui#7779 / #7922 follow-up chain; the
listViewsvalue-type question stays with the maintainer on objectui#7928 and is untouched here. objectui#7932's region is untouched. objectui#5741 is the carrier-discipline record the card cites. None of those are addressed by this PR and none should be closed by it.DRAFT deliberately: not flipped ready, not enqueued, no auto-merge armed.
Session, as a durable code span rather than a footer link:
https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8sGenerated by Claude Code