Skip to content

fix(plugin-form,plugin-list,plugin-view,react): read SchemaRendererContext as declared, not through a cast to any (objectui#7209) - #10350

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-7209-schema-renderer-context-casts
Sep 24, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-7209-schema-renderer-context-casts

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7209
Clause-②: no

Every SchemaRendererContext type-erasing cast in the claim's four files is gone, so each of those reads sees SchemaRendererContextType exactly as @object-ui/react declares it. A read of a member the context does not declare (the objectui#7206 ctx.formValues ?? ctx.data shape) is now a compile error at each of them. No runtime value changes and no published type moves.

Dispatched by the domain:ui#1 seat (claim comment 5819439599). Implementing session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC.

⚠️ Angle brackets are spelled out in words below (for example "React.Context of any"), because GitHub strips tag-shaped fragments from PR bodies, even inside backticks.

Census at origin/main (dispatch Zone 2, step 1)

Base 7616d893. Widened to every useContext of SchemaRendererContext under any alias or cast, tests excluded: git grep -n -E "useContext\(\s*[A-Za-z]*SchemaRendererContext" over packages/*/src/*, apps/* and examples/*, plus every SchemaRendererContext as spelling and every Context of any. Control: the same pathspec returns 114 useContext( lines in 86 files, so the instrument is live.

That census finds six casts, not five:

site shape this PR
plugin-form/src/index.tsx, EmbeddableFormRenderer useContext(SchemaRendererContext as React.Context of any) removed
plugin-form/src/index.tsx, MasterDetailFormRenderer same removed
plugin-list/src/ListViewBlock.tsx, ListViewBlock same removed
plugin-view/src/index.tsx, module scope const SchemaRendererContext: React.Context of any = ImportedSchemaRendererContext removed: the alias is deleted and the import is used directly
react/src/element-data-source/ElementDataSourceGate.tsx, useResolvedDataSource React.useContext(SchemaRendererContext as React.Context of any) removed
react/src/hooks/useElementDataSource.ts, useElementDataSource useContext(SchemaRendererContext as Context of any), spelled with the bare imported Context removed in round 2 (a879ffe6), together with the now-unused Context type import

The card's other two sites are already gone at base. LookupField was repaired by edea22a5, and useCascadingOptions.ts has 0 hits.

What dropping each cast surfaced (step 2)

tsc --noEmit -p tsconfig.json per package, with every cast dropped and nothing else changed:

  • @object-ui/react: exit 0.
  • @object-ui/plugin-list: exit 0.
  • @object-ui/plugin-form, exit 2. src/index.tsx TS2322: "Type 'DataSource of any | null | undefined' is not assignable to type 'DataSource of any | undefined'." This is the EmbeddableForm dataSource={ctx?.dataSource} handoff.
  • @object-ui/plugin-view, exit 2. src/index.tsx TS2322: "Type 'DataSource of any | null' is not assignable to type 'DataSource of any'." This is the ObjectView dataSource handoff.

⭐ The Zone 2 assumption that "each error is a read of a member the context does not declare" is falsified at every site: 0 of 2. Both errors come from the DECLARED member dataSource: DataSource | null | undefined handing its null ("no adapter bound") to a prop that does not admit null. No undeclared-member read was hiding behind any of the five casts, because objectui#7206's retirement already removed the only one. So no provider search was needed, and there is no dead channel to remove or re-derive.

The fix at each surfaced error:

  • EmbeddableFormRenderer: the null collapses to undefined (ctx?.dataSource ?? undefined), exactly as MasterDetailFormRenderer in the same file already did. The runtime result is identical. EmbeddableForm only ever tests the adapter for truthiness. ElementDataSourceGate resolves its explicit value first and then the context through ??, so a null and an undefined explicit value are the same input.
  • ObjectViewRenderer: ObjectViewProps.dataSource is declared REQUIRED DataSource, and objectui#7842 ruled that widening it is a maintainer's call. That file is also fenced (open objectui#10283). The renderer passes null when no provider is mounted, and ObjectView's prop doc names this renderer as that null caller. Neither removal nor re-derivation is possible without that contract change, so under step 2's third branch a cast stays on this site. It is narrowed from the whole context to the one value: (ctx?.dataSource ?? null) as DataSource, with a comment. The context read itself now uses the declared type and is pinned. The passed value is byte-for-byte what it was. This is a judgement call, and it is raised for the seat in the report's open_questions.
  • Seat ruling, round 2 (Q2 = A): the narrowed value assertion stays. It crosses exactly one declared-null value into objectui#7842's required prop, and it carries a comment naming objectui#7842.

useResolvedDataSource's declaration is byte-identical (step 3)

  • Base leg: ElementDataSourceGate.tsx was put back to its base bytes (confirmed with git diff --quiet 7616d893 -- FILE, and the blob 2db3dd44 is base's). Declarations were then emitted fresh with tsc --emitDeclarationOnly --incremental false into a scratch directory.
  • Head leg: the same emission at head.
  • Result: element-data-source/ElementDataSourceGate.d.ts has sha256 73212725…4805305d on both legs, and cmp exits 0. The whole 67-file packages/react declaration tree compares equal under diff -r (exit 0). The file was restored with proof: blob 212f6039 equals HEAD, and git diff HEAD is empty.

Step 4: nothing user-visible

No dead read surfaced, so there is no behaviour to pin. The runtime values handed down are unchanged at all five sites.

Pins: one type-level leg per site

There are five files, one beside each touched source file:

  • plugin-form/src/__tests__/schemaRendererContextRead-7209.test.ts (2 sites);
  • plugin-list/src/__tests__/ListViewBlock.schemaRendererContextRead-7209.test.ts;
  • plugin-view/src/__tests__/objectViewRenderer.schemaRendererContextRead-7209.test.ts;
  • react/src/element-data-source/__tests__/useResolvedDataSource.schemaRendererContextRead-7209.test.ts;
  • react/src/hooks/__tests__/useElementDataSource.schemaRendererContextRead-7209.test.ts (round 2).

Why a ts.Program leg rather than the @ts-expect-error the dispatch gave as an example. Each context value lives in a local inside its renderer. Nothing a test can import carries that value's type, so a directive in a test file stays satisfied when the cast is restored at the site. getTypeAtLocation on the hook call itself is the instrument that sees the cast. This follows the shape record-details.hideFieldsUncast-9965.test.ts established. No per-site pin followed the LookupField repair in edea22a5: that commit pinned the context type itself (SchemaRendererContext.dataSourceType.pin.test.ts), not the read sites.

For each site, the pin checks:

  • The read carries the declared type. The hook call's type equals the declared value type, which is derived from @object-ui/react's own SchemaRendererContext export in the same program and never written down. It must not be any.
  • PROBE. formValues, the member objectui#7206 retired, is not readable off the value: no property, no index signature, not any.
  • LIT CONTROL. dataSource reads at its declared type.
  • CALIBRATION. The same call with a cast planted back IN MEMORY reads any, so every verdict above is one this instrument can reach.
  • Locator. The site is located by its declaration NAME and must hold exactly one such read. Zero or two reads throw instead of passing.

The program resolves @object-ui/react, @object-ui/types and @object-ui/core to source, because test shards build nothing. It is built at module scope (import phase, not bounded by a test timeout), with parsed files shared between the real and the planted program. Run alone, one file imports in about 5 s. 29 tests across the five files, all green.

Ablation, with on-disk proof (committed first; ablation-replace.mjs, wrap mode, restore by trap)

A: the card's shape. The EmbeddableFormRenderer cast was restored in plugin-form/src/index.tsx (anchor 1 to 0, replacement 0 to 1, blob 059806a7 to f8d4d505).

  • Result: Tests 3 failed | 6 passed. Exactly that site's three rows went red. MasterDetailFormRenderer and the calibration rows stayed green.
  • The failing assertion was "isAny": false expected, true received, and "type": "SchemaRendererContextType | null" expected, "any" received.
  • Restored: blob 059806a7 equals HEAD, and git diff HEAD is empty.

B: the alias shape, which the in-memory calibration does not cover. The module-level alias was restored in plugin-view/src/index.tsx (blob d70dbed3 to bf3b7660).

  • Result: Tests 3 failed | 2 passed, with the same three rows red.
  • Restored: blob d70dbed3 equals HEAD, and git diff HEAD is empty.

The observed red is a failing test assertion, not an unused @ts-expect-error, because the pin is a program leg. The harness reads source directly, so no build or dist/ sits between the mutation and the verdict.

Verification

On e44132f6 (the implementation commit):

  • pnpm exec vitest run packages/plugin-form/ packages/plugin-list/ apps/console/src/__tests__/public-block-binding-reach.test.tsx: Test Files 200 passed (200), Tests 2159 passed | 1 skipped.
  • pnpm exec vitest run packages/plugin-view/: 45 files, 409 passed.
  • pnpm exec vitest run packages/react/: 93 files, 1173 passed.
  • Narrowed lint, since the repo-wide scan belongs to CI:
    • Population: the 8 changed .ts/.tsx files. eslint --format json reports all 8 as linted, none ignored: 0 errors. Every warning belongs to a pre-existing class in the touched files (react-refresh/only-export-components, no-explicit-any).
    • Invariance: eslint.config.js enables no type-aware linting (no parserOptions.project or projectService), and no local rule under eslint-rules/ reads the filesystem. So this diff cannot move a verdict on an untouched file.

On 49a5e86d (the head, after merging origin/main 31938f01; the merge touched none of this PR's files):

  • turbo run build of the dependency closure: 15/15.
  • type-check (both tsconfigs) exits 0 for @object-ui/react, plugin-form, plugin-list, plugin-view, plugin-detail and plugin-grid. The last two import useResolvedDataSource. --listFilesOnly confirms each touched package's test tsconfig compiles its new pin.
  • The 4 pins plus 4 neighbours (public-block-binding-reach, ObjectView.dataSourceContextFallback-7842, EmbeddableForm, ElementDataSourceGate): 8 files, 120 passed.
  • These gates all exit 0: check:control-bytes, check:new-line-citations (0 new), check-changeset-presence, check:changeset-claims, check-changeset-no-major, check-changeset-fixed, check-changeset-overwrite, check-test-path-roots, check-vi-mock-override-shape, check:phantom-deps, check:element-data-source-declaration, check:self-import, check:esm-specifiers, check:unreferenced-sources, check-type-check-coverage, check-lint-coverage. check-governed-queue-guard --test over the 9 paths reports NOT GOVERNED.
  • NOT MEASURED on 49a5e86d: the full package suites above were not re-run after the merge, because they ran on e44132f6 and the merge touched none of this PR's files. CI runs them on this head.

Round 2 (a879ffe6, on origin/main 1f8ef0a8)

The seat widened the claim surface to the sixth site (Q1 = A).

  • Change: the sixth cast and its now-unused Context type import are gone.
  • Measured on disk: the hook call's type moves from any to SchemaRendererContextType | null, with 0 diagnostics in the packages/react program.
  • Type-check: type-check (both tsconfigs) exits 0 for @object-ui/react and for @object-ui/components, its only importer outside react.
  • Pin: react/src/hooks/__tests__/useElementDataSource.schemaRendererContextRead-7209.test.ts, 5 rows.
  • Ablation: restoring the cast and the Context import on disk gives Test Files 1 failed | 4 passed (5) and Tests 3 failed | 26 passed (29) across all five pin files; only that site's three rows go red. After restoring, blob 4a01194c equals HEAD and git diff HEAD is empty.
  • Declarations: the whole 67-file @object-ui/react declaration tree is byte-identical between origin/main and head (diff -r exit 0; useElementDataSource.d.ts sha256 6d4d0b30…54d653a6 on both). Lit control: a planted dataSource?: string does show in that diff.
  • Suites: packages/react/ suites plus the pins give 97 files, 1197 passed.
  • Changeset: it now names six sites.

Changeset

.changeset/7209-schema-renderer-context-read-as-declared.md declares patch for @object-ui/plugin-form, @object-ui/plugin-list, @object-ui/plugin-view and @object-ui/react. It is type-only: no runtime value changes anywhere.

Acceptance notes

  • The sixth site, react/src/hooks/useElementDataSource.ts, was fixed in round 2. See 「Round 2」 above.
  • check:changeset-claims asked for one read. .changeset/object-view-unmirrored-keys-7779.md names plugin-view/src/index.tsx as the file that registers the object-view renderer. I re-read that paragraph: it is still true, because the registration is unchanged.
  • The pin harness appears once per package. Each copy stays inside its own package. A single class-wide guard, reading every useContext of this context under packages/*/src as declared, would also catch sites nobody has written yet. It is not built here: it lies outside the fence, and a new guard is the seat's call.

Generated by Claude Code

…ntext as declared, not through a cast to any

Five reads of the renderer context erased SchemaRendererContextType: four
`useContext(SchemaRendererContext as React.Context<any>)` casts (the
embeddable-form and object-master-detail-form bridges, ListViewBlock,
useResolvedDataSource) and plugin-view's module-level re-declaration of the
imported context as `React.Context<any>`. Through them a read of a member the
context does not declare compiled clean - the mechanism behind the phantom
`ctx.formValues ?? ctx.data` channel objectui#7206 retired.

Every cast is gone. Dropping them surfaced no undeclared-member read; it
surfaced two places where the declared `null` (no adapter bound) met a prop
that does not admit it:

- embeddable-form handed it to EmbeddableForm's optional `dataSource`; it now
  collapses to `undefined`, as object-master-detail-form already did.
  EmbeddableForm only tests the adapter for truthiness.
- object-view hands it to ObjectViewProps.dataSource, declared REQUIRED and
  kept so (objectui#7842). That single value now carries a narrow, commented
  assertion instead of the whole context being erased.

No runtime value changes. useResolvedDataSource's emitted declaration is
unchanged.

Each site is pinned by a ts.Program leg in its own package that reads the
hook call's type, calibrated by planting the cast back in memory.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 1 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/object-view-unmirrored-keys-7779.md

  • names plugin-view/src/index.tsx → packages/plugin-view/src/index.tsx — edited by this change

    What was measured. Every reading was taken on the object-view node renderer (packages/plugin-view/src/ObjectView.tsx, registered by plugin-view/src/index.tsx) with schema.objectName / schema.layout as the positive controls of the same schema.KEY query, so each zero is a reading; the repo-wide census of viewTabBar finds the key in no source file outside @object-ui/types (two doc tables listed it as authorable and are corrected here). The spec side was read through the installed pin (@objectstack/spec@17.2.0, ui entry, 117 exported object schemas walked; control keys objectName / columns / navigation / listViews hit): the three spec-modelled keys are optional slots on ListViewSchema and ObjectListViewSchema; the six local keys have no spec slot anywhere.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with cff4b7754 (merge-base with origin/main): 10 file(s) changed outside .changeset/, read against 1328 pending declaration(s) that publish a body (1901 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3040.7 KB 3104.5 KB
Main entry chunk (gzip) 147.9 KB 350 KB
Entry file index-DqBO2p8P.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 541.41KB 129.42KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 222.47KB 61.83KB
fields (index.js) 253.70KB 64.09KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.22KB 2.26KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 33.36KB 10.88KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.15KB 11.05KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 14.81KB 3.63KB
plugin-calendar (index.js) 51.44KB 14.62KB
plugin-charts (index.js) 71.84KB 20.13KB
plugin-chatbot (index.js) 198.27KB 47.18KB
plugin-dashboard (index.js) 133.06KB 35.21KB
plugin-designer (index.js) 216.12KB 44.37KB
plugin-detail (index.js) 260.65KB 67.82KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 146.34KB 37.47KB
plugin-gantt (index.js) 167.99KB 41.37KB
plugin-grid (index.js) 215.46KB 58.88KB
plugin-kanban (index.js) 49.30KB 15.39KB
plugin-list (index.js) 113.90KB 28.11KB
plugin-map (index.js) 21.74KB 7.07KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.68KB 8.95KB
plugin-tree (index.js) 10.56KB 3.71KB
plugin-view (index.js) 85.79KB 21.34KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 110.46KB 36.33KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.78KB 2.56KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.20KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

The sixth type-erasing cast of this class: `useElementDataSource` read the
context through `useContext(SchemaRendererContext as Context<any>)`, spelled
with the bare `Context` type imported from react, which the first census
(keyed on `React.Context`) did not match. The cast and the now-unused
`Context` type import are gone; the hook call now carries
`SchemaRendererContextType | null`. Nothing else in the react program moves
(0 diagnostics), and no runtime value changes.

Pinned beside it by the same ts.Program harness as the other five sites;
the plugin-form pin's sibling list and the changeset now name it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3041.7 KB 3104.5 KB
Main entry chunk (gzip) 148.3 KB 350 KB
Entry file index-DlJ3-vk3.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.52KB 3.45KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 541.42KB 129.43KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 222.47KB 61.83KB
fields (index.js) 253.70KB 64.09KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 34.99KB 11.45KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.15KB 11.05KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.08KB 3.95KB
plugin-calendar (index.js) 51.44KB 14.62KB
plugin-charts (index.js) 71.84KB 20.13KB
plugin-chatbot (index.js) 198.27KB 47.18KB
plugin-dashboard (index.js) 133.06KB 35.21KB
plugin-designer (index.js) 216.12KB 44.37KB
plugin-detail (index.js) 260.65KB 67.82KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 146.34KB 37.47KB
plugin-gantt (index.js) 168.31KB 41.45KB
plugin-grid (index.js) 215.46KB 58.88KB
plugin-kanban (index.js) 49.30KB 15.39KB
plugin-list (index.js) 114.13KB 28.14KB
plugin-map (index.js) 21.74KB 7.07KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.68KB 8.95KB
plugin-tree (index.js) 10.56KB 3.71KB
plugin-view (index.js) 85.79KB 21.34KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 110.46KB 36.33KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.78KB 2.56KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.20KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 24, 2026 19:48
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 3ed3eec Sep 24, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-7209-schema-renderer-context-casts branch September 24, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant