From da50609e0126a4463aeaf2a57e72d5833aff27f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 02:17:57 +0000 Subject: [PATCH] feat(types,mobile)!: retire the MobileOverrides type and its mount point (#4919) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `MobileOverrides` published a six-key mobile override surface — including a three-value `navigation` vocabulary — from `@object-ui/types` and, re-exported, from `@object-ui/mobile`. Nothing read any of it: measured on current `main` the type had exactly four mentions repo-wide (declaration, the single `MobileComponentConfig.mobileOverrides` mount point, two barrel re-exports), and a sweep of the example apps and the `objectstack` sibling checkout found zero authors. All three `navigation` values were spellings of the same no-op. Removed rather than narrowed (the #3985 lineage's "narrow to the implemented values" rule terminates in deletion when the implemented set is empty), and removed rather than `?: never`-tombstoned: a tombstone in this package steers authors to a named live replacement (`confirm` -> `confirmText`; `hoverable`/`striped` -> `data-table`), and there is no successor here. Same zero-pull, no-successor shape as the retired `AccordionItem.icon` (#4652) and `ToggleGroupItem.icon` (#4632), which were removed outright. Runtime behaviour is unchanged; what changes is that the contract stops claiming otherwise, so authoring the key becomes a compile-time error instead of a silent no-op. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m --- .changeset/4919-retire-mobile-overrides.md | 46 ++++++++++++++++++++++ packages/mobile/src/index.ts | 1 - packages/types/src/index.ts | 1 - packages/types/src/mobile.ts | 36 +++++++++-------- 4 files changed, 65 insertions(+), 19 deletions(-) create mode 100644 .changeset/4919-retire-mobile-overrides.md diff --git a/.changeset/4919-retire-mobile-overrides.md b/.changeset/4919-retire-mobile-overrides.md new file mode 100644 index 0000000000..2e0d9a4457 --- /dev/null +++ b/.changeset/4919-retire-mobile-overrides.md @@ -0,0 +1,46 @@ +--- +'@object-ui/types': minor +'@object-ui/mobile': minor +--- + +Retire the `MobileOverrides` type and its `mobileOverrides` mount point (objectui#4919, +maintainer ruling 2026-08-19, ADR-0049 enforce-or-remove). + +`MobileOverrides` published a six-key mobile override surface — `layout`, `columns`, +`useBottomSheet`, `fullScreen`, `touchTarget` and a three-value `navigation` vocabulary +(`'bottom-tabs' | 'hamburger' | 'drawer'`) — from `@object-ui/types` and, re-exported, +from `@object-ui/mobile`. Nothing read any of it. Measured on current `main`: the type had +exactly four mentions repo-wide — its own declaration, the single +`MobileComponentConfig.mobileOverrides` mount point, and the two barrel re-exports — and +the lower-case property name (the spelling a renderer would actually read) appeared only +in that declaration. No renderer, hook or adapter resolved it, and a sweep of the example +apps and the `objectstack` sibling checkout found zero authors. The three `navigation` +values were three spellings of the same no-op. + +The declared surface is removed rather than narrowed. The #3985 lineage's rule is "narrow +to the implemented values"; here the implemented set is empty, so that rule terminates in +deletion — a config that type-checks, builds and silently does nothing is the +declare-without-enforce shape the platform doctrine forbids. + +Removal rather than a `?: never` tombstone follows this package's own discriminator. A +tombstone exists to steer authors to a named live replacement — `crud.ts` `confirm` → +`confirmText` (objectui#4314), `data-display.ts` `hoverable` / `striped` → `data-table` +(objectui#5474) — or to keep a key loud that the docs had actively taught as working. +Neither applies: there is no replacement key to steer to, no documentation ever described +the surface, and there is no successor spelling. That is the same zero-pull, no-successor +shape as the retired `AccordionItem.icon` (objectui#4652) and `ToggleGroupItem.icon` +(objectui#4632), both of which were removed outright rather than tombstoned. + +**Breaking for TypeScript authors of `MobileOverrides` / `mobileOverrides` only** (marked +`minor` per this repo's version-alignment rule, which reserves `major` for following +`@objectstack` across a major — see AGENTS.md's 版本号策略, and the identical +classification used for `AccordionItem.icon`). Runtime behaviour is unchanged: an authored +`mobileOverrides` did nothing before and does nothing now. What changes is that the +contract no longer claims otherwise, so the mistake surfaces at authoring time — importing +the type is now a "has no exported member" error, and authoring the key on a +`MobileComponentConfig` object literal is an excess-property error, instead of a silent +no-op that type-checks and builds. + +If real mobile-override renderer work is ever wanted it re-enters deliberately, as designed +product surface on its own card, with the renderer landing in the same change as the +declaration — not by resurrecting this declaration. diff --git a/packages/mobile/src/index.ts b/packages/mobile/src/index.ts index 5837a5d7d0..7fc4727b7b 100644 --- a/packages/mobile/src/index.ts +++ b/packages/mobile/src/index.ts @@ -57,7 +57,6 @@ export type { BreakpointName, ResponsiveValue, MobileResponsiveConfig, - MobileOverrides, PWAConfig, PWAIcon, FetchCacheStrategy, diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index c2e3ba13a1..4b3b8fa308 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -582,7 +582,6 @@ export type { BreakpointName, ResponsiveValue, MobileResponsiveConfig, - MobileOverrides, PWAConfig, PWAIcon, FetchCacheStrategy, diff --git a/packages/types/src/mobile.ts b/packages/types/src/mobile.ts index ff21f0dec0..a4f228ef65 100644 --- a/packages/types/src/mobile.ts +++ b/packages/types/src/mobile.ts @@ -69,21 +69,25 @@ export interface MobileResponsiveConfig { showOnly?: BreakpointName[]; } -/** Mobile-specific component overrides */ -export interface MobileOverrides { - /** Simplified layout for mobile */ - layout?: 'stack' | 'tabs' | 'accordion' | 'carousel'; - /** Reduced columns for forms */ - columns?: number; - /** Whether to use bottom sheet instead of modal */ - useBottomSheet?: boolean; - /** Whether to use full-screen mode */ - fullScreen?: boolean; - /** Touch-friendly sizing */ - touchTarget?: 'default' | 'large' | 'xlarge'; - /** Simplified navigation */ - navigation?: 'bottom-tabs' | 'hamburger' | 'drawer'; -} +// RETIRED (objectui#4919, maintainer ruling 2026-08-19, ADR-0049 +// enforce-or-remove): the mobile component-override surface and its mount +// point on `MobileComponentConfig` are gone, not narrowed. Every member was +// declaration-only — nothing in this repo, the example apps, or the +// `objectstack` sibling checkout ever read the property, so all six keys +// behaved identically (they did nothing), and the navigation vocabulary's +// three values were three spellings of the same no-op. Removal rather than a +// `?: never` tombstone follows this package's own discriminator: a tombstone +// exists to steer authors to a named live replacement (`crud.ts` `confirm` → +// `confirmText`; `data-display.ts` `hoverable`/`striped` → `data-table`), +// and there is no replacement here — the same zero-pull/no-successor shape as +// the retired `AccordionItem.icon` / `ToggleGroupItem.icon`, which were +// likewise removed outright rather than tombstoned. +// +// Reopen condition, recorded on objectui#4919: real mobile-override renderer +// work re-enters as designed product surface on its own card, with the +// renderer landing in the same change as the declaration. Re-adding the +// declaration alone is the declare-without-enforce shape this removal exists +// to close. // ============================================================================ // PWA Support @@ -279,8 +283,6 @@ export interface GestureContext { export interface MobileComponentConfig { /** Responsive configuration */ responsive?: MobileResponsiveConfig; - /** Mobile-specific overrides */ - mobileOverrides?: MobileOverrides; /** Touch gesture handlers */ gestures?: GestureConfig[]; /** Pull-to-refresh configuration */