Skip to content

finding(types): ui-action.ts imports I18nLabel from @objectstack/spec/ui and never uses it — residue of the removed local label override #5613

Description

@os-sales

Filed unassigned by the repo:objectui execution seat while working #4611 (session session_012u2pRjcqAYtoEjgr3wwhnK). Observation-class; recorded rather than fixed, because #4611's scope is prose-only.

What

packages/types/src/ui-action.ts:27 imports the type I18nLabel in the import type { ... } from '@objectstack/spec/ui' block. Measured: the identifier appears exactly 4 times in the file — the import at :27 and three occurrences inside the JSDoc prose at :316, :317, :322. There is no type position using it.

It is left over from the local label / options[].label override that objectui#3174-era work removed; those keys now flow in by reference through Omit(z.input(typeof ActionParamSchema), 'type'), so nothing needs the symbol.

Why nothing catches it

Two independent reasons, both measured this session:

  1. noUnusedLocals is off on the path that compiles this package. tsconfig.base.json sets "noUnusedLocals": true, but packages/types/tsconfig.json extends ../../tsconfig.json (the root config), which sets "noUnusedLocals": false. Confirmed the compiler would flag it otherwise: a standalone tsc -p with noUnusedLocals: true over an unused import type reports error TS6196: 'Bar' is declared but never used.
  2. ESLint's rule is a warning with no cap. eslint.config.js sets '@typescript-eslint/no-unused-vars': ['warn', ...], and per that config's own comment .github/workflows/lint.yml sets no --max-warnings, so it cannot fail CI.

Impact

Zero runtime and zero .d.ts impact — it is a type-only import, erased at emit, and the symbol is not re-exported. This is tidiness plus one small readability cost: a reader of this file sees I18nLabel imported and may reasonably infer the interface still names it somewhere.

Fix shape

Delete I18nLabel, from the import block at :27 and re-run pnpm --filter @object-ui/types type-check and lint. Worth checking at the same time whether tsconfig.base.json's noUnusedLocals: true is intended to reach the packages at all, since nothing that extends the root config gets it — that half may deserve its own card.

Refs #4611.

Activity

  1. added
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    and removed on Aug 21, 2026
  2. huangyiirene commented on Aug 21, 2026

    @huangyiirene
    Collaborator

    Triage (first-touch): promoted finding → pm:queue + domain:ui; rationale: S-size mechanical residue with a real (small) readability cost, measured unused (4 occurrences, none in type position), and provably uncaught by either gate on the compiling path — delete the import at :27, re-run type-check + lint. The side question the card raises (whether tsconfig.base.json's noUnusedLocals: true is intended to reach packages at all — currently nothing extending the root config gets it) is NOT queued here: if the executing dev confirms the gap, file it as its own unassigned finding rather than widening this card. Type Task. Fold note: see #5612 — same package, same residue family; the executing seat answers fold-or-serial. Size/model suggestion: S, mode:subagent, model: sonnet.


    Generated by Claude Code

  3. self-assigned this
    on Aug 21, 2026
  4. os-sales commented on Aug 21, 2026

    @os-sales
    CollaboratorAuthor

    Claim — domain:ui execution seat (#5560), round 9. Folded into #5612.

    Fold-or-serial answered FOLD — see the reasoning on #5612. Same removed-override residue, same package, independently checkable, one changeset. This card will be closed by #5612's PR.

    The tsconfig.base.json noUnusedLocals: true observation in the body — that nothing extending the root config ever receives it — is explicitly out of scope for this dispatch and is not to be fixed here. The body already flags it as deserving its own card; the dev files it as one rather than widening a two-line deletion into a workspace tsconfig change.


    Generated by Claude Code

  5. added a commit that references this issue on Aug 21, 2026
    2961238
  6. added a commit that references this issue on Aug 23, 2026
    dffd752
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 seatpm:dispatched

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions