Skip to content

Gate authored icon names against lucide's runtime icons record - #5932

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-5633-icon-literal-gate
Aug 24, 2026
Merged

Gate authored icon names against lucide's runtime icons record#5932
os-zhuang merged 2 commits into
mainfrom
claude/issue-5633-icon-literal-gate

Conversation

@claude

@claude claude Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #5633

lucide retires a spelling by dropping it from the runtime icons record while keeping it as a deprecated named export. A retired name therefore still imports, still type-checks and still renders wherever it is used as a component — and resolves to nothing wherever it is used as a string, because the string lookups read that record. Nothing goes red in either direction. That class had been repaired twice, in two packages, by two cards, each leaving a local pin behind. This adds one gate over the population instead of a fifth local pin.

New gate: scripts/check-lucide-icon-record-names.mjs, wired as pnpm check:icon-record-names in ci.yml's type-check job.

The population, measured

node scripts/check-lucide-icon-record-names.mjs --report on 69c86a310:

lucide 1.31.0 resolved from packages/components/package.json
RECORD vocabulary: 1767 keys | DYNAMIC vocabulary: 2025 names (superset by 258)
scanned 3415 TS sources + 477 JSON documents under packages/, apps/, examples/
record-reading resolvers discovered (8):
    packages/app-shell/src/views/metadata-admin/previews/ActionPreview.tsx
    packages/components/src/renderers/action/resolve-icon.ts
    packages/components/src/renderers/basic/icon.tsx
    packages/components/src/renderers/form/button.tsx
    packages/plugin-detail/src/RelatedList.tsx
    packages/plugin-list/src/ListView.tsx
    packages/plugin-list/src/components/TabBar.tsx
    packages/plugin-view/src/ViewSwitcher.tsx
dynamic-surface resolvers discovered (4), NOT judged here:
    apps/console/src/utils/getIcon.ts
    packages/app-shell/src/utils/getIcon.ts
    packages/app-shell/src/views/metadata-admin/widgets.tsx
    packages/components/src/lib/lazy-icon.tsx
authored icon names judged: 30 | icon names on nodes this gate declines to judge: 254
anchored map entries judged: 34

The card's table of four record-reading resolvers was short by four. form/button.tsx, plugin-list/ListView.tsx, plugin-detail/RelatedList.tsx and previews/ActionPreview.tsx each resolve an authored string through the same record, each with its own hand-copied normalisation — and the eight do not agree: three different tokenisers (split('-'), split(/[-_\s]/), split(/[-_\s]+/)) and only five carrying the Home to House alias. That divergence is the argument for measuring the population every run rather than maintaining a list; the gate takes the widest tokeniser plus the alias map, so it can never invent a violation none of the eight would produce.

The dynamic surface was likewise short by two. It is censused but not judged: lucide-react/dynamic.mjs still carries edit, smile, filter, alert-triangle. A gate pointed at that vocabulary would bless every name this class is about — worse than no gate.

Controls on the enumeration

A sweep is only readable if a site known to be in the population and one known to be out are classified by the same pass.

control expected measured
Inpackages/components/src/renderers/action/resolve-icon.ts, the canonical resolver both prior cards repaired against discovered as record-reading discovered
Outpackages/plugin-chatbot/src/elements/tool.tsx, which builds its own const icons map of ReactNodes and indexes it by tool state never discovered not discovered, in either surface

The negative control is asserted by the gate itself, not just by this table: if that file is ever classified as a resolver, discovery is matching the name rather than the import and every other verdict is void.

What the gate declines to judge, and why that is the point

254 icon-keyed string literals are seen and not judged. An icon on a node whose type is not a censused record-reading renderer is declined, because nothing here knows which vocabulary (if any) it reaches. That is what keeps the gate from being the kind that gets suppressed on day one — and the declined set is exactly the false-positive families #5633 catalogued. Re-measured here:

  • Tailwind tone classes in a differently-typed icon field (AppNavCanvas.tsx, block-types.ts, field-types.ts, flow-canvas-parts.tsx, AgentPreview.tsx).
  • Deliberate negative controls in suites (not-a-real-icon) — test paths are outside the scan, declared in the gate's header.
  • Catalog child items with no type of their own. Read the four renderers: button-group.tsx, breadcrumb.tsx and command.tsx never read icon at all, and dropdown-menu.tsx renders item.icon as raw text ({item.icon && <span>{item.icon}</span>}). None reaches a record-reading resolver, so declining them is the correct answer rather than a gap. Both observations are filed separately, below.

The gate's judgement

The runtime icons record itself, loaded from the lucide the resolvers load — resolved through packages/components/package.json, because lucide-react is not resolvable from the repo root. No list of retired spellings anywhere in the gate: a hand-kept vocabulary is the same defect one level up, ageing the moment lucide retires the next name and ageing silently. When the gate names a replacement it derives one by object identity — the retired export and its live key are the same object, so the live key is looked up in the record.

Red/green demonstration

The discriminating pin, its two controls, and the whole suite are in scripts/__tests__/check-lucide-icon-record-names.test.ts (25 cases, all over throwaway trees except the repo-wide assertions).

leg fixture verdict
discriminating { type: 'button', icon: 'filter' } — retired, still exported, Filter === Funnel is true RED, naming packages/app/src/toolbar.ts:4, the spelling, and write \funnel``
control 1 the same site, icon: 'funnel' GREEN, with authoredJudged === 1 so green is a judgement, not a skipped file
control 2 the same site, icon: 'no-such-lucide-icon' RED for a visibly different reason: is not a lucide icon at all, and explicitly not the deprecated-alias sentence

Reverse verification

Four legs, each mutating a committed tree, confirming the mutation on disk by grepping the injected and the removed text (never an editor exit code), restoring under an EXIT INT TERM trap, and re-checking git diff HEAD --stat. No build is involved and none can hide a leg: the suite imports the gate by relative source path and the CLI is node scripts/…, so nothing resolves through an exports map into a dist/. Baseline and final were both 25/25.

leg predicted observed
A isLiveKey always true RED on every fixture leg expecting a violation RED, 6 failed — one wider than predicted: the vocabulary-difference case also calls the predicate. Recorded rather than rounded off.
B restore icon: "Filter" in the playground RED on exactly the repository assertion RED, exactly 1: is green. This is what proves the repairs below were real.
C discovery returns nothing RED via census + repository assertions RED, 9 — broader than predicted; the fixture judgements also fail because they assert errors is empty.
D drop the Home to House alias SPLIT: the alias case RED, repository assertion UNCHANGED exactly that — 1 failed, is green stayed green

Leg D is the named non-discriminating leg for the repository-wide assertion: no censused site names home, so that assertion cannot see the alias being dropped. It is discriminating only for the alias case, which is why the alias case exists.

Local pins retired

pin disposition
packages/plugin-list/src/__tests__/ViewSwitcher.iconNames.test.ts deleted — its whole population is VIEW_ICONS, now an anchored map with a min-entry precondition
packages/plugin-detail/src/__tests__/DetailView.systemActionIconNames.test.ts deleted — its whole population is items.push({ icon }), now an anchored map
packages/plugin-view/src/__tests__/ViewSwitcher.test.tsx membership half removed; every render assertion kept. A membership check cannot see an icon slot that stopped being rendered at all, and that is the other half of "renders nothing"
packages/components/src/__tests__/icon-renderer-declared-default.test.ts kept, with the reason recorded in the file. It checks something the gate does not: this repository contains no first-party consumer of a registration's icon meta — measured, getMeta(...).icon is read nowhere under packages/** or apps/** — so the gate has no measured basis to judge it. It also asserts the palette glyph and the dropped default stay the same name, which no membership check can

A test asserts that the two deleted populations are present in the gate's anchor list, so they cannot be dropped rather than moved.

Spellings the gate found

Three, each a one-line correction to the same glyph object (verified at runtime: MoreHorizontal === Ellipsis and Filter === Funnel are both true, and only the replacement is a record key):

  • examples/schema-catalog/.../plugin-grid/product-inventory-grid.json"icon": "filter" on a type: button node rendered no icon. Now funnel.
  • examples/schema-catalog/.../components-overlay-dropdown-menu/with-icons.json"icon": "more-horizontal" on the type: button trigger. Now ellipsis.
  • apps/site/app/playground/page.tsxicon: "Filter" on a type: "button" node. Now Funnel, keeping the file's PascalCase convention.

Out of scope, filed separately

Divergence from the triage note, for the reviewer

Triage sequenced a four-resolver consolidation ahead of the gate. The dispatch fenced this round to the gate and explicitly excluded touching resolver behaviour, so no consolidation was attempted. The measurement strengthens the consolidation case rather than weakening it — eight resolvers, three tokenisers, two alias policies — and the gate now makes any new one visible on the run it appears. Recorded here for the PM rather than decided.

Verification

Every command below was run on 69c86a310 (this branch's head), heavy legs serialised through the shared verify lock; exit codes captured before any pipe.

  • node scripts/check-lucide-icon-record-names.mjsOK lucide icon names: 64 authored/declared names reaching 8 record-reading resolvers are live \icons` keys`
  • node scripts/check-changeset-presence.mjs✅ 6 source file(s) of 4 released package(s) changed, and this change declares 1 changeset(s) (empty frontmatter: comment-only src/ edits and test changes publish nothing)
  • node scripts/check-changeset-no-major.mjs✅ No changeset declares a \major` bump.`
  • node scripts/check-control-bytes.mjs✅ check-control-bytes: OK (scanned 4922 tracked text file(s); skipped 85 binary).
  • node scripts/check-phantom-dependencies.mjs✅ Every in-scope import is declared by the package that publishes it.
  • node scripts/check-doc-links.mjsLinks are valid across 13 scan roots.
  • pnpm type-check:scripts — exit 0
  • pnpm exec vitest run --maxWorkers=2 scripts/ examples/ packages/auth/ packages/plugin-view/ packages/components/src/__tests__/icon-renderer-declared-default.test.tsTest Files 121 passed (121) / Tests 3771 passed (3771)
  • pnpm exec vitest run --maxWorkers=2 packages/plugin-list/ packages/plugin-detail/ scripts/__tests__/check-lucide-icon-record-names.test.tsTest Files 142 passed (142) / Tests 1600 passed (1600)

Declared lint narrowing. ESLint was run on the six changed .ts/.tsx files rather than repo-wide, with the three pieces of evidence that make the narrowing a measurement:

  1. Receiving population read from eslint.config.js itself, not guessed: the only files globs are **/*.{ts,tsx}. .mjs, .json, .yml and .md match no glob, so the new gate script, the two catalog documents, ci.yml, package.json, the changeset and the pipeline page are outside the linted population entirely — not skipped by me.
  2. File count read from --format json: 6 results, cross-checked against git diff --name-only --diff-filter=d origin/main...HEAD | grep -E '\.(ts|tsx)$' — also 6, the same paths. 0 errors, 6 warnings, every warning pre-existing on a line this branch does not touch (no-explicit-any, react-hooks/set-state-in-effect); ESLint exits 0 and this repo sets no --max-warnings.
  3. Invariance for untouched files: eslint.config.js sets no parserOptions.project and no projectService, so type-aware linting is not enabled and no rule reads another file's types. A change confined to these six files cannot move the verdict on any file the branch does not touch.

The repo-wide eslint . run is CI's, and it runs the farm regardless.


Generated by Claude Code

os-project-manager and others added 2 commits August 24, 2026 01:21
…s record

lucide retires a spelling by dropping it from the runtime `icons` record while
keeping it as a deprecated named export. A retired name therefore still imports,
still type-checks and still renders wherever it is used as a COMPONENT
(`Edit === SquarePen`, `Filter === Funnel`) — and resolves to nothing wherever it
is used as a STRING, because the string lookups read that record. Nothing goes
red in either direction, which is why the class had to be repaired twice, in two
packages, by two cards (objectui#5586, objectui#5622), each leaving a LOCAL pin
behind.

`scripts/check-lucide-icon-record-names.mjs` replaces those pins with one
predicate over the population:

- its judgement is the runtime record itself, never a list of retired spellings,
  and it derives a replacement by object identity rather than remembering one;
- it RE-DISCOVERS the resolver population from source on every run — the first
  pass found four record-reading resolvers the card's hand-built table did not
  know about, plus two more dynamic-surface ones;
- it separates the record vocabulary (1767 keys) from `dynamic.mjs`'s (2025),
  because the dynamic list still carries every retired name this class is about;
- an `icon` on a node whose `type` is not a censused record-reading renderer is
  DECLINED rather than flagged, so the gate cannot become one that gets
  suppressed.

Retires the two local pins it fully subsumes and the membership half of a third,
keeping the render assertions and the `ui:icon` registration pin (no first-party
consumer of a registration's `icon` exists here, so the gate has no measured
basis to judge it).

Three live spellings the gate found are repaired in place, each a one-line
correction to the same glyph: `filter` -> `funnel` and `more-horizontal` ->
`ellipsis` in schema-catalog fixtures, `Filter` -> `Funnel` in the docs
playground.

Part of #5633

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
`scripts/__tests__/ci-cd-pipeline-doc.test.ts` compares every first-party
command a ci.yml job runs against that job's "What it runs" cell, in order.
A gate nobody wrote down is a build failure contributors meet without knowing
what produced it (objectui#3653).

Part of #5633

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 52 chunks) 3230.7 KB 3990.2 KB
Main entry chunk (gzip) 153.6 KB 350 KB
Entry file index-BL8yIXhK.js
Status PASS

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 10.13KB 3.77KB
app-shell (runtime-config.js) 13.57KB 4.78KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 504.18KB 114.10KB
core (index.js) 4.92KB 1.97KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 164.55KB 45.67KB
fields (index.js) 238.40KB 59.89KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 23.13KB 7.63KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 7.77KB 3.13KB
layout (index.js) 38.95KB 10.97KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.55KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.53KB 3.38KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.64KB 1.50KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 1.93KB 0.88KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.62KB 12.83KB
plugin-charts (index.js) 64.66KB 18.32KB
plugin-chatbot (index.js) 188.21KB 44.67KB
plugin-dashboard (index.js) 133.32KB 34.42KB
plugin-designer (index.js) 212.30KB 42.80KB
plugin-detail (index.js) 243.38KB 61.72KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 125.63KB 30.64KB
plugin-gantt (index.js) 164.15KB 39.88KB
plugin-grid (index.js) 200.79KB 54.26KB
plugin-kanban (index.js) 52.93KB 14.60KB
plugin-list (index.js) 111.86KB 27.22KB
plugin-map (index.js) 20.06KB 6.62KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.49KB 11.93KB
plugin-timeline (index.js) 26.49KB 7.59KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.57KB 20.74KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 52.40KB 17.45KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.35KB 0.70KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 12.13KB 3.65KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 7.54KB 2.63KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 3.88KB 1.85KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

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

Projects

None yet

2 participants