This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(plugin-map): drop the maplibre-gl@6 default import + gate type-check in CI (#2911) - #2915
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Jul 28, 2026
Closed
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>
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This was referenced Jul 28, 2026
Merged
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>
This was referenced Jul 30, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2911 (P1 + P2).
P1 — the one-line fix
maplibre-gl@6.0.0removed its default export (arrived via #2848, dependabot 2026-07-27), soObjectMap.tsx:31'simport maplibregl from 'maplibre-gl'has been a TS1192 error onmain. The binding was never used, so it is deleted rather than rewritten toimport * as.The issue left runtime behaviour explicitly unverified — that gap is now closed.
@vis.gl/react-maplibre(whichreact-map-gl/maplibrere-exports) does this incomponents/map.js:18:It self-loads the library when no
mapLibprop is passed, andObjectMappasses none. Browser-verified against thestore-locator-mapcatalog schema:maplibre-glmodule200 OK(+ its web worker)Mapclass presenttrue800x6003(matches the fixture's 3 stores).maplibregl-mapcontainertrueProbe 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 whatapps/console/src/main.tsxalready intends, where the plugin is registered lazily specifically to keepmaplibre-glout of the initial bundle.Also confirms the issue's open question:
react-map-gl@8.1.1peersmaplibre-gl: ">=1.13.0", so@6.0.0satisfies 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 —grepover.github/workflows/has no hits, andturbo buildonly checks types where a package'sbuildhappens to invoketsc. Reproduced on cleanmain:pnpm buildis 43/43 green whileplugin-map'stsc --noEmitexits 2.2.
pnpm type-checkis itself a false-green gate.turbosilently skips any package with notype-checkscript — 17 of 45 had none, so they read as passing because nothing ran. With P1 applied,pnpm type-checkreports 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 notype-checkscript. Counts below use thepathsoverride the type-checked packages already carry, so the TS6059rootDirnoise is excluded:runnertsconfig.jsonat all; importsDataSource/BatchTransactionOperation, which@object-ui/coredoes not exportplugin-formt()fallback-signature mismatchsiteLayoutProps/PageProps; needs.next/typesplugin-gridimportParsers.ts:352dead branchclitsup dts:truedoes not fail on theseplugin-viewRecord<ViewType,…>missing thechartkeylayout'component'compared against a union lacking itplugin-designerobject-uimoduleResolution=node10deprecatedplugin-ai/plugin-dashboard/plugin-reportThe 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 ownvite.config.tsalready 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 peerpathsoverride → 104 errors each to zero."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 notype-checkscript 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.Type CheckCI job — coverage guard first (instant, no install), thenpnpm type-check.Both halves proven red before being trusted
Coverage guard, all four failure modes:
type-checkscriptDEBTpackage gains the script but stays listedNOT_COMPILEDpackage gains atsconfig.jsontype-checkfrom a covered packageThe gate itself:
maplibre-glimport →pnpm type-checkexit 2,plugin-map:type-checkreports TS1192plugin-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 cachedpnpm build— 43/43pnpm test— 7841 passed, 24 skipped, 662 files, 0 failuresplugin-mapunit tests — 5/5 (note: thesevi.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 greenFollow-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-viewRecord<ViewType,…>missingchart— user-visible gap (chart view has no label/icon)runnerimporting two exports@object-ui/coredoes not have — likely broken at runtimeplugin-grid/importParsers.ts:352,layout) where a comparison can never be trueNote
lint.ymlisworkflow_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