Skip to content

finding(docs): two doc blocks teach , a helper no package exports — and the #7652 gate cannot see it #7798

Description

@claude

Found while fixing objectui#7787 (the file-header @example in navigation-overlay.tsx). Measured, not fixed — out of scope for that card, which is fenced to one doc comment and one ledger row.

What is true today (measured on origin/main 445d94c36)

Two doc blocks prescribe, in a copyable @example line, a call to getDataConfig(schema):

file line block documents
packages/react/src/hooks/useNavigationOverlay.ts 213 useNavigationOverlay
packages/core/src/utils/record-source.ts 71 resolveRecordSourceObjectName

Both spell it the same way:

const dataConfig = useMemo(() => getDataConfig(schema), [schema]);

getDataConfig is exported by nothing. Measured: grep -rn "export function getDataConfig|export const getDataConfig|export { getDataConfig" packages/ returns zero rows. It survives as a file-local helper in exactly two components — packages/plugin-map/src/ObjectMap.tsx:135 and packages/plugin-grid/src/ObjectGrid.tsx:444 — while packages/plugin-calendar/src/ObjectCalendar.tsx:242 and packages/plugin-tree/src/ObjectTree.tsx:359 obtain the same value from the shared producer objectui#7632 published:

const dataConfig = useMemo(() => resolveRecordSourceConfig(schema), [schema]);

So a reader outside those two plugin files cannot write the line either block teaches: there is no module to import getDataConfig from.

Why it is a finding and not a filed defect

No runtime behaviour changes; both are comments. The cost is the class objectui#7652 measured and objectui#7787 is the last instance of — an example is what the next call site is copied from. This one is a step worse in one respect and better in another: the prescribed line does not compile for any new caller (so a copier notices), but the first thing a copier reaches for when it does not compile is a hand-rolled local copy of the ladder, which is precisely the five-way drift objectui#7632 was filed about.

Why the objectui#7652 gate cannot see it

check-doc-example-shared-reader.mjs needs its condition (a): the @example must call a symbol this repository exports. getDataConfig is exported by nothing, so the pair is never formed and the slot is never compared. The gate is correct to require that — comparing calls to non-exported and third-party names is what produces false positives — but it means this instance is outside its reach by construction, and no other gate reads it either. Confirmed as a reading, not an assumption: the gate runs green over this tree today with an empty ledger.

What a fix probably looks like, and the open question inside it

Pointing both examples at resolveRecordSourceConfig(schema) from @object-ui/core matches what two of the four live sites already do and is importable. But that is not obviously the whole answer, because objectui#7632 (closed) named five local getDataConfig copies and two of them are still here (plugin-map, plugin-grid). Whether those two are deliberate residue or a missed leg is not settled here and is not claimed either way — triage should decide whether the prose is corrected on its own or follows the two remaining components.

Refs: objectui#7787 (the sibling prose instance, fixed by PR #7797) · objectui#7652 (the gate) · objectui#7632 (the shared producer, and the five hand-copies it measured) · objectui#7627 (the shared reader).


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions