Uh oh!
There was an error while loading. Please reload this page.
feat(types)!: retire ThemeSwitcherSchema / ThemePreviewSchema and ThemeUnionSchema - #5823
Merged
Merged
Conversation
…meUnionSchema (#5647) Retire the two remaining theme component kinds no renderer implemented — `type: 'theme-switcher'` / `type: 'theme-preview'` — and `ThemeUnionSchema`, which after objectui#5489 held only these two members. Inherited 2026-08-21 maintainer ruling (option B) on objectstack#10485, extended per the same-family default on identical evidence: zero ComponentRegistry registrations (202 keys enumerated, control `tooltip` -> 1), zero placeholder entries, zero fixtures (control `"type": "form"` -> 81). - packages/types/src/theme.ts: both interfaces removed, tombstone extended - packages/types/src/zod/theme.zod.ts: now an export-less tombstone module (kept importable for the spec-subschema-parity retired-names pin) - barrels: names removed from index.ts / zod/index.zod.ts; AnyComponentSchema no longer carries a theme member - phase2-schemas.test.ts: acceptance test converted to refusal pins for all three retired kinds, with a live-kind positive control on the same pipeline The theme SYSTEM (Theme document, ThemeEngine, ThemeProvider) is retained and untouched, as the same rulings require. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
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 23, 2026 13:41
Uh oh!
There was an error while loading. Please reload this page.
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#5647
Retires the two remaining dead theme component kinds —
ThemeSwitcherSchema(type: 'theme-switcher') andThemePreviewSchema(type: 'theme-preview') — together withThemeUnionSchema, which after #5489 held only these two members. The authority is inherited, not fresh: the 2026-08-21 maintainer ruling (option B) on the parent case, extended to these siblings on identical evidence per the standing same-family default (triage comment 5380592857 on the issue). This PR does not re-adjudicate; it re-measures.Evidence re-measured on current
main(ad404e0)The card's sweep, repeated with its positive controls on the same pipelines:
grep -rhoE "ComponentRegistry\.(register|registerLazy)\(\s*'[a-z0-9-]+'" packages/*/src→ 202 registered keys;theme-switcher→ 0,theme-preview→ 0, controltooltip→ 1.PROTOCOL_COMPONENTS/PALETTE_PLACEHOLDER_BLOCKS(packages/components/src/renderers/placeholders.tsx)."type": "theme-switcher"→ 0,"type": "theme-preview"→ 0, control"type": "form"→ 81.ThemeSwitcherSchema|ThemePreviewSchema|ThemeUnionSchemaoutsidepackages/types→ 0 hits repo-wide (code, docs, scripts, skills).AnyComponentSchemaimporters outsidepackages/types→ 0.Bound on the claim: in-repo consumers are measurable and are zero; consumers of the published
@object-ui/typesoutside this org are not measurable from here. This is a breaking narrowing for any external consumer of the removed names, declared in the changeset.What changed (worked example: PR #5650)
packages/types/src/theme.ts— both interfaces removed; the ThemeComponentSchema (type: 'theme') declares a component kind no renderer implements — dead surface, retire alongside objectstack's ThemeSchema authoring-surface retirement #5489 tombstone block extended to record the inherited retirement. The theme DOCUMENT vocabulary (Theme,ThemeMode,ColorPalette,THEME_MODES) is untouched.packages/types/src/zod/theme.zod.ts— both Zod objects,ThemeUnionSchema, and both…SchemaTypealiases removed. The module now exports nothing and stands as the tombstone; it is deliberately kept importable (export {}) because__tests__/spec-subschema-parity.test.tsdynamic-imports it to pin the retired spec-mirror names out of its namespace.src/index.ts,src/zod/index.zod.ts) — names removed with tombstone comments;AnyComponentSchemano longer carries a theme member.__tests__/phase2-schemas.test.ts— the declaration-pinning acceptance test converted to refusal pins:AnyComponentSchemanow REFUSEStype: 'theme','theme-switcher', and'theme-preview'(the exact fixtures the old acceptance tests proved valid), with a live-kind positive control (type: 'action') in the same test so a broken union cannot read as three successful refusals. The ThemeComponentSchema (type: 'theme') declares a component kind no renderer implements — dead surface, retire alongside objectstack's ThemeSchema authoring-surface retirement #5489 pin's discriminator-level attribution left with the union itself — no longer expressible, noted in the test..changeset/retire-theme-switcher-preview-5647.md—minorfor@object-ui/typesper the repo's version-alignment convention (breaking semantics stated in the body, never amajorin the fixed group), following refactor(types)!: retireThemeComponentSchema— thetype: 'theme'component kind no renderer implements #5650's changeset.Out of scope, untouched:
ThemeEngine,ThemeContext/ThemeProviderand their tests (explicitly retained by the ruling);content/docs(zero doc references existed to remove — the theme-schema page rewrite landed separately in #5809).Verification (all at 96ebb73, the head of this PR)
pnpm --filter @object-ui/types build— green (the package has no internal deps; deps closure is external only).pnpm --filter @object-ui/types type-check(all three tsconfigs incl. tests) — green.pnpm exec vitest run packages/types/— 46 files / 514 tests passed, including the parity pin against the tombstone module.@object-ui/types/zod—@object-ui/cli,@object-ui/plugin-view,@object-ui/plugin-map,@object-ui/plugin-list— type-checked green viaturbo run type-check(19/19 tasks, building their 15-package dependency closure first, incl.@object-ui/core,@object-ui/components,@object-ui/react). The remaining ~35 dependents of@object-ui/typesare compiled by CI; the identifier sweep above (zero external references to the removed names, zeroAnyComponentSchemaimporters) is the measured basis for that narrowing.Theme/ThemeMode/validateSchema→ green (exit 0). Probe deleted.type: 'theme-switcher'member toAnyComponentSchemain src — mutation confirmed on disk (MUTATION5647marker grep → 1); no build leg needed and none run, because the test imports../zod/index.zodsource-relative; run → exactly the retirement pin red (1 failed / 29 passed), direction as predicted; restored viagit checkoutfrom the committed branch, confirmed marker grep → 0; re-run green (30/30).check-changeset-presence✅ ("5 source file(s) of 1 released package(s) changed... declares 1 changeset(s)"),check-changeset-no-major✅ ("No changeset declares amajorbump."),check-control-bytes✅ ("OK (scanned 4844 tracked text file(s))"),check-doc-component-types✅ ("Every documented component type is registered." — against the shrunk declared set).check-doc-snippet-typeswas NOT run locally — it refuses without built dist for 8 further packages (incl.app-shell) and belongs to CI's fully built tree. Basis: its population is thecontent/snippet corpus; removed names incontent/→ 0 and kind literals → 0 (control:AppComponentSchema→ 2 files), and this diff touches nothing undercontent/, so no untouched snippet's verdict can move except via the removed names, which zero snippets reference.eslintfor@object-ui/typesexit 0 (0 errors). The edited test file carries 9 pre-existing unused-import warnings; the baseline onmaincarries 10 (this diff removes one, adds none).Concurrency note
Two sibling cards are in
packages/typesin flight (data-display.ts;objectql.ts+zod/objectql.zod.ts). No file overlap with this diff except the two barrels, which this card alone touches per dispatch; overlap resolution if any conflict appears: keep each card's own hunks.Generated by Claude Code