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

fix(plugin-map): drop the maplibre-gl@6 default import + gate type-check in CI (#2911) - #2915

Merged
os-zhuang merged 2 commits into
mainfrom
fix/2911-type-check-gate
Jul 28, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
fix/2911-type-check-gate

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Closes #2911 (P1 + P2).

P1 — the one-line fix

maplibre-gl@6.0.0 removed its default export (arrived via #2848, dependabot 2026-07-27), so ObjectMap.tsx:31's import maplibregl from 'maplibre-gl' has been a TS1192 error on main. The binding was never used, so it is deleted rather than rewritten to import * as.

The issue left runtime behaviour explicitly unverified — that gap is now closed. @vis.gl/react-maplibre (which react-map-gl/maplibre re-exports) does this in components/map.js:18:

Promise.resolve(mapLib || import('maplibre-gl'))

It self-loads the library when no mapLib prop is passed, and ObjectMap passes none. Browser-verified against the store-locator-map catalog schema:

probe result
maplibre-gl module fetched as its own lazy chunk, 200 OK (+ its web worker)
Map class present true
WebGL canvas 800x600
marker nodes 3 (matches the fixture's 3 stores)
.maplibregl-map container true
console errors none

Probe output was identical with and without the static import, so the removal has no observable effect. (Tiles render blank because this sandbox has no route to demotiles.maplibre.org — no request is recorded at all. Unrelated to the change.) This also matches what apps/console/src/main.tsx already intends, where the plugin is registered lazily specifically to keep maplibre-gl out of the initial bundle.

Also confirms the issue's open question: react-map-gl@8.1.1 peers maplibre-gl: ">=1.13.0", so @6.0.0 satisfies it.

P2 — why a day of green CI missed it

Two independent holes, and the issue's proposed fix only closes the first:

1. No workflow ran type-check. Confirmed — grep over .github/workflows/ has no hits, and turbo build only checks types where a package's build happens to invoke tsc. Reproduced on clean main: pnpm build is 43/43 green while plugin-map's tsc --noEmit exits 2.

2. pnpm type-check is itself a false-green gate. turbo silently skips any package with no type-check script — 17 of 45 had none, so they read as passing because nothing ran. With P1 applied, pnpm type-check reports 63/63 green while nine packages still have broken types. Adding the job as the issue proposed would have looked like a gate and covered nothing new.

The sweep the issue asked for

All 45 packages, tsc --noEmit. Every failing package was one with no type-check script. Counts below use the paths override the type-checked packages already carry, so the TS6059 rootDir noise is excluded:

package real errors note
runner 14 no tsconfig.json at all; imports DataSource / BatchTransactionOperation, which @object-ui/core does not export
plugin-form 10 6x identical t() fallback-signature mismatch
site 7 Next's generated LayoutProps/PageProps; needs .next/types
plugin-grid 4 importParsers.ts:352 dead branch
cli 4 tsup dts:true does not fail on these
plugin-view 3 Record<ViewType,…> missing the chart key
layout 2 'component' compared against a union lacking it
plugin-designer 1 unused binding
object-ui 1 TS5107 moduleResolution=node10 deprecated
plugin-ai / plugin-dashboard / plugin-report 0 clean — only ever lacked the script

The 104-error TS6059 floods were pure tsconfig shape, not source bugs: the type-checked packages override paths, which detaches workspace deps from sibling source and resolves them through built .d.ts. plugin-ai/plugin-report's own vite.config.ts already applies exactly this to their dts program (with a comment describing the trap); it was just missing from the tsconfig.

What this PR does

Per the issue's own "先清干净或配 baseline" — baseline, because it is 38 real errors across 7 unrelated packages, not one:

  • plugin-ai, plugin-report: tsconfig gains the peer paths override → 104 errors each to zero.
  • Seven packages gain "type-check": "tsc --noEmit" (plugin-ai, plugin-report, plugin-dashboard, create-plugin, console, + the two console examples — all already clean). Coverage 28 → 35 of 45.
  • scripts/check-type-check-coverage.mjs — the part that makes this permanent. A package with no type-check script must be declared with a reason, and the lists only shrink: gaining a script without deleting the entry fails the guard. The nine known-broken packages are recorded with error counts.
  • New Type Check CI job — coverage guard first (instant, no install), then pnpm type-check.

Both halves proven red before being trusted

Coverage guard, all four failure modes:

tampering result
new package with no type-check script exit 1
a DEBT package gains the script but stays listed exit 1 (ratchet)
NOT_COMPILED package gains a tsconfig.json exit 1
removing type-check from a covered package exit 1

The gate itself:

  • re-introducing the maplibre-gl import → pnpm type-check exit 2, plugin-map:type-check reports TS1192
  • a fresh type error injected into plugin-ai → exit 2. That package had no type checking whatsoever before this PR, so this is coverage that did not previously exist.

Forced uncached run (--force, 0 cached) to rule out a turbo-cache false green: 70/70, 52s.

Verification

  • pnpm type-check --force — 70/70, zero cached
  • pnpm build — 43/43
  • pnpm test — 7841 passed, 24 skipped, 662 files, 0 failures
  • plugin-map unit tests — 5/5 (note: these vi.mock('react-map-gl/maplibre'), so they do not exercise maplibre loading; that is what the browser probe above is for)
  • node scripts/check-changeset-fixed.mjs, node scripts/check-type-check-coverage.mjs — both green

Follow-ups (not fixed here, by design)

This PR deliberately does not bundle semantic fixes for 7 unrelated packages into a dependency fix. Filed separately, with the three likely-real bugs called out:

  • plugin-view Record<ViewType,…> missing chart — user-visible gap (chart view has no label/icon)
  • runner importing two exports @object-ui/core does not have — likely broken at runtime
  • two dead branches (plugin-grid/importParsers.ts:352, layout) where a comparison can never be true

Note

lint.yml is workflow_dispatch-only, so ESLint never runs on PRs either — an unused-import rule would not have caught this. Out of scope here; worth a separate decision.

🤖 Generated with Claude Code

…eck in CI (#2911)

maplibre-gl@6.0.0 removed its default export (#2848), so ObjectMap.tsx's
`import maplibregl from 'maplibre-gl'` has been a TS1192 error on main. The
binding was never used — the map comes from react-map-gl/maplibre and the CSS
from the side-effect import on the next line — so it is deleted outright.

Runtime-neutral: @vis.gl/react-maplibre does
`Promise.resolve(mapLib || import('maplibre-gl'))`, so it self-loads the
library. Browser-verified against the store-locator-map catalog schema —
maplibre-gl fetched as its own lazy chunk, canvas 800x600, all 3 markers
mounted, identical with and without the static import.

The error survived a day of green CI because no workflow ran type-check, and
`turbo build` only checks types where a package's build happens to invoke tsc
(the 22 vite-build packages do not). A sweep of all 45 packages found ten with
broken types.

`pnpm type-check` alone is not a gate: turbo silently skips packages with no
type-check script, so with plugin-map fixed it reports 63/63 green while nine
packages remain broken. Therefore:

- plugin-ai / plugin-report gain the tsconfig `paths` override their
  type-checked peers already carry (and their own vite dts program already
  applies), which is the sole cause of the TS6059 rootDir floods.
- Seven packages gain "type-check": "tsc --noEmit"; coverage 28 -> 35 of 45.
- scripts/check-type-check-coverage.mjs requires every uncovered package to be
  declared with a reason and only lets the lists shrink.
- New "Type Check" CI job runs the coverage guard, then pnpm type-check.

Both halves were proven red before being trusted: the guard in all four of its
failure modes, and the job against both the re-introduced maplibre-gl import
and a fresh error injected into plugin-ai — which had no type checking at all
before this change.

Refs #2911, #2848

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Jul 28, 2026 9:37am

Request Review

Corrects two notes while wiring the links. The plugin-grid TS2367 pair is not a
logic bug: `reason` is mutated only inside the `bump` closure, which TS's
control-flow analysis does not track, so it stays narrowed to its initialiser.
Runtime is correct and deleting the branch would silently disable the type gate.
And the layout error is a half-landed feature, not a dead branch — nav type
`component` is fully implemented in the renderer but absent from both
`NavigationItemType` and its zod enum, so the schema rejects it and authors
cannot declare one.

Refs #2911, #2916, #2917, #2918, #2919

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

❌ Console Performance Budget

Metric Value Budget
Main entry (gzip) ** KB** KB
Entry file `` —
Status FAIL —

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 8.20KB 2.97KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 7.57KB 2.97KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 22.10KB 4.37KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.12KB 3.41KB
auth (LoginForm.js) 17.86KB 5.29KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.43KB 2.09KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 35.76KB 9.11KB
auth (createAuthenticatedFetch.js) 4.37KB 1.69KB
auth (index.js) 2.25KB 1.01KB
auth (org-roles.js) 6.72KB 2.85KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.91KB 0.87KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 18.38KB 4.49KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 3.65KB 1.42KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.25KB 0.53KB
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) 449.62KB 97.73KB
core (index.js) 2.12KB 0.77KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 127.78KB 32.15KB
fields (index.js) 218.37KB 53.54KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.46KB 0.96KB
i18n (pickLocalized.js) 1.70KB 0.83KB
i18n (provider.js) 5.37KB 1.72KB
i18n (useObjectLabel.js) 25.17KB 5.80KB
i18n (useSafeTranslation.js) 3.26KB 1.44KB
layout (index.js) 38.45KB 10.67KB
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.74KB
mobile (index.js) 1.50KB 0.62KB
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) 4.42KB 1.27KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 1.77KB 0.77KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 6.84KB 2.42KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.00KB 1.23KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.55KB 0.71KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 44.90KB 12.35KB
plugin-charts (index.js) 57.26KB 16.24KB
plugin-chatbot (index.js) 179.93KB 42.67KB
plugin-dashboard (index.js) 109.60KB 28.33KB
plugin-designer (index.js) 210.56KB 42.56KB
plugin-detail (index.js) 214.86KB 52.39KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 103.47KB 25.10KB
plugin-gantt (index.js) 162.26KB 39.53KB
plugin-grid (index.js) 179.25KB 46.97KB
plugin-kanban (index.js) 47.82KB 13.18KB
plugin-list (index.js) 98.67KB 23.35KB
plugin-map (index.js) 16.80KB 5.24KB
plugin-markdown (index.js) 13.65KB 4.67KB
plugin-report (index.js) 37.07KB 9.81KB
plugin-timeline (index.js) 25.03KB 7.11KB
plugin-tree (index.js) 8.36KB 2.81KB
plugin-view (index.js) 85.68KB 20.85KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.55KB 0.67KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 3.19KB 1.38KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 18.70KB 6.09KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.00KB 0.55KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 2.16KB 0.94KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 0.77KB 0.41KB
types (disclosure.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 (index.js) 1.86KB 0.91KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 0.20KB 0.18KB
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 (spec-report.js) 5.04KB 1.93KB
types (system-fields.js) 2.39KB 1.17KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 0.75KB 0.46KB
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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 27.9 KB 350 KB
Entry file index-DGtYtfzH.js —
Status PASS —

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 8.20KB 2.97KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 7.57KB 2.97KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 22.10KB 4.37KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.12KB 3.41KB
auth (LoginForm.js) 17.86KB 5.29KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.43KB 2.09KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 35.76KB 9.11KB
auth (createAuthenticatedFetch.js) 4.37KB 1.69KB
auth (index.js) 2.25KB 1.01KB
auth (org-roles.js) 6.72KB 2.85KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.91KB 0.87KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 18.38KB 4.49KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 3.65KB 1.42KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.25KB 0.53KB
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) 449.62KB 97.73KB
core (index.js) 2.12KB 0.77KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 127.78KB 32.15KB
fields (index.js) 218.37KB 53.54KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.46KB 0.96KB
i18n (pickLocalized.js) 1.70KB 0.83KB
i18n (provider.js) 5.37KB 1.72KB
i18n (useObjectLabel.js) 25.17KB 5.80KB
i18n (useSafeTranslation.js) 3.26KB 1.44KB
layout (index.js) 38.45KB 10.67KB
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.74KB
mobile (index.js) 1.50KB 0.62KB
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) 4.42KB 1.27KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 1.77KB 0.77KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 6.84KB 2.42KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.00KB 1.23KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.55KB 0.71KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 44.90KB 12.35KB
plugin-charts (index.js) 57.26KB 16.24KB
plugin-chatbot (index.js) 179.93KB 42.67KB
plugin-dashboard (index.js) 109.60KB 28.33KB
plugin-designer (index.js) 210.56KB 42.56KB
plugin-detail (index.js) 214.86KB 52.39KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 103.47KB 25.10KB
plugin-gantt (index.js) 162.26KB 39.53KB
plugin-grid (index.js) 179.25KB 46.97KB
plugin-kanban (index.js) 47.82KB 13.18KB
plugin-list (index.js) 98.67KB 23.35KB
plugin-map (index.js) 16.80KB 5.24KB
plugin-markdown (index.js) 13.65KB 4.67KB
plugin-report (index.js) 37.07KB 9.81KB
plugin-timeline (index.js) 25.03KB 7.11KB
plugin-tree (index.js) 8.36KB 2.81KB
plugin-view (index.js) 85.68KB 20.85KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.55KB 0.67KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 3.19KB 1.38KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 18.70KB 6.09KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.00KB 0.55KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 2.16KB 0.94KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 0.77KB 0.41KB
types (disclosure.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 (index.js) 1.86KB 0.91KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 0.20KB 0.18KB
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 (spec-report.js) 5.04KB 1.93KB
types (system-fields.js) 2.39KB 1.17KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 0.75KB 0.46KB
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

@os-zhuang
os-zhuang merged commit 5b9cf96 into main Jul 28, 2026
14 checks passed
@os-zhuang
os-zhuang deleted the fix/2911-type-check-gate branch July 28, 2026 11:39
os-zhuang added a commit that referenced this pull request Jul 28, 2026
…s it (#2924)

The #2911 sweep recorded `@object-ui/site` as 7 errors of debt. Measured: it is
zero. The 7 TS2304 on `LayoutProps`/`PageProps`/`RouteContext` were entirely an
artifact of never having built it — `apps/site/tsconfig.json` includes
`.next/types/**/*.ts`, and those types only exist after `next build`. Run the
build first and `tsc --noEmit` is exit 0.

So site was never broken; it was miscategorised, and its phantom 7 inflated the
outstanding-error count by 28% (32 -> 25).

It also does not need a `type-check` script: `next build` runs a full type-check
unless `typescript.ignoreBuildErrors` is set, and the `docs` CI job runs that
build. Adding a script would just run the compiler twice — and would pull a Next
build into the Type Check job.

New `CHECKED_BY_OWN_BUILD` category records that, and — because
`ignoreBuildErrors` is precisely how such an exemption would silently rot into
the #2911 hole — verifies it rather than trusting it. Three failure modes, all
proven red before being trusted:

  - `ignoreBuildErrors: true` added to next.config.mjs  -> exit 1
  - site gains a `type-check` script (stale entry)      -> exit 1
  - build script changes out from under the exemption   -> exit 1

Recorded caveat, since it is a real cost/coverage call rather than an oversight:
the `docs` job runs the site build only when `apps/site/` or `content/` changed
(plus every push to main), so a PR touching only a package in
`transpilePackages` does not re-check the site until it lands.

No changeset: scripts-only, no published package changes.

Refs #2911, #2915, #2919

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
os-zhuang added a commit that referenced this pull request Jul 28, 2026
…ed packages, and fix the two runtime bugs hiding there (#2919) (#2936)

Closes the remaining `DEBT` entries from the #2911 sweep. Each package gains
`"type-check": "tsc --noEmit"` and loses its entry in the coverage guard;
coverage goes 36 -> 41 of 45, outstanding errors 25 -> 5 (only #2916 and
#2918 remain).

Two were real bugs, not type noise:

- cli: `objectui validate` could never report a validation failure. Zod 4
  removed `ZodError.errors`, so it read undefined and `.forEach` threw a
  TypeError that the enclosing catch reported as "Error reading or parsing
  schema file" — swallowing the errors the command exists to print. Now
  reads `.issues`.
- plugin-grid: grouping by a boolean column rendered the raw key
  `grid.booleanTrue`. That key exists in no bundle, and the English fallback
  was passed as a bare second argument, which the no-provider translator
  reads as an options object. Switched to the `grid.yes`/`grid.no` keys the
  cell renderer and BulkActionDialog already use, with `defaultValue`.
  Covered by a regression test confirmed to fail against the old code.

The rest are type-only and preserve runtime behaviour: `scorePair`'s
closure-mutated `let`s folded into one record so the TS2367 type gate narrows
correctly (gate unchanged), `SectionFieldsContext.fieldLabel` aligned with its
`@object-ui/i18n` producer (cleared six errors), `MasterDetailFormSchema.recordId`
widened to `string | number` with `String()` only at the batch-transaction
boundary, an explicit `fillPriority` for the optional `GridColumn.type`, an
unused parameter prefixed `_`, and a stale `@ts-expect-error` dropped.

vscode-extension migrates off the deprecated node10 `moduleResolution: "node"`
to `node16`; its count was under-reported as 1 because that TS5107 config error
masked four missing Node globals — `@types/node` added with an explicit `types`.

plugin-grid/plugin-form/plugin-designer gain the `baseUrl` + `paths` override
their type-checked peers carry (cli an empty `paths`), without which the
inherited root `paths` produce the spurious TS6059 noise described in #2915.

Verified by injecting a type error into each of the five: `pnpm type-check`
now fails for every one, which was impossible before.

Refs #2911, #2915

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
os-zhuang added a commit that referenced this pull request Jul 30, 2026
… and its zod enum (#2918) (#3039)

The renderers have carried a full `type: 'component'` implementation
(componentRef → /component/<ns>/<name>, params → querystring, metadata:*
special-cases), and @objectstack/spec has ComponentNavItem — but the
local vocabulary never gained the member. NavigationItemTypeSchema
rejected `type: 'component'` at validation time, so authors could not
declare one: the feature was dead on arrival rather than dead code.

- NavigationItemType + NavigationItemTypeSchema gain 'component';
  NavigationItem gains componentRef/params (declared in zod too, so
  parse no longer strips them), mirroring spec's ComponentNavItem.
- The `(item as any)` casts in the two renderer sites become typed.
- NavigationDesigner's exhaustive Record gains a component entry, with
  appDesigner.navTypeComponent in the designer fallback + 10 locales.
- layout gains "type-check" (src + tests via tsconfig.test.json, with
  the #2915 paths override); its DEBT entry is deleted — coverage is
  now 42/45.

Proof: navigation-model.test.ts validates a component item end-to-end,
resolveHref.test.ts covers the /component and metadata:* routing, and
AppSchemaRenderer.test.tsx renders one through the real sidebar.

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
os-zhuang added a commit that referenced this pull request Jul 30, 2026
…er (#2916) (#3040)

`ViewSwitcher`'s two exhaustive `Record<ViewType, …>` maps — `DEFAULT_VIEW_LABELS`
and `DEFAULT_VIEW_ICONS` — were each missing the `chart` key. `chart` is a member
of `ViewType` and `plugin-charts` is a registered view, so a chart tab rendered
with no icon at all and with its raw type key as the label, while every sibling
view showed a glyph and a capitalized name.

The label and glyph are not a fresh product call: `plugin-list`'s own switcher,
`app-shell`'s `ObjectView` and `CreateViewDialog`, and the
`console.objectView.viewTypeChart` translation already agree on `BarChart3` and
`'Chart'`, so adopting them makes the switcher stop disagreeing with the rest of
the UI. An explicit per-view `label`/`icon` still overrides the default.

Why the compiler never caught a hole in a map whose whole purpose is to be
exhaustive: `@object-ui/plugin-view` had no `type-check` script, so CI never
evaluated `Record<ViewType, …>`. The package now type-checks its sources
(`tsc --noEmit`) and, chained off the same script, its tests
(`tsconfig.test.json`) — and its `DEBT` entry in
`scripts/check-type-check-coverage.mjs` is deleted, as that guard requires once
the gap closes. Reverting either `chart` entry now fails the build, which is how
this fix was verified rather than assumed.

The package's third reported error is fixed too: `ViewTabBar` typed the drag
listener bag as a hand-written `Record<string, (...args: any[]) => void>`, a
structural fork of a type `dnd-kit` already exports. It now uses
`DraggableSyntheticListeners`, so the fork cannot drift again.

Compiling the tests for the first time surfaced two real findings. Three
`renderListView` spies destructured a `listSchema` they never read (every
assertion reads the schema off `mock.calls`); they now take `_props`, matching the
argless spies already in that file. And the test program pulls in
`ObjectView.tsx`, which gates a spec-compliance warning on `process.env.NODE_ENV`
— so `tsconfig.test.json` names `node` alongside `@testing-library/jest-dom`,
exactly as `plugin-report` (the other package whose source reads `process.env`)
already does.

New `ViewSwitcher.test.tsx` covers the user-visible half the type gate cannot:
that every `ViewType` renders a label and an icon, that `chart` reads "Chart"
rather than falling back to its type key, and that an explicit label/icon still
wins. Both regression tests fail with either `chart` entry removed.

Refs #2911, #2915

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

1 participant