Skip to content

finding(types): retiring MobileComponentConfig leaves MobileResponsiveConfig and GestureConfig as zero-consumer published types #7519

Description

@claude

Observation-class finding, filed unassigned for triage. Found while implementing #5942 (retire MobileComponentConfig); not fixed in that PR — these are different types and #5942's route covers only the container.

Mechanism

MobileComponentConfig was the sole consumer of two other published types declared in the same file, packages/types/src/mobile.ts:

packages/types/src/mobile.ts:285   responsive?: MobileResponsiveConfig;    <- only consumer
packages/types/src/mobile.ts:287   gestures?: GestureConfig[];             <- only consumer

Both are published twice, exactly like the container was — packages/types/src/index.ts and packages/mobile/src/index.ts both re-export them — so consumers of @object-ui/types and @object-ui/mobile can write either name.

Once #5942 removes the container, each of these two types has zero consumers left in the repo: declaration plus two barrel re-exports and nothing else. That is the same declared-surface-with-no-consumption-path shape as #4919 and #5942 themselves, one level down.

Even before #5942 lands the practical reachability was already nil: their one consumer was a type nothing mounted, annotated, extended or imported, so no value written against either could reach a renderer.

Measured, per type

Read-shape probes over the whole tree, each zero paired with a control lit in the same run (ComponentSchema / Record / BaseSchema).

MobileResponsiveConfig — mentions outside CHANGELOG prose:

packages/types/src/mobile.ts:55    the declaration
packages/types/src/mobile.ts:285   responsive?: MobileResponsiveConfig    (the only consumer; removed by #5942)
packages/types/src/index.ts:613    barrel re-export
packages/mobile/src/index.ts:59    barrel re-export
__tests__/page-nav-misc-spec-parity.test.ts:749   pins that the SPEC does not own the name

GestureConfig — mentions outside CHANGELOG prose and doc comments:

packages/types/src/mobile.ts:245   the declaration
packages/types/src/mobile.ts:287   gestures?: GestureConfig[]             (the only consumer; removed by #5942)
packages/types/src/index.ts:624    barrel re-export
packages/mobile/src/index.ts:66    barrel re-export

packages/mobile/src/useSpecGesture.ts:66 names GestureConfig in a doc comment only; the code there imports SpecGestureConfig, a different type. Counting bare words would score that as a read — it is not one.

Not the same as their neighbours

The sibling names on the same file are genuinely live and are not part of this finding:

  • GestureType — read by useGesture.ts and useSpecGesture.ts (Record maps, annotations).
  • GestureContext — read by useGesture.ts (annotation, construction, indexed access).
  • ResponsiveValue — read by breakpoints.ts and useResponsive.ts.

So this is not "retire the mobile types"; it is two specific names whose only mount point is going away.

Two things triage should weigh before choosing a route

  1. MobileResponsiveConfig carries a tripwire testpackages/types/src/__tests__/page-nav-misc-spec-parity.test.ts pins that @objectstack/spec does not own the name. That pin exists because the name was deliberately renamed off the spec's ResponsiveConfig (objectstack#4115). A retirement has to decide what happens to the pin; the name-ownership question outlives the type.
  2. The capabilities these types name are real and live in @object-ui/mobile as React hooks — useResponsive / ResponsiveContainer, useGesture, usePullToRefresh. Retiring the declarative types does not retire any behaviour. Equally, a decision to build a declarative mobile-config surface would want these shapes back, so "retire" and "implement" are both coherent answers and the choice is a product call, not a mechanical one.

Reachability, stated honestly

In-repo victims: 0 — nothing in packages/, apps/ or examples/ authors either type, and the objectstack sibling checkout has zero hits (control: ComponentSchema lit at 255 hits there in the same run). The only people affected are external consumers reading the .d.ts. Observation-class, so finding and no pm:queue; severity is triage's call.

Related: #5942 (the container this falls out of), #4919 (MobileOverrides, same lineage), #3818 / #3829 / #3985.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions