Repository navigation
fix: retire the view-level provider: 'api' readers (objectui#12325) - #12361
Conversation
@objectstack/spec retires the view-level `api` data source (objectstack#23082, ADR-0049). Delete every objectui reader of a ViewData `api` block: resolveDataSource's arm, ViewDataProvider's arm, useViewData's keying, ObjectGantt's adapter inputs / drawer / refresh branches, ListView's gantt stand-down, and the calendar and map "not yet implemented" branches. ApiDataSource stays a class for code-built use (the approvals inbox). Flipped pins assert the new meaning. Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB Co-authored-by: Claude <noreply@anthropic.com>
…objectui#12325) The object-gantt / object-grid "parse authors no default" pins rode on the api arm's read.method default, which does not compile against @objectstack/spec main (TS2352). They now ride on navigation's defaults. Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ 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
|
Contract reviewServed-tier: Inputs read: card #12325 (body and all 9 comments, the ruling ① Derived judgmentsPublished-surface reach first: no
② Semver levelChangeset
Under the policy no entry could be ③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #12325
Clause-②: no
The view-level
provider: 'api'data source is retired in@objectstack/spec(objectstack-ai/objectstack#23082 ruling C, PR objectstack-ai/objectstack#23160). Per the maintainer's ruling A on the card (comment 6163115077), this deletes every objectui reader of a ViewDataapiblock now, while objectui still resolves spec18.0.0-next.0, and keeps the approvals inbox's code-builtApiDataSource.What changed
@object-ui/coreresolveDataSource: theapiarm is gone. Anapiblock is an unknown provider and gets that answer (the fallback, elsenull).ResolveDataSourceOptionslosesfetch/defaultHeaders, which only that arm read.ApiDataSourcestays a class; its docblock and its missing-config error now nameApiDataSourceConfig, not ViewData.@object-ui/coreViewDataProvider(file-surface extension, see below): theapiarm,resolveApi,extractRecordsandDataFetcher.fetchUrlare gone; anapiconfig resolves asUnknown data provider: api.@object-ui/reactuseViewData: noapikeying and noapiFetchthreading.@object-ui/plugin-ganttObjectGantt: noapiadapter input, noapiFetchdependency, the drawer's real-record fetch and the refresh button no longer branch onapi.@object-ui/plugin-listListView:ganttOwnsData(true only for a gantt with anapiblock) and the matching skeleton branch are deleted, so such a view fetches its bound object like any list.@object-ui/plugin-calendar/@object-ui/plugin-map(file-surface extension): theirdataProvider === 'api'branches, which only warned "not yet implemented", are deleted.content/docs/plugins/plugin-gantt.mdxandplugin-map.mdxsections that prescribed or described theapiarm, the core adapters README, the gantt README, theViewDatadocblock in@object-ui/types, and the approvals source's docblock..changeset/12325-retire-api-view-data.md(minorfor the breaking packages, per the no-major rule).File-surface extensions (bounded in-place fixes, same defect class)
The claim names
packages/core/src/adapters/,useViewData.ts,ListView.tsx,ObjectGantt.tsx,packages/types/src/and the docs. Measurement found more readers of the same retired arm, so these were edited too, each a mechanical deletion of the same kind:packages/core/src/data-scope/ViewDataProvider.ts(a second ViewData union with its ownapiarm; not caught by aprovider === 'api'grep because it is acase 'api').packages/plugin-calendar/src/ObjectCalendar.tsxandpackages/plugin-map/src/ObjectMap.tsx:dataProvider === 'api'(capital P, so the PM's case-sensitive grep missed them). Against specmainthese are TS2367 once core compiles; the gate's run 38513810543 never reached them because@object-ui/core's build failed first.packages/types/src/__tests__/object-gantt-properties-bag-10859-b6.test.tsandobject-grid-properties-bag-11276.test.ts: the TS2352 errors of A2. Their "the parse authors no default" pins rode on theapiarm'sread.methoddefault; they now ride onnavigation's defaults (spec row writesmode: 'page', this face writes nothing).apps/console/src/services/approvalRequestsDataSource.ts: docblock only.Pins flipped (each asserts the new meaning)
resolveDataSource.test.ts: anapiblock builds noApiDataSourceand is answered exactly like an unknown provider.ViewDataProvider.test.ts: anapiconfig resolves toUnknown data provider: apiand fetches nothing.useViewData.test.tsx: anapiblock falls back to the context DataSource and requests its URL through neitherapiFetchnor global fetch.ObjectGantt.apifetch.test.tsxrenamed toObjectGantt.retiredApiProvider-12325.test.tsx: thereadURL is requested through neither channel; with a context DataSource the chart queriesschema.objectName.ObjectGantt.test.tsx: the api read/write-back case is removed, pointing at the file above.recordSourceInputs-10394.test.tsx(gantt),index.recordSourceInputs-10394.test.tsx(map),ListView.test.tsx: flipped to the retired meaning.ObjectGantt.emptyHostData-7333.test.tsx: the host-array cases now use the bound object as the own source.ObjectGantt.discardedReloadIdentity-10036.test.tsx: the discard pin moves fromapitovalue(the constructing provider that remains); the "host swapsapiFetch" case is removed becauseapiFetchis no longer an adapter input. The mount baseline is measured rather than assumed (see Acceptance notes).Verification (head
93d4323)@objectstack/specfrom objectstackb5b1bf7277d6(contains the retirement;VIEW_DATA_API_PROVIDER_RETIREDpresent indist/ui/index.js), packed, injected withnode scripts/spec-main-shape-gate.mjs inject, thenTURBO_FORCE=true pnpm type-check --continue --concurrency=2: 80 of 81 tasks green, the one red being@object-ui/types(the two TS2352 test casts). After the types-test fix,@object-ui/types+@object-ui/plugin-gantttype-check: 15/15 green on the same injected spec, and the two types test files 193/193 green there. Install then restored withpnpm install --frozen-lockfile --force(marker gone, retirement string 0 hits).18.0.0-next.0): type-check of core, react, types, plugin-gantt, plugin-list, plugin-calendar, plugin-map: 22/22 tasks green; types + plugin-gantt re-run after the last commit 15/15.approvalRequestsDataSource*.test.*, 4 files) plus neighbouringapipins (ApiDataSource, record-source neutrality, ObjectView protocol keys, tree inputs, grid data contract, ListView 7477) green; earlier whole-package runs of plugin-gantt, plugin-map, plugin-calendar green.ResolveDataSourceOptions: passing{ fetch: undefined }fromObjectGanttgives TS2353 against the rebuiltdist(whose.d.tshas nofetch); restored, hash equals HEAD,git diff HEADempty.check:spec-floors: 1, the known unrelated "scan collapsed" red carried by objectui#12334..ts/.tsxfiles (count fromeslint --format json): 0 errors. The config enables no type-aware linting, so this diff cannot change any untouched file's verdict.Acceptance notes
provider: 'api'is not refused by objectui at runtime: under spec18.0.0-next.0it parses, and the renderers answer it as an unknown provider (gantt anduseViewDatafall back to the context adapter andobjectName; map and calendar draw nothing). The refusal lands with the spec pin bump, whereViewDataSchemarejects it. Measured: no objectui metadata writesprovider: 'api'.valuegantt reads its items more than once while mounting (measured in the moved 10036 pin). Pre-existing and unrelated to this change; the pin measures its baseline instead of hard-coding one.SchemaRendererContext.apiFetch's docblock andpackages/react/README.mdstill say it servesprovider: 'api'view data (it still serves other channels);ConsoleShell.tsx,createAuthenticatedFetch.tsandpackages/auth/README.mdcomments likewise; theDataSource required for object/api providerserror text (pinned by the schema-catalog render test); theplugin-griddatainput description, which still lists{ provider: "api", read, write }.provider: 'api'through the spec (gridDataInputContract,objectTreeInputs-11168, the two types probe lists) will need flipping at the spec pin bump; they are not readers.content/docs/plugins/plugin-calendar.mdxlists theapiconfig among shapes the calendar refuses; still true, left as is.Session:
https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB(dispatched os-dev under thedomain:ui#2claim).Generated by Claude Code