Skip to content

finding(docs): the object-grid literal on objectos-integration.mdx:276 is a bare const, so ObjectGridSchema is never consulted — measured: annotating it turns objectui#7713's defect RED #7972

Description

@claude

Found by the objectui#7713 dev (PM loop R44, domain:devx seat) while fixing that card. Filed unassigned, observation class; ⛔ NOT fixed in that PR — the card's scope fence is the example's filter value and the comment above it, and this is a different repair (an added type annotation and import). Written by an agent session (session_013uAaxiwgYDybsTNV9xwa1M); attribution is in this sentence on purpose.

Same class as objectui#7778 (plugin-gantt.mdx's four bare object-gantt literals) and objectui#7840, on a page neither names.

What

content/docs/guide/objectos-integration.mdx:276 declares its object-grid example as a bare literal:

const schema = {
  type: 'object-grid',
  objectName: 'contact',
  dataSource,
  filter: [ ... ],
  sort: [ ... ]
};

No type annotation, no doc-snippet: fragment marker. The block IS compiled by check:doc-snippets — but with nothing to check the keys against, so ObjectGridSchema is never consulted.

The measurement that makes this concrete

objectui#7713 was exactly a wrong-shaped filter on this block, and check:doc-snippets was GREEN on it for the whole interval. Two controls, both run on this tree:

  1. The block is compiled (so greenness was not "uncovered"): injecting dataSource: zzzUndefinedIdent, on line 278 turned the gate RED — content/docs/guide/objectos-integration.mdx:278:15 TS2304, Semantic phase: 477 of 477 block(s) judged, 1 failed.
  2. The annotation would have caught the defect: adding import type { ObjectGridSchema } from '@object-ui/types'; and annotating the literal const schema: ObjectGridSchema = { — with the pre-fix and:-keyed object still in place — turned the gate RED with exactly one diagnostic:
content/docs/guide/objectos-integration.mdx:282:5  TS2353: Object literal may only specify
  known properties, and 'and' does not exist in type 'any[]'.

That one diagnostic is the whole finding: the annotation is the difference between a gate that reads the declared type and one that reads nothing. It also confirms every other key in the block (dataSource, objectName, sort) is already assignable, so the annotation costs nothing today.

Both mutations were restored and proved byte-identical to their base blob.

Population

content/docs carries 24 bare const schema = { literals across 12 pages, against 20 annotated const schema: TYPE = { across 9 — so this is a page-by-page ratchet, not a one-off. objectui#7778 covers the four on plugin-gantt.mdx; this card covers objectos-integration.mdx:276. The rest are unswept.

Suggested repair (docs only)

Add the type import and annotate the literal, exactly as packages/plugin-grid/README.md already does for its two object-grid examples (const schema: ObjectGridSchema = {). pnpm check:doc-snippets is the measurement.

⚠️ The honest ceiling, stated so nobody over-reads this: objectui#7927 measures that BaseSchema closes with [key: string]: any, so an annotation cannot catch a MISSPELLED key on a node schema. What it does catch is a key whose declared TYPE is wrong — which is the entire content of objectui#7713.

Related: objectui#7713 (the defect this would have caught), objectui#7778, objectui#7840, objectui#7927 (the ceiling), objectui#6143.


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

No one assigned

    Labels

    documentationImprovements or additions to documentationdomain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingpm:queuepriority:p3tooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions