Skip to content

fix(ui): govern leftover icon sizes with ICON_SIZE - #3127

Open
1625567290 wants to merge 5 commits into
apache:mainfrom
1625567290:fix/ui-icon-size-scale
Open

fix(ui): govern leftover icon sizes with ICON_SIZE#3127
1625567290 wants to merge 5 commits into
apache:mainfrom
1625567290:fix/ui-icon-size-scale

Conversation

@1625567290

Copy link
Copy Markdown
Contributor

Summary

ICON_SIZE and --icon-* already define the chrome / dense / hero rungs. Two product call sites and the icon story still passed raw pixels.

This change:

  • routes the leftover size={16}, size={30}, and story size={20} through ICON_SIZE
  • adds npm run check:icon-size, which parses TSX so comments, strings, and unrelated size props are not false positives
  • runs that check in the CI typecheck job

Fixes #2359

Test plan

  • npm run check:icon-size
  • scripts/check-icon-size.test.mjs

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c8ac3008-fd70-4abb-b6b5-9c4a76446716

📥 Commits

Reviewing files that changed from the base of the PR and between 971aa7a and 9be1c57.

📒 Files selected for processing (1)
  • scripts/check-icon-size.mjs
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/check-icon-size.mjs

Included review availability: Your plan includes up to 3 reviews per rolling hour; 0 remain after this review.


📝 Walkthrough

Summary

This PR completes the governed icon-size migration for the remaining size={16}, size={20}, and size={30} call sites. It replaces these values with existing ICON_SIZE tokens and adds automated enforcement for imported Lucide icons.

The Babel-based scanner resolves supported imports and bindings. It excludes comments, strings, unrelated size props, accepted constants, shadowed tags, and metadata exports. Tests cover these rules.

The check runs through npm run check:icon-size and the CI typecheck job.

Source of truth

This PR extends the existing ICON_SIZE and --icon-* scale. It does not create a parallel icon-size system.

Scope and complexity

The call-site changes are small and coherent. The parser-based scanner adds necessary complexity because text matching cannot resolve imports or distinguish icon props from unrelated syntax.

No safe deletion or simplification is evident. Removing scanner cases or tests would weaken enforcement or regression coverage.

Risks and validation

  • Migrated values preserve the existing rendered sizes through shared constants.
  • New off-scale Lucide icon sizes can now fail CI.
  • Import resolution and configured dynamic-tag handling are the main maintenance areas.
  • Tests cover aliases, namespaces, derived imports, relative imports, conditional values, shadowed tags, unrelated props, comments, strings, numeric strings, and accepted constants.
  • Required-check status is unverified from the available evidence.

Review-relevant risks

The scanner changes repository governance by enforcing the icon-size scale in CI. Any material change to this governance behavior requires independent human review under repository policy.

No user-visible behavior, public contract, security, licensing, or release effect was identified in the current diff. The person performing the merge must review the final diff, and a maintainer makes the final determination.

Walkthrough

The pull request adds Babel-based validation for numeric sizes on imported Lucide icons. It replaces three hardcoded icon sizes with shared constants, adds scanner tests, and runs the new check in CI.

Changes

Icon size governance

Layer / File(s) Summary
AST icon-size scanner
scripts/check-icon-size.mjs
The scanner resolves supported icon imports, aliases, namespaces, dynamic tags, and lexical scopes. It reports numeric JSX size values.
Shared icon-size call sites
apps/desktop/src/renderer/settings/about-settings-page.tsx, apps/desktop/src/renderer/settings/request-customization-editor.tsx, packages/ui/stories/icons.stories.tsx
Selected icon sizes now use ICON_SIZE.plate, ICON_SIZE.chrome, and Icons.ICON_SIZE.empty.
Validation command and CI integration
scripts/check-icon-size.test.mjs, package.json, .github/workflows/ci.yml
Tests cover supported and excluded cases. The package script runs the tests and scanner. The typecheck job invokes the script, and @babel/parser is added as a development dependency.

Estimated code review effort: 4 (Complex) | ~30 minutes

Merge Risk: ⚪ Minimal · up to 9be1c

This change centralizes the remaining icon sizes and adds CI enforcement; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant checkIconSize
  participant SourceFiles
  participant BabelParser
  CI->>checkIconSize: run check:icon-size
  checkIconSize->>SourceFiles: scan configured source globs
  SourceFiles-->>checkIconSize: return source text
  checkIconSize->>BabelParser: parse TSX
  BabelParser-->>checkIconSize: return AST
  checkIconSize-->>CI: report violations or success
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR updates three governed call sites and adds enforcement, but it does not complete the issue's broader icon-size sweep or record exceptions. Complete the governed-scale sweep across the targeted UI and desktop call sites, or document the remaining scope and genuine exceptions.
Ai Use Disclosure ⚠️ Warning The PR description selects neither required disclosure, and all three introduced commits lack a valid Generated-by trailer. Update the PR description with exactly one disclosure. If generative tooling made a substantive contribution, name the tool and scope, add trailers to material AI-authored commits, and preserve them through squash or amend. See “Human ow...
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: governing remaining UI icon sizes with ICON_SIZE.
Description check ✅ Passed The description includes a summary, issue reference, and test commands, but omits the template's AI use and checklist sections.
Out of Scope Changes check ✅ Passed The CI, script, dependency, tests, and icon call-site changes directly support the linked issue's icon-size governance objectives.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: afd08f49-0d1a-411c-9cee-1adc4872f934

📥 Commits

Reviewing files that changed from the base of the PR and between 2e3c82e and b7bdeab.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • apps/desktop/src/renderer/settings/about-settings-page.tsx
  • apps/desktop/src/renderer/settings/request-customization-editor.tsx
  • package.json
  • packages/ui/stories/icons.stories.tsx
  • scripts/check-icon-size.mjs
  • scripts/check-icon-size.test.mjs

Included review availability: Your plan includes up to 3 reviews per rolling hour; 0 remain after this review.

Comment thread scripts/check-icon-size.mjs Outdated
Comment thread scripts/check-icon-size.mjs Outdated
@Astro-Han

Copy link
Copy Markdown
Contributor

Thanks for routing the leftover sizes through ICON_SIZE — the two product mappings are correct and the check does run on real TSX. Two P2s surfaced in review; both need a decision before merge.

Conclusion: PASS with two mandatory-handling P2s.

P2-1 — the About hero change is a visual change, not a routing: size={30}ICON_SIZE.plate (28), and the sizing rationale comment was deleted.
about-settings-page.tsx:177 previously read size={30} /* 64% of the 48px plate, matching .providerLogo's fill */ and now reads size={ICON_SIZE.plate} (plate: 28). .settingsAboutLogo renders the glyph at its own pixel size, so this shrinks the Sparkles by 2px (62.5% → 58.3% of the plate) and silently abandons the 64% fill convention that .providerLogo still uses (models.css:68-71). The PR description presents this as a pure 1:1 route, which it isn't. Please either confirm the 28px convergence is intentional and say so explicitly in the description (keeping a note about the old 64% convention), or keep 30 as a documented exception per issue #2359's own rule.

P2-2 — the 282-line AST checker is oversized for the threat and has blind spots.
The entire governed corpus has exactly 3 raw-pixel size={N} hits — all three are the ones this PR fixes; there are no false-positive threats in the corpus today. Meanwhile the hand-written scope engine (~200 lines) replaces @babel/traverse (already in the dependency tree, same version as the added @babel/parser), and I verified the namespace/metadata machinery is provably dead (the only import * as Icons consumer is the story, whose tags are destructured bindings that the checker explicitly does not govern). Separately, 8 trivial indirection forms bypass the check entirely (verified): const size = 16; <Search size={size}/>, <Search {...{ size: 16 }}/>, <Search size={\16`}/>, <Search size={8 + 8}/>, <Search size={'16'}/>`, parameter passthrough, dynamic import, and a local re-export shim. So the docstring's claim ("Product lucide icons must pick a rung … not a raw pixel") only holds for literal direct writes. Please either (a) justify the full AST approach, (b) trim the provably dead machinery (~100 lines), or (c) state the coverage boundary explicitly and encode it in the tests.

Optional nits (P3): the story "governance" is nominal — the check can't see Comp (the 4th test explicitly asserts a destructured tag is not reported), so reverting the story to size={20} passes silently; GLOBS covers packages/ui/stories but not apps/desktop/stories (which imports the icon seam); template literals and size={'16'} are untested; the description's rungs ("chrome / dense / hero") don't match the code's (meta/control/chrome/empty/plate).


AI-assisted review disclosure: this review was produced with AI assistance (two pi review subagents on ollama-cloud/deepseek-v4-flash). Both independently reproduced the 30→28 pixel delta and the bypass matrix against the actual script; I verified the call-site values and CSS conventions. The "checker is dead machinery" claim is from corpus-wide analysis, not observed breakage. Please weigh these findings with your own judgment.

中文摘要(AI 辅助审查)

结论:PASS(两个 P2 需处理)。① P2-1:About hero 的 size={30}→ICON_SIZE.plate(28) 是未披露的视觉变更——Sparkles 缩小 2px(占板比例 62.5%→58.3%),且删除了"64% of 48px plate, matching providerLogo"的注释依据,而 providerLogo 仍用 64% 填充惯例;PR 描述暗示纯路由但实际改了像素。需明确确认收敛到 28 是有意的(并在描述中说明),或按 issue #2359 规则保留 30 作为记录在案的例外。② P2-2:282 行手写 AST lint 超配——被治理语料全仓仅 3 处裸像素(都是本 PR 修的),命名空间/元数据机制是可证明的死逻辑(约 100 行),且 8 种平凡间接形式(变量、spread、模板串、表达式、字符串容器、参数透传、动态 import、本地 re-export)实测均可绕过,治理声明被高估。建议:给全 AST 方案理由、删死逻辑、或明确声明覆盖边界并写进测试。P3 可选:story 治理是表面治理(解构标签不被查)、GLOBS 不含 apps/desktop/stories、模板字面量未测、描述档位名与代码不符。

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Routing the remaining product call sites through the existing ICON_SIZE seam is the right direction, and this head fixes the earlier shadowing and direct numeric-string false negatives. The focused tests and live checks are green on its old base.

The new required check does not pass the current-main merge result: current main added five governed 18px icons after this branch's base. Please rebase and migrate those sites before merging. More broadly, the first-principles contract should match what the checker can actually prove. The smallest coherent choice is either (a) explicitly enforce direct JSX literals and delete the unused/generalized scope machinery, or (b) expand static-value and controlled-derived-icon coverage. A 319-line authority that claims all raw pixels while accepting common indirections is the least desirable middle ground.

Reviewed with Codex using two independent reviewer agents; I reproduced the current-main gate failure and verified the latest head, changed checker, public discussion, and live CI.

中文

把剩余产品调用点接入现有 ICON_SIZE seam 的方向正确,这个 head 也修复了之前的遮蔽误报和直接数字字符串漏报;聚焦测试与旧 base 上的实时检查均通过。

但新增 required check 无法通过与当前 main 的合并结果:当前 main 在该分支 base 之后新增了 5 个受治理的 18px 图标。合并前应 rebase 并迁移这些调用点。更根本地说,checker 能证明的范围应与契约一致。最小的一致方案要么只明确治理直接 JSX literal,并删掉未产生价值的泛化 scope 逻辑;要么补齐静态值和受控派生图标的覆盖。319 行的 authority 一边声称禁止所有 raw pixel,一边允许常见间接写法,是最不理想的中间状态。

本次由 Codex 配合两个独立 reviewer agent 审查;我复现了 current-main gate 失败,并核验了最新 head、checker 变更、公开讨论和实时 CI。

Comment thread .github/workflows/ci.yml Outdated
Comment thread scripts/check-icon-size.mjs
@Astro-Han

Copy link
Copy Markdown
Contributor

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Dynamic icons escape governance 🐞 Bug ⚙ Maintainability
Description
Fix-now: callback parameters are always bound as non-icons, so the Comp produced from
Object.entries(Icons) is not recognized and changing the story back to <Comp size={20}> produces
no violation. The CI check therefore does not enforce the exact story call site this PR claims to
govern.
Code

scripts/check-icon-size.mjs[R151-155]

+function bindParams(scope, node) {
+  const params = node.params ?? [];
+  for (const param of params) {
+    for (const name of patternNames(param)) defineBinding(scope, name, 'not-icon');
+  }
Relevance

●●● Strong

Accepted precedents favor fixing concrete script enforcement gaps, especially parser failures that
omit required diagnostics or checks.

PR-#3188
PR-#3154

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The story builds LUCIDE_ICONS from the imported icon namespace and destructures each entry into
the callback parameter Comp, which is rendered as the icon. The checker nevertheless assigns all
callback parameters the not-icon binding, while governed JSX tags must resolve specifically to
icon; therefore a numeric size on this Comp is skipped.

packages/ui/stories/icons.stories.tsx[32-34]
packages/ui/stories/icons.stories.tsx[57-70]
scripts/check-icon-size.mjs[151-155]
scripts/check-icon-size.mjs[205-215]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The icon-size checker treats every function or callback parameter as `not-icon`. Consequently, the `Comp` parameter in the icon story's `LUCIDE_ICONS.map(...)` callback is disconnected from the icon namespace that populated the collection, allowing raw numeric sizes to pass CI.

## Issue Context
The story intentionally derives its icon list from `Object.entries(Icons)` so it remains synchronized with the centralized icon export seam. Deleting that dynamic path or replacing it with a manually maintained list would duplicate authority; reuse the existing scope/binding analyzer by propagating known icon provenance through the collection and destructured callback binding. Add regression coverage for the actual story pattern; this adds limited data-flow state and corresponding test maintenance because the existing direct-binding model cannot represent this provenance.

## Fix Focus Areas
- scripts/check-icon-size.mjs[151-155]
- scripts/check-icon-size.mjs[251-262]
- scripts/check-icon-size.test.mjs[11-26]
- packages/ui/stories/icons.stories.tsx[32-33]
- packages/ui/stories/icons.stories.tsx[57-70]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: ⚖️ Balanced: This adds a runtime-enforced CI check with substantial custom AST/scoping logic and several icon call-site changes, creating real correctness and maintenance risk, but it remains one localized concern rather than a bug-dense multi-path change warranting redundant review.

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread scripts/check-icon-size.mjs Outdated
@Astro-Han

Copy link
Copy Markdown
Contributor

This PR changes icon sizing in visible Settings surfaces. Could you please add screenshots confirming the resulting About hero icon and request-header delete icon? A compact before/after composite is fine. Thanks!

Posted by Codex on behalf of Astro-Han.

@1625567290
1625567290 force-pushed the fix/ui-icon-size-scale branch from d4259f4 to d99b72c Compare August 23, 2026 07:07
@Astro-Han

Copy link
Copy Markdown
Contributor

Hi — this PR conflicts with current main and cannot be merged as-is.

I tested a rebase onto current main locally (in a throwaway worktree — your branch was not touched). It stops on these files:

  • .github/workflows/ci.yml
  • apps/desktop/src/renderer/settings/about-settings-page.tsx

These are real source conflicts, so they need your judgement rather than a mechanical rebase — please rebase onto current main and resolve them yourself, then push. Once the branch is conflict-free and CI is green on the new head, I will pick it up for review.

git fetch upstream && git rebase upstream/main
# resolve, then
git push --force-with-lease

Thanks for the contribution — happy to help if any conflict is unclear.


AI-assisted maintenance note, not a review. It does not count as the required human review under CONTRIBUTING.md §Review.

@1625567290

Copy link
Copy Markdown
Contributor Author

@Astro-Han Rebased onto current main (6ada6b546) and force-pushed d99b72c11.

The five governed 18px-era additions from current main are now migrated: three queue-row/retract icons in composer-message-queue.tsx and the Queue/Steer pair in composer.tsx, all using ICON_SIZE.control while preserving their rendered 14px size. The checker still covers direct literals, statically provable expressions, lexical aliases, spreads, namespace-derived icons, and controlled collection callbacks.

Local validation passed: icon checker 7/7 plus full repository scan, UI 213/213, workspace dependency build, Desktop typecheck, lint, format, ASF headers, and diff checks. I also rendered the real AppShell Storybook surface with both queued-message rows and the Queue/Steer control; all five target SVGs measured 14×14 with no clipping or layout shift. Fresh CI is pending and may need workflow approval.

@1625567290
1625567290 force-pushed the fix/ui-icon-size-scale branch from d99b72c to e75619a Compare August 23, 2026 12:00
@1625567290

1625567290 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

@Astro-Han Rebased onto current main (a2f2a1afa) and force-updated the branch to e75619a0c; GitHub reports it mergeable.

The conflict resolution preserves the current aboutContent loading/error flow and the current draggable queue UI, while applying ICON_SIZE only to the icon surfaces that still exist on main.

Exact-head local validation:

  • icon-size contract tests: 7/7
  • repository icon-size scan: clean
  • UI typecheck
  • Desktop typecheck
  • ASF header check
  • changed-file Biome check
  • git diff --check

Ready for fresh exact-head CI.

The fresh workflows are waiting for maintainer approval: CI 32638150941, Dependency audit 32638150976, and Release Windows check 32638151196. Please approve all three exact-head runs.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the rework — the earlier findings all look closed to me at e75619a0c35d5ad1d93bcc0e6f90830f2982172a. The five 18px call sites in remote-project-directory-dialog.tsx are migrated to ICON_SIZE, and @babel/parser is correctly a devDependency used only by the checker, so it stays out of shipped artifacts. One thing left below.

[P2] The required icon-size gate misses computed lookups into a statically closed icon record

packages/ui/src/task-ledger-panel.tsx:37-44 declares

const STATUS_ICONS = {
  pending: Clock,
  in_progress: CircleGauge,
  ...
} satisfies Record<TaskStatus, typeof Clock>;

Every value is a canonical Lucide import and the type is closed, so this is exactly the "derived icon collection" the checker's own docstring (scripts/check-icon-size.mjs:21-25) promises to govern. But :175 reaches it with a computed lookup, const StatusIcon = STATUS_ICONS[task.status], and inferExpressionValue at scripts/check-icon-size.mjs:136-148 only infers member expressions guarded by !unwrapped.computed. The computed form falls through to unknown, so isGovernedIconTag (:414-417) does not treat <StatusIcon> at :191 as a governed icon.

Reproduced on an exact-head worktree:

probe result
unmodified head icon size scale: ok, exit 0
<StatusIcon size={16}> icon size scale: ok, exit 0
<StatusIcon size={13}> icon size scale: ok, exit 0
positive control — <AlertTriangle size={13}> in chat-model-switcher.tsx:240 exit 1, correctly flagged

The positive control confirms the checker itself works; the computed lookup is what escapes it.

To be explicit about severity: the UI is correct today, so there is no runtime defect. The problem is contract scope — a maintainer can put an arbitrary off-scale raw pixel on this existing status icon and the required gate stays green, while the script advertises coverage of derived collections.

Suggested direction: when a static record's values are all icons, preserve that provenance through a computed lookup so the element kind stays icon, and add a STATUS_ICONS[status] regression case. If you would rather not generalize, the alternative is to narrow the docstring and drop the claim of covering derived collections — the risk is leaving the middle state, where the promise is broader than the analysis.


ran: exact-head worktree checker baseline, the three mutation probes and the positive control above, plus a read of the record/lookup/JSX-tag branches in the checker.
did-not-run: the repository test suites. Hosted checks at this exact head are not fully terminal yet — audit is success; the CI and Windows runs were still in progress at the time of writing, so please treat their outcome as unverified here.

@Astro-Han

Copy link
Copy Markdown
Contributor

Follow-up on the CI note in my previous review: hosted checks at e75619a0c35d5ad1d93bcc0e6f90830f2982172a are now all terminal — test, package and audit are each completed/success. The [P2] above is unchanged; this is only to correct the "unverified" caveat I wrote while those runs were still in progress.

@1625567290
1625567290 force-pushed the fix/ui-icon-size-scale branch from e75619a to 9500d9b Compare August 23, 2026 14:12
@1625567290

Copy link
Copy Markdown
Contributor Author

@Astro-Han Addressed the remaining P2 at 9500d9bc610471190e1775e2b4d74181c9c4ebe7, rebased onto current main at 6b48ed36fc37882b2eec0c90cc53902656a14f74.

Computed record lookup now preserves icon provenance only when the object literal is statically closed, non-empty, and every value resolves to a governed icon. Mixed records and records containing computed properties or spreads remain unknown, so the checker does not broaden into false positives.

Regression coverage includes the concrete STATUS_ICONS[status] pattern behind a satisfies Record<...> expression and negative cases for mixed/open records. A mutation of the real task-ledger-panel.tsx from ICON_SIZE.control to size={13} is now rejected.

Exact-head local validation passed:

  • icon-size contract tests: 9/9 and repository scan clean
  • real task-ledger mutation probe: rejected
  • UI tests: 220/220
  • workspace build and typecheck
  • lint, format, ASF headers, CI planner 29/29, and diff checks

Fresh hosted CI is pending on the new head.

variant="ghost"
size="sm"
icon={<Copy size={14} aria-hidden="true" />}
icon={<Copy size={ICON_SIZE.chrome} aria-hidden="true" />}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Same leftover pixel, different rung.

This Copy sits on Button size="sm", same as the copy-path button above (:201), which already uses ICON_SIZE.control (14). The raw size={14} here was that same 14.

ICON_SIZE.chrome is 16 — the Astryx sm slot fill. Mapping only this leftover to chrome changes the glyph and splits two identical copy-on-sm-button call sites.

If the intent is “sm button → chrome”, both should move. If the intent is “preserve the leftover 14 / match the sibling”, this should be ICON_SIZE.control. The checker only bans raw pixels, so it cannot catch a wrong rung.

key={candidate.id}
label={candidate.label}
icon={<FolderOpen size={18} aria-hidden="true" />}
icon={<FolderOpen size={ICON_SIZE.control} aria-hidden="true" />}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Same leftover 18px, two rungs.

FolderOpen / Check size={18}ICON_SIZE.control (14). A few lines down, Eye / EyeOff size={18}ICON_SIZE.chrome (16). Role-based snapping is what the scale is for (list startContent vs footer affordance), but 18 was not a rung, so both glyphs change size and they no longer match each other. Calling it out so the visual delta is deliberate, not an accident of nearest-rung.

className="settingsAboutHero"
as="h2"
icon={<Sparkles size={30} /> /* 64% of the 48px plate, matching .providerLogo's fill */}
icon={<Sparkles size={ICON_SIZE.plate} /> /* plate glyph inside the About hero mark */}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] size={30} was “64% of the 48px plate” (≈30.7). ICON_SIZE.plate is 28, so this shrinks 2px. Fine if plate is the law; the old 64% comment should not be read as still true.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (kabi-grok)

Exact head 9500d9bc610471190e1775e2b4d74181c9c4ebe7. COMMENT only; not merging.

ICON_SIZE rungs on this head: meta 13 / control 14 / chrome 16 / empty 20 / plate 28.

What looks right

  • Trash2 size={16}ICON_SIZE.chrome preserves 16.
  • Story size={20}ICON_SIZE.empty preserves 20.
  • check:icon-size is wired on the code path in ci.yml. test on this SHA is completed/success.
  • I did not find remaining raw lucide size={N} in the checker globs on this head (the leftover product pixels this PR names are gone as raw numbers).

Findings

Inline comments have the file:line detail.

  • [P2] session-inspector-panel.tsx:733 — leftover Copy size={14} mapped to chrome (16). The other sm-button Copy in the same file (:201) already uses control (14). Same pixel, same button size, now two rungs. Checker cannot catch a wrong rung.
  • [P3] remote-project-directory-dialog.tsx — leftover 18 splits to control (14) vs chrome (16). Role-based snapping is the scale’s point; the glyphs no longer match and both change size.
  • [P3] about-settings-page.tsx:17030plate (28), 2px under the old “64% of 48px” comment.
  • [P3] scripts/check-icon-size.mjs (~553 lines + @babel/parser) is a lot of machinery to keep five rungs. It is a real guard, not dead code; just heavier than the five call sites. No change requested.

Checks

  • test: completed / success on this head.
  • audit and Windows package: action_required (fork workflow approval), not success. I am not treating them as green. I am also not waiting on checks this path filter would not schedule.

Verdict

NO-GO for APPROVE until the P2 Copy rung is resolved (either both sm Copies use control, or both use chrome). No REQUEST_CHANGES.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Converge icon sizes onto a governed scale

3 participants