Skip to content

The theme TYPE surface (Theme, ThemeMode, ColorPalette, …) still derives from @objectstack/spec/ui, which retired it — objectui cannot refresh its spec pin past 17.1.0 until this is re-homed or dropped, and the choice needs a ruling #5716

Description

@os-zhuang

Found while executing #5710 (session session_01EuPCi56cnGyykygi3z9w4m, PR #5713). That card removed the six value-level re-exports (the Console-Pin-Gate leg ruled on objectstack-ai/objectstack#10856). This card records the type-level half, which that ruling did not name and which no gate currently reddens — it detonates on objectui's next @objectstack/spec dependency refresh instead.

Measurement (objectstack origin/main95437e7 — no theme file remains under packages/spec/src/ui/)

Everything below compiles today only because objectui's installed pin is @objectstack/spec17.1.0, which still publishes the retired names. Against any spec release cut after objectstack-ai/objectstack#10695:

  • packages/types/src/theme.tsexport type { ColorPalette | Typography | BorderRadius | Shadow | ThemeMode | Theme } from '@objectstack/spec/ui' (6 statements) plus a local import type { Theme } feeding the ThemeDefinition alias: all TS2305.
  • packages/providers/src/types.ts:2import type { ThemeModeSchema } feeding ThemePreference = (typeof ThemeModeSchema)['_zod']['input'] | 'system': TS2305.
  • packages/providers/src/__tests__/spec-symbol-batch7.test.ts and theme-mode-spec-parity.test.tsxvalue imports of ThemeModeSchema (test-only, outside every bundle graph): import errors. The batch7 file's own comment declares this a designed tripwire: "if the spec retires Theme, this stops compiling and the rename is up for re-triage".
  • packages/types/src/index.ts:978export type * as UI from '@objectstack/spec/ui' re-exports whatever namespace the pin publishes (degrades silently rather than erroring, but the UI.Theme members consumers may rely on vanish).

Why this needs a ruling rather than a dev's judgment call

The maintainer retained objectui's theme SYSTEM (ThemeEngine, ThemeProvider, theme documents) while the spec dropped theme as a spec-owned contract entirely. ThemeEngine/ThemeProvider consume the Theme/ThemePreferencetypes, so the type surface cannot simply be deleted. The two shapes:

  • Localize: objectui assumes ownership of the theme document type (hand-write Theme + ThemeMode, authority = the last-published 17.1.0 pin the engine was actually built against). This is the type-level twin of the localization branch the objectstack#10856 ruling left untaken at the value level — it should not happen silently.
  • Shrink: reduce the retained engine surface to what its real consumers use and drop the rest of the type re-exports. Needs the consumer census first.

Until one is ruled, any objectui spec-pin refresh past the retirement breaks @object-ui/types and @object-ui/providers builds. Related retirement-era guards that will also trip on that refresh and get cleaned then: the ThemeModeSchema deny-list row in spec-ui-schema-reexports.test.ts (its ratchet is designed for exactly that moment).

Refs: #5710 · PR #5713 · objectstack-ai/objectstack#10485 · objectstack-ai/objectstack#10695 · objectstack-ai/objectstack#10856


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions