Uh oh!
There was an error while loading. Please reload this page.
fix(types): remove the six retired @objectstack/spec/ui theme-schema re-exports (#5710) - #5713
Merged
Merged
Conversation
…re-exports (#5710) objectstack#10485 (ADR-0049, PR objectstack#10695) retired the spec's whole ui/theme.zod.ts module; the maintainer's ruling on objectstack#10856 (Options A + C) has objectui remove its six dangling imports first so the Console Pin Gate can build objectui against the framework tree. - zod/theme.zod.ts: drop the six spec imports, the six re-exports and their ...SchemaType helpers; drop ThemePreviewSchema's theme/mode props (their validators have no upstream successor; the kind itself is unregistered and held for triage as objectui#5647 — not decided here) - zod/index.zod.ts: drop the six names from the barrel, tombstone comment - theme.ts: drop the matching interface members; retire the stale "import ThemeModeSchema from the spec directly" guidance - spec-subschema-parity.test.ts: remove the six by-reference pairs (no referent left on either side); fold the #3494 pruning pin and the new whole-module retirement into one "retired names stay out of theme.zod" guard - phase2-schemas.test.ts: the retired-wrapper pin now attributes the refusal via the union discriminator instead of the retired ThemeDefinitionSchema - p2-spec-exports.test.ts: delete the ThemeModeSchema spec-liveness block (its referent retired upstream) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
This was referenced Aug 22, 2026
Contributor
✅ 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
|
os-zhuang
marked this pull request as ready for review
August 22, 2026 20:41
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 22, 2026
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 freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes#5710
What
Executes the objectui leg of the maintainer's ruling on objectstack-ai/objectstack#10856 (Options A + C, accepted verbatim 「接受所有」): removes the six dangling
@objectstack/spec/uitheme-schema imports frompackages/types/src/zod/theme.zod.ts—ColorPaletteSchema,TypographySchema,BorderRadiusSchema,ShadowSchema,ThemeModeSchema,ThemeSchema(re-exported asThemeDefinitionSchema) — whose upstream module the spec retired whole in objectstack-ai/objectstack#10485 (ADR-0049, PR objectstack-ai/objectstack#10695). The remove branch of "removes/localizes" is taken; no schema body is hand-written locally (rationale below). objectstack#10856 executes the Console pin bump after this lands — no pin is touched here.Why remove, not localize (measured)
The card anticipated localization "where an engine consumer still needs the shape". Measured on this tree: no engine consumer needs the runtime shape.
ThemeEngine/ThemeProviderconsume theTheme/ThemePreferencetypes (still resolved via the installed@objectstack/spec17.1.0 pin); repo-wide, zero non-test code imported any of the six validators from@object-ui/types. The only runtime consumers wereThemePreviewSchema'stheme/modeprops — a component kind proven unregistered (0 registry hits, 0 fixtures; recorded in #5647, which remains open and is not decided here) — and parity tests whose referent retired. Localizing would recreate, one repo over, the compatibility surface (Option B) the ruling explicitly declined, with no upstream authority left to derive from.Changes
zod/theme.zod.ts— the six spec imports, six re-exports, and their…SchemaTypehelpers deleted; header rewritten as the retirement record.ThemePreviewSchemaloses itstheme/modeprops: their validators have no upstream successor.BaseSchemais.passthrough(), so those authored keys now pass through unvalidated — tolerable only because nothing renderstheme-preview; the kind's own fate stays with finding:ThemeSwitcherSchema/ThemePreviewSchemaare the same dead component kind #5489 retires —theme-switcherandtheme-previeware registered by nothing either #5647, which remains open.zod/index.zod.ts— the six names leave the barrel (tombstone comment).theme.ts— the matchingtheme/modeinterface members removed (keeping them while zod cannot check them would be declared-without-enforcement); the stale "importThemeModeSchemafrom the spec directly" guidance replaced with the retirement record. The theme type re-exports (Theme,ThemeMode,ColorPalette, …) are deliberately untouched — see the follow-up finding below.__tests__/spec-subschema-parity.test.ts— the six by-reference pairs removed (no referent on either side); the [ci] scripts/ 在零 tsconfig 覆盖内:turbo type-check 从不检查 scripts/__tests__/*.ts——一批门禁 pin 测试自身无类型门 #3494 pruning pin and this retirement folded into one guard pinning all retired theme-schema names out ofzod/theme.zod.ts, so a local mirror cannot reappear without a ruling.__tests__/phase2-schemas.test.ts— the retired-wrapper pin's attribution control (ThemeDefinitionSchema.safeParse(themes[0])) left with that validator; the refusal is now attributed via the discriminated union's own error: every issue must sit on path['type'], proving the refusal hits the retired wrapper kind, not the fixture's theme document.__tests__/p2-spec-exports.test.ts— theThemeModeSchemaspec-liveness block deleted with a tombstone (its whole point was that the spec publishes the validator; it no longer does).@object-ui/typesminor (breaking semantics stated in the body, per the repo's version-alignment convention; never major).Verification
At
64e469a(this PR's head):pnpm --filter @object-ui/types build && type-check && lint && pnpm exec vitest run packages/types/— all green under the container verify lock: 43 test files / 474 tests passed, lint 0 errors,os-verify-lock: VERDICT command-exit 0.packages/**/apps/**sources for value-levelimport {…} from '@objectstack/spec/ui'of the six names reported 6 sites intheme.zod.ts+ 1 inp2-spec-exports.test.tsbefore this change and 0 after (2 remaining hits arepackages/providers/__tests__files — not in any bundle graph, deliberately left, see below). Builtdist/zod/theme.zod.jsnow imports onlyzodand./base.zod.js; the six names appear in dist only inside comments.origin/main95437e7, each name has 0 exports underpackages/spec/src/ui/while controlsPageSchema/FormViewSchemareturn live hits;packages/spec/src/ui/contains no theme file at all.export const ThemeModeSchema = z.enum([...])totheme.zod.ts(mutation confirmed on disk: marker grep count 1) turnedspec-subschema-parity.test.tsred (1 failed / 13 passed, exit 1) on exactly that name; after trap restore (marker count 0,git statusclean) the file is green again (14/14).check:spec-symbols✅,check:phantom-deps✅,check:esm-specifiers✅,check:control-bytes✅,check:self-import✅,check:action-forward-parity(exit 0),check-changeset-presence✅,check-changeset-fixed✅,check-changeset-no-major✅.pnpm type-check/pnpm test/pnpm lintacross all 40 packages was not run locally — the repo-wide grep for the six removed names shows zero consumers outsidepackages/types, so the affected-package run above is the superset for this diff; CI runs the full farm regardless.Deliberately out of scope (measured, filed separately)
packages/providers:src/types.tsreads(typeof ThemeModeSchema)['_zod']['input']type-only (erased at emit — cannot redden the pin gate), and two test files import the schema as a value (tests are outside every bundle graph). All three compile against the installed 17.1.0 pin and their own comments declare spec-retirement a re-triage tripwire. Re-homing the theme TYPE surface is an un-ruled decision — filed as a follow-up issue together withtheme.ts's type re-exports.packages/app-shell/src/views/metadata-admin/clientValidation.ts:590reads(await import('@objectstack/spec/ui')).ThemeSchemaat runtime — dangling against the framework tree but invisible to the pin gate (namespace property access, not a named import binding) and unreachable (themeis not a registered metadata type). Out of this card's fence (packages/app-shell/**); filed separately.content/docs/core/theme-schema.mdxfalsehoods are already held bycontent/docs/core/theme-schema.mdxteaches a schema that does not exist — six independent falsehoods, now including thetype: 'theme'kind #5489 retires #5648; no docs touched here (measured: no docs/examples reference the six removed names).Generated by Claude Code