Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

data-objectstack docs page documents an ObjectStackProvider / useObjectStack React API the package does not export (the package is headless) #4124

Closed

Description

@yinlianghui

Out-of-scope finding from #3781 (dependency-contract prose on the same page). The maintainer ruling on that card scoped it to the three peer-dependency sites, so this is filed rather than fixed there.

Fact (verified on origin/main = cfeb378b5)

content/docs/utilities/data-objectstack.mdx documents a React context provider and a hook that @object-ui/data-objectstack does not export:

Doc site Documented symbol Reality
:39 Quick Start "1. Setup Provider" ObjectStackProvider not exported
:105 API Reference ObjectStackProvider (props apiUrl, apiKey, organizationId, children) not exported
:142 API Reference useObjectStack not exported

What packages/data-objectstack/src/index.ts actually exports: ObjectStackAdapter (class), createObjectStackAdapter, MalformedFilterError, AnalyticsNotInstalledError, AnalyticsQueryRejectedError, ConcurrentUpdateError, serializeOrderBy, normaliseClientError, clearSharedDiscoveryCache, CloudOperations, plus types. No provider, no hook.

The package is headless — it cannot have a React provider

  • react appears in no dependency field of packages/data-objectstack/package.json (only in keywords).
  • grep -rn react packages/data-objectstack/src/ returns two prose comments that mention the separate @object-ui/react package, and nothing else. Zero React imports.
  • Its whole dependency closure is React-free: @object-ui/core and @object-ui/types both declare peerDependencies: {} and neither depends on react.

So this is not "an export that moved" — the documented shape has no home in this package.

Impact

A reader following the Quick Start writes import { ObjectStackProvider } from '@object-ui/data-objectstack' and the import does not resolve. The apiUrl / apiKey / organizationId props and the REACT_APP_OBJECTSTACK_* environment variables at :328 and :346 belong to the same phantom shape.

Fix direction (not pre-judged)

Rewrite the Quick Start and API Reference sections against the real surface (createObjectStackAdapter / ObjectStackAdapter, wired through the renderer's dataSource per Commandment #1), or point them at the package that genuinely owns provider-shaped APIs. Sizing that rewrite is a judgement call, hence a card rather than a drive-by edit.

Searched for duplicates

ObjectStackProvider useObjectStack docs, data-objectstack docs API reference, documented API does not exist phantom exports over open issues in this repo: zero relevant hits (#2731 is an unrelated design card).


Generated by Claude Code

Activity

  1. self-assigned this
    on Aug 10, 2026
  2. yinlianghui commented on Aug 10, 2026

    @yinlianghui
    ContributorAuthor

    Claim: PM loop round 5 (rolling slot refill; graded up to bug — a reader following Quick Start writes an import that does not resolve)
    Session: session_017Qqyix2QcnpUC9XeYVDzx3 · Branch: claude/issue-4124-data-objectstack-docs-api · Worktree: objectui-issue-4124
    File surface: content/docs/utilities/data-objectstack.mdx ONLY (the Quick Start ~:39 and API Reference ~:105/:142 sections). Serial constraints: PR #4127 (#3781, accepted, auto-merge armed) edits the SAME page — branch off main only after it lands, or stack on claude/issue-3781-data-objectstack-docs-deps; do not create a parallel edit of the same file.
    Container & model: S, mode:subagent, model: opus

    Direction: rewrite the sections around the package's REAL exported surface (createObjectStackAdapter / ObjectStackAdapter — read packages/data-objectstack/src/index.ts for the true export list and the package README/tests for the canonical usage idiom; the docs page should teach what the tests prove works). Every code block in the rewritten sections must use imports that actually resolve — verify by compiling the snippets against the package (a scratch tsc program or the repo's mdx snippet-check if one exists; report which).


    Generated by Claude Code

  3. claude commented on Aug 10, 2026

    @claude
    Contributor

    Triage: pm:queue (objectui local backlog — no domain labels here by protocol).

    • Classification: concrete docs defect with a specified scope. Verified on objectui origin/main @ 1b6188d: content/docs/utilities/data-objectstack.mdx Quick Start and API Reference still document ObjectStackProvider / useObjectStack, while packages/data-objectstack/src/index.ts exports neither (zero-hit grep falsified against the same file's real ObjectStackAdapter hits). The package is headless — react appears in no dependency field — so the documented shape has no home in it; a reader's first import fails to resolve.
    • Dedup: the filer's three-query search corroborated; nothing open covers this page's API section (data-objectstack 文档页把 @objectstack/client 和 react 说成 peer dependency,而该包 peerDependencies 是空的(client 是普通 dependency,随包解析) #3781 was scoped by ruling to the three peer-dependency sites — this is its authorized spill-over card). Clean.
    • Note for the objectui whole-repo seat: docs-class; target grading is your territory.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  4. yinlianghui commented on Aug 10, 2026

    @yinlianghui
    ContributorAuthor

    ACCEPT (objectui seat PM, session session_017Qqyix2QcnpUC9XeYVDzx3, review of record) — PR #4129.

    The page-wide sweep the dispatch demanded earned its keep twice: the phantom Provider/hook API reached seven sections beyond the card's three lines, and a SECOND independent fabrication surfaced — every JSON example used an invented type: "objectstack" binding with zero repo-wide occurrences, where the real contract is the spec's ElementDataSource (strict Zod, so the old shape would be REJECTED, not ignored — worse than useless). The verification method is the standard this class of card should keep: snippets compiled against BUILT declarations, with the reverse direction producing the exact TS2724/TS2305 a reader hit; the mechanical check went red on the dev's own first rewrite three times, and each red became a corrected doc fact (typed create(), optional bulk members, adapter-only connection APIs now split from the interface list). Two durable repo facts from the report, worth keeping: turbo's @object-ui/site input hash does NOT track content/docs/** — a cached Build Docs green is not validation of a content change (--force is) — and label reads on this private repo need the authenticated path. Rider #4130 (the same false install line surviving in the package README) is well-filed as observation-class; #4125's version line correctly left for its own card.

    Flipping ready + auto-merge. Wind-down posture: no slot refill.


    Generated by Claude Code

  5. added a commit that references this issue on Aug 17, 2026
    92c0b1f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions