Repository navigation
docs(components): navigation-overlay's file-header @example reads the shared record source (objectui#7787) - #7797
Merged
Conversation
… shared record source (objectui#7787) `packages/components/src/custom/navigation-overlay.tsx` opens with a file-header block documenting `NavigationOverlay`, and its `@example` still taught `objectName: schema.objectName` — the exact spelling PR #7648 removed from `useNavigationOverlay`'s own doc block. That fix never reached this file: different file, different package, a block documenting a different symbol. With the three call sites (plugin-calendar / plugin-grid / plugin-tree) already going through the shared reader, this example was the last place in `packages/` still teaching the retired spelling, and an example is what the next call site is copied from. The example now resolves the record source through `resolveRecordSourceObjectName(schema, dataConfig)` from `@object-ui/core`, with `dataConfig` spelled as the live call sites spell it (`resolveRecordSourceConfig(schema)`), and defers to `useNavigationOverlay`'s own doc block for the rule rather than restating it — a ruling written out twice is a ruling one of whose copies rots, which is this card's whole defect class. `KNOWN_HAND_SPELLINGS` in `scripts/check-doc-example-shared-reader.mjs` carried this file as its one row; it is drained in the same change, as that ledger requires. Its pin in `scripts/__tests__/check-doc-example-shared-reader.test.ts` asserted the row's presence and the raw finding, so it is flipped to pin the drained state in both directions (ledger empty, and the instance gone from the pre-waiver `result.raw` rather than merely waived out of it). No executable line changes; the diff under `packages/` is a doc comment. 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
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Sep 9, 2026
…hared record source (objectui#7798) (objectstack-ai#7809) 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 objectstack-ai#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`. Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3 Co-authored-by: Claude <noreply@anthropic.com>
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 #7787
navigation-overlay.tsx's file-header block documentsNavigationOverlay, and its@examplestill taughtobjectName: schema.objectName— the exact spelling PR #7648 removed fromuseNavigationOverlay's own doc block. That earlier change never reached this file: different file, different package, a block documenting a different symbol. With the three call sites (plugin-calendar/plugin-grid/plugin-tree) already going through the shared reader, this example was the last place inpackages/still teaching the retired spelling — and an example is what the next call site is copied from.Two edits, in one PR, because neither is acceptable alone: edit 1 alone leaves the ledger naming a file whose defect is gone (the gate reddens on exactly that), and edit 2 alone silently erases the gate's only true positive.
Edit 1 — the prose (comment only)
packages/components/src/custom/navigation-overlay.tsx, file-header block:Two wording decisions, both made by reading rather than inventing — the defect class here is one ruling written out twice with one copy rotting, so the example defers to
useNavigationOverlay's doc block instead of carrying a second explanation of the ladder:dataConfigis spelledresolveRecordSourceConfig(schema)because that is what the live call sites write (ObjectCalendar.tsx:242,ObjectTree.tsx:359), and it is importable from the same@object-ui/coreas the reader. The hook's doc block spells this slotgetDataConfig(schema), which is a file-local helper inplugin-map/plugin-gridand is exported by nothing — teaching it from@object-ui/componentswould prescribe an import that does not exist.Edit 2 — the ledger row
scripts/check-doc-example-shared-reader.mjs— the wholeKNOWN_HAND_SPELLINGSentry naming this file is deleted, leaving the drained form the repo already uses elsewhere for an emptied ledger (check-entry-guard.mjs:287):One declared addition to the dispatched file surface
The dispatch named two files. A third had to move, and it is a mechanical consequence of edit 2 rather than a choice — reported here rather than made quietly:
scripts/__tests__/check-doc-example-shared-reader.test.tspinned the ledger row by name, in both directions:resultthere isanalyze(repoRoot)over this repository, so both assertions describe the pre-fix state. Measured, on the two mandated edits alone: 1 failed | 21 passed,AssertionError: expected [] to deeply equal [ Array(1) ]. The pin is flipped to assert the drained state in the same two directions — the ledger is empty, and the instance is gone from the pre-waiverresult.rawrather than merely waived out of it. That the gate still reaches this pair is already asserted a few tests above, whereuseNavigationOverlay.objectNameis named among the compared pairs.The same file's
## Rolloutprose in the gate script gained one sentence recording that the row is out, for the same reason this card exists.No judging logic changed —
analyze,canonical, the four narrowing conditions and every comparison in the gate are untouched. No executable line underpackages/*/srcchanged — thepackages/diff is a doc comment. Clause-②noholds; its void condition was not reached.Acceptance — the two readings
Run at
dde05b618(the shipping commit), working tree clean:1. Zero findings.
2.
KNOWN_HAND_SPELLINGSis empty.With the ledger empty,
findingsandrawcoincide, so the zero above is a zero before waiving, not after it.Lit control — the two greens are readings, not a gate that never arrived
The example was temporarily put back to
objectName: schema.objectNamewith the ledger left empty, on top of the committed fix so thatHEADcarries the implementation:The mutation was confirmed on disk before anything was read — by the injected/removed text counts and by a non-empty blob hash that differs from the HEAD blob (an empty hash was treated as failure, not as "nothing to compare"). The gate then went red and named the file:
Restored with
git checkout HEAD -- ABSOLUTE_PATHundertrap ... EXIT INT TERM, with the absolute path resolved fromgit rev-parse --show-toplevel. The proof is state, not that the trap fired:Changeset — the gate's verdict, verbatim
Before the changeset was added the same gate read
❌ 1 source file(s) of 1 released package(s) changed, and this change adds no changeset(exit 1), so the pass above is a reading too. The changeset is the empty-frontmatter form and declares that nothing ships.node scripts/check-changeset-no-major.mjs—✅ No changeset declares a major bump.Theskip-changesetlabel is deliberately not applied: in this repo that label reads nothing and exempts nothing.Everything else that was run, at
dde05b618pnpm check:doc-example-readersnpx vitest run scripts/__tests__/check-doc-example-shared-reader.test.tsnode scripts/check-changeset-presence.mjsnode scripts/check-changeset-no-major.mjspnpm check:control-bytespnpm check:doc-fencespnpm check:spec-symbolspnpm check:phantom-depsnpx turbo run type-check --filter @object-ui/components --concurrency=2The gate family was derived by hand from this repo's own
package.jsonand.github/workflows/ci.yml;scripts/pm/dispatch-gates.mjslives only in the siblingobjectstacktree and answers about that tree, so it was not used here.Lint, as a declared narrowing.
pnpm lintisturbo run lintacross every package and belongs to CI. What ran here isnpx eslint --no-inline-configover the three changed source files: exit 0, 3 files linted (count read from--format json, not assumed), 0 errors, 4 warnings — all four pre-existing. Linting the same file atorigin/mainreturns the same 4 warnings under the same rules, shifted by exactly the 15 lines this header grew (215/239/365/366becomes230/254/380/381). No type-aware linting is configured (noproject/projectService/parserOptionsineslint.config.js), so this diff cannot move the verdict on any file it does not touch. The.changeset/*.mdfile is not in eslint's population.Unrelated reds: none were observed in anything run above.
scripts/__tests__/check-readme-exports.test.ts— the half-built-tree red belonging to card #7460, which is in flight elsewhere — was not run, and nothing here touches its file.scripts/__tests__/check-doc-links.test.ts(the 15s shared-box timeout flake) was also not run.🤖 Generated with Claude Code
https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
Generated by Claude Code