Skip to content

feat(ui): icon semantic remap + stroke unification + governance contract - #662

Merged
jackwener merged 1 commit into
mainfrom
feat/icon-typography-governance
Jul 9, 2026
Merged

feat(ui): icon semantic remap + stroke unification + governance contract#662
jackwener merged 1 commit into
mainfrom
feat/icon-typography-governance

Conversation

@jackwener

Copy link
Copy Markdown
Member

Icon + typography governance round (user rejected the old sidebar vs a competitor's: wrong icon semantics, mixed icon families, weak nav text).

Semantic remap (icons say the function)

Sidebar: 新任务 SquarePen→Plus · 每日回顾 LineChart→CalendarCheck · 技能 Sparkles→Blocks · 定时任务 Clock→Timer. Skill-entity icons across skills-panel + palette nav follow to Blocks; Sparkles kept only where it genuinely means AI-magic (deep-research launcher, hero, onboarding hint — 7 sites, each audited).

One stroke family

Deleted all 167 per-callsite strokeWidth={...} props (12 distinct values, 1.5→3). Icons ride the governed D5 rule svg.lucide { stroke-width: 1.75 } (already contract-pinned) — one uniform stroke, verified via CDP computed style. Brand assets (provider marks) exempt.

Nav typography

Nav rows now font-medium (500), matching the reference density; active stays semibold.

Governance encoded

New icon-governance-contract.test.ts: bans callsite strokeWidth, pins the sidebar semantic mapping, pins icons.tsx as the sole lucide-react funnel. Two stale contracts re-pinned to the strokeless form.

Verification

  • 2284/2284 desktop tests (re-verified after merge onto main), check-dead-css clean
  • CDP probe: nav icons render lucide-plus/calendar-check/blocks/timer, weights 500/600, single stroke-width 1.75px

Implemented by an opus worktree agent to the maintainer's decided spec; reviewed and re-verified before merge.

Sidebar icons rejected vs competitor: semantics were wrong and the glyph
family fragmented (12 different strokeWidth values from 1.5→3 across 163
call sites), nav text too weak.

Semantic remap (session-sidebar-nav.tsx):
  新任务  SquarePen → Plus
  每日回顾 LineChart → CalendarCheck
  技能    Sparkles  → Blocks
  定时任务 Clock     → Timer
  设置    Settings  (unchanged)
Blocks also replaces Sparkles on skill-entity surfaces: skills-panel skill
rows / empty-state / featured card, and the ⌘K "打开 · 技能" nav jump.
Sparkles is kept where it genuinely means AI-magic: 新建深度研究 (⌘K),
深度研究 mode pill, hero avatar / deep-research eyebrow, onboarding hint,
first-run checklist, about page. Blocks/CalendarCheck/Timer added to the
icons.tsx funnel (alphabetized); Plus/Settings already exported.

Stroke unification: deleted every per-call-site strokeWidth={...} prop
across apps/desktop/src/renderer and packages/ui/src (~163 call sites) so
all lucide glyphs ride the single governed svg.lucide weight (D5). Brand
assets (bot-brand-logo.tsx, provider-brand-marks.tsx) untouched.

Nav typography: navRowVariants base now carries font-medium (weight 500);
active rows keep semibold. Settings footer already font-medium.

Contract (icon-governance-contract.test.ts) pins: (a) no strokeWidth={ in
renderer/ui .tsx outside brand-asset files, (b) the sidebar imports exactly
Plus/CalendarCheck/Blocks/Timer/Settings from ./icons.js, (c) icons.tsx is
the only lucide-react importer in packages/ui/src. Updated two collision
pins (model-oauth-section, subagent-ui) to the stroke-less <X> form.
@jackwener
jackwener merged commit deb2713 into main Jul 9, 2026
3 checks passed
Astro-Han added a commit that referenced this pull request Jul 9, 2026
…overnance) (#646)

Merging main brought in #662's icon governance contract, which forbids
per-call-site strokeWidth props. The Loader2 spinner in ModelProcessingIndicator
still carried one; ride lucide's governed default stroke instead.
jackwener added a commit that referenced this pull request Jul 9, 2026
…one splits from info (#697)

- Maintainer: the expanded sidebar row (Plus since #662) and the
  collapsed topbar compose button (SquarePen) showed different icons
  for the same action — unified on SquarePen, the collapsed one, per
  instruction. icon-governance contract re-pinned.
- Found while sweeping 健康: --warning was literally var(--info) — the
  提示 and 警告 tiers rendered the same amber and could not be told
  apart. Warning now steps deeper + more orange (l .75→.66, h 70→55)
  with its own --warning-text mix; info keeps its amber. CDP capture
  confirms the two tiers finally read differently.

Desktop 2296/2296.
@Astro-Han
Astro-Han deleted the feat/icon-typography-governance branch July 14, 2026 05:05
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.

1 participant