Repository navigation
docs(core,react): the two @examples teaching getDataConfig read the shared record source (objectui#7798) - #7809
Merged
Conversation
…hared record source (objectui#7798)
Two doc blocks prescribed, in a copyable `@example`, a line no reader can write:
const dataConfig = useMemo(() => getDataConfig(schema), [schema]);
`packages/react/src/hooks/useNavigationOverlay.ts` (the `useNavigationOverlay`
block) and `packages/core/src/utils/record-source.ts` (the
`resolveRecordSourceObjectName` block) both spelled it that way, and
`getDataConfig` is exported by nothing — measured, zero rows for
`export function|const|{ getDataConfig` under `packages/`. It survives only as a
file-local wrapper in `plugin-map/src/ObjectMap.tsx` and
`plugin-grid/src/ObjectGrid.tsx`, so outside those two files there is no module
to import it from.
Both wrappers already delegate their ladder to `resolveRecordSourceConfig`,
keeping only the array shorthand above the shared call, so all live sites now
obtain this value the same way — `plugin-calendar` and `plugin-tree` call the
shared producer directly. The examples follow those live call sites, which is
the judgement PR #7797 applied to `navigation-overlay.tsx`: follow the live call
sites, not another doc block. `useNavigationOverlay`'s example also names the
import, so the line it teaches is copyable as written; `record-source.ts` needs
none, and its example is now byte-identical to the `resolveRecordSourceConfig`
example seventy lines below it in the same file.
`scripts/check-doc-example-shared-reader.mjs` cannot see this class by
construction — its condition (a) requires the example to call a symbol the
repository exports, and `getDataConfig` is exported by nothing, so the pair is
never formed. That gate is deliberately narrow and is left untouched; the fact
is recorded on the card.
No executable line changes: every added and removed diff line under `packages/`
is a JSDoc continuation line, and both revisions of both files transpile to
byte-identical output at `removeComments: true`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
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 5, 2026
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 #7798
Two doc blocks prescribed, in a copyable
@example, a line that no reader outside twoplugin files can write:
getDataConfigis exported by nothing. It survives only as a file-local wrapper inpackages/plugin-map/src/ObjectMap.tsx:135andpackages/plugin-grid/src/ObjectGrid.tsx:444,so outside those two files there is no module to import it from — the prescribed line does
not compile for any new caller.
Both examples now spell
dataConfigthe way the live call sites spell it, which is thejudgement PR #7797 applied to
navigation-overlay.tsx: follow the live call sites, notanother doc block.
One measurement that strengthens the card's premise
The card recorded
plugin-map/plugin-gridas surviving hand-copies and left openwhether they are "deliberate residue or a missed leg". Measured on this tree, they are
neither: both already delegate their ladder to
resolveRecordSourceConfig—ObjectMap.tsx:174andObjectGrid.tsx:453both end inreturn resolveRecordSourceConfig(schema);,keeping only the array-shorthand head above the shared call. So all live sites obtain this
value through the one shared producer; two of them merely wrap it under a local name. That
makes
resolveRecordSourceConfigunambiguously the spelling the examples should teach, andit is a reading, not an assumption. It does not change the card's defect: the name
getDataConfigis still exported by nothing.⛔ Neither wrapper is touched by this PR.
The diffs — comment lines only
record-source.tsneeds no import line — the file is@object-ui/core, and its exampleis now byte-identical to the
resolveRecordSourceConfigexample seventy lines below it inthe same file.
useNavigationOverlay.tsnames the import, matching PR #7797's shape, so theline it teaches is copyable as written. The surrounding prose already carries the rule and
is left to carry it, rather than being restated.
File count: 3 changed, read from the recorded base
a617bb8d3(git diff --stat BASE),not a two-dot
origin/main..HEADrange.Comment-only, proven two independent ways
① Every added/removed diff line matches a comment prefix. All 9 changed lines of the
-U0diff match^[+-] \*(\s|$)— a JSDoc continuation line. Non-comment changed lines: 0.② Both revisions transpile to byte-identical output under the repo's own TypeScript at
removeComments: true, while the raw text differs. The "after" side is read from theworking tree, not the index — a first run of this instrument read
git show :FILE, whichreturned the unstaged index copy (identical to the base blob) and reported a false "raw text
does not differ"; that read was fixed before the numbers below were taken.
⇒ The Clause-② void condition (any change to an executable line under
packages/*/src) isnot met.
Type-check readings — through turbo
type-checkdependsOn ^build, so it is run through turbo, not as a bare package script.turbo run type-check --filter=@object-ui/core --concurrency=2turbo run type-check --filter=@object-ui/react --concurrency=2pnpm --filter @object-ui/core type-check, which runs the package script directly andbypasses turbo's
^build. It produced ~20TS6305("Output filepackages/types/dist/index.d.tshas not been built from source file") plus two cascading
TS7006/TS2322. That is thedependency declarations not having been built — not a type error in this change. Through
turbo, which builds them first, both packages are clean.
check:doc-example-readersre-check — still green, ledger still emptyexit 0.
KNOWN_HAND_SPELLINGSis untouched and stillnew Map([]); no stale-row error,which is what the gate prints when a ledger row names a defect it no longer finds.
The green is a reading, not an absence.
--listshows the edited block among the pairsthe gate actually compared:
The gate's own collapse guard (
files < 200 || readers < 5 || documented < 5) also passed.Its pin test
scripts/__tests__/check-doc-example-shared-reader.test.tswas run because thischange moves the gate's input population — it adds
resolveRecordSourceConfigas a newlyvisible documented symbol in
useNavigationOverlay.ts, which the gate then compares and findsnothing on: 22 passed (22), exit 0.
⛔
scripts/check-doc-example-shared-reader.mjsis not modified. Its condition (a) requiresthe example to call a symbol the repository exports, so
getDataConfignever formed a pair andthis class was invisible to it by construction. That narrowing is deliberate and is left alone;
the fact is recorded on the card, which is where it belongs.
Census: which other
@exampleteachesgetDataConfig?Zero outside this PR's surface. A JSDoc-block scan over every tracked
.ts/.tsxunderpackages/, restricted to lines inside an@examplesection, finds exactly 2 — both ofthem the two fixed here:
Nothing outside the surface, so no card is filed for this census.
Measured but deliberately not fixed (running prose, not a copyable
@example, and outsidethe repair this card authorises):
record-source.tsstill namesgetDataConfigat:28,:50and
:65.:28is a verbatim quotation of the published contract face — the.describetext on
objectql.zod.ts:656— and editing a quotation so it no longer matches its sourcewould be worse than leaving it.
:50and the@param dataConfigat:65describe what callershand in, which remains literally true of the two wrapper sites. The gate's own documented limit
2 ("prose outside a fenced
@example") is the same boundary. Flagged here for triage ratherthan changed in passing.
Changeset gate — verdict lines verbatim
Before,
node scripts/check-changeset-presence.mjs(exit 1):.changeset/7798-getdataconfig-doc-example.mdwas added in the empty-frontmatter form(this change releases nothing — it is doc comments). After (exit 0):
node scripts/check-changeset-no-major.mjs→✅ No changeset declares a 'major' bump.(exit 0).Everything else run, at commit
9116631c4The union below was re-run after the final commit, on a clean tree, so these readings are
of the tree this PR actually carries.
check:doc-example-readersOK 80 documented symbol(s), 3944 call site(s), 11 slot(s)...check:control-bytes✅ check-control-bytes: OK (scanned 6358 tracked text file(s); skipped 85 binary).check:spec-symbols✅ spec member citations: no comment cites a key its spec symbol does not declare.check:doc-fences✅ check:doc-fences — every TypeScript block in 227 document(s) is fenced ts/tsx/typescript...check-changeset-presence.mjs✅ ...declares 1 changeset(s)check-changeset-no-major.mjs✅ No changeset declares a 'major' bump.turbo run type-check --filter=@object-ui/coreturbo run type-check --filter=@object-ui/reactscripts/__tests__/check-doc-example-shared-reader.test.tsEvery exit code above was captured with the redirect-then-capture form
(
cmd > out 2>&1; EXIT=$?), never through a pipe.Not run, and not claimed: the repository-wide
pnpm lintand the full test suite — CI ownsthose.
scripts/__tests__/check-doc-links.test.ts(the known 15 s shared-box timeout flake) wasnot run and nothing here touches it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
Generated by Claude Code