Skip to content

refactor(web): replace hand-written icons with Remix Icon - #1293

Merged
wbxl2000 merged 3 commits into
mainfrom
web/icon-refresh
Jul 2, 2026
Merged

refactor(web): replace hand-written icons with Remix Icon#1293
wbxl2000 merged 3 commits into
mainfrom
web/icon-refresh

Conversation

@wbxl2000

@wbxl2000 wbxl2000 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — this is a web UI polish pass discussed inline with the maintainer.

Problem

The web UI shipped a hand-written SVG icon set whose glyphs were drawn on mixed source grids (12/16/20/24) with inconsistent strokes, so aligning them required ad-hoc per-icon pixel offsets scattered through the CSS. The message-stream action buttons (copy on user/assistant messages, undo) had also drifted apart: different hover colors/backgrounds, a missing tooltip on the assistant copy button, an inline "Undo" label that only appeared on hover, and slightly different button sizes.

What changed

  • Replaced the hand-written icon registry with a tree-shaken subset of Remix Icon, generated at build time from @iconify-json/ri via @iconify/utils (pnpm gen:icons). The <Icon> / iconSvg() API is unchanged, so the ~40 call sites are untouched.
  • Added a chat-new icon and used it for the new-chat buttons; the workspace "new chat in group" button now reveals on hover.
  • Unified the message copy and undo buttons: same hover color/background and tooltip, dropped the undo hover label, and aligned the button sizes.
  • Switched the mobile switcher kebab to the horizontal dots icon and tweaked the sidebar search colors.
  • Regenerated the design-system icon catalog and removed the now-unneeded icon-alignment pixel offsets.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Generate a tree-shaken Remix Icon subset at build time via @iconify/utils + @iconify-json/ri, keeping the <Icon>/iconSvg() API.

Add a chat-new icon for the new-chat buttons and reveal the workspace 'new chat in group' button on hover. Unify the message copy and undo buttons (matching hover style and tooltip, drop the undo hover label, align sizes). Switch the mobile switcher kebab to the horizontal dots icon and tweak sidebar search colors. Regenerate the design-system icon catalog.
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d29bee

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

❌ Nix build failed

Hash mismatch in pnpmDeps:

Hash
specified sha256-o753txNKfBcn/fiJOWFU0lyrSqTUJ/GU1ed1DPVPZ2U=
got sha256-+hTrX3pa8fjK+eh4q2BqOEAm9C7zvMXrKf4bwbJoG98=

Please update flake.nix with the got hash.

@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@5d29bee
npx https://pkg.pr.new/@moonshot-ai/kimi-code@5d29bee

commit: 5d29bee

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18a7f1448c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +265 to +266
.gh .gh-more,
.gh .gh-add { display: none; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the workspace add button reachable

When navigating the sidebar without a mouse, the newly hidden .gh-add button is removed from layout and the tab order by display: none; the later :focus-visible reveal rule cannot fire because the button can never receive focus while hidden. This regresses the previously visible "new chat in this workspace" action for keyboard users (and desktop touch contexts without hover), so hide it with opacity/visibility while preserving focusability or reveal it on header focus-within.

Useful? React with 👍 / 👎.

Comment on lines +655 to +659
<button
class="a-cpbtn"
@click="copyAssistantRun(ti)"
>
<Icon v-if="copiedTurn !== turn.id" name="copy" size="sm" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore an accessible name for assistant copy

For assistant messages with copyable text, this button now contains only decorative <Icon> children; Icon sets aria-hidden when no label is supplied, and Tooltip only renders a visual hint rather than naming the control. The removed text span used to provide the accessible name, so screen-reader users now encounter an unlabeled button here; add an aria-label or visually hidden copy text.

Useful? React with 👍 / 👎.

Restore accessible names (aria-label) on the message copy and undo buttons. Keep the workspace add button reachable for keyboard users by revealing it on header focus-within. Update the nix pnpmDeps hash for the newly added icon dependencies.
@wbxl2000

wbxl2000 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 002e4a0ff2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

focused). `.gh .gh-more` / `.gh .gh-add` out-specificity IconButton's display
so the hidden default wins. */
.gh .gh-more,
.gh .gh-add { display: none; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the workspace add button reachable without hover

In keyboard-only or non-hover contexts, hiding .gh-add with display: none removes the “new chat in this workspace” control from the tab order, so the later .gh-add:focus-visible/.gh:focus-within reveal rules cannot fire before the button is already focusable. This regresses the previously visible per-workspace create action for users who cannot hover the desktop sidebar; consider revealing it with focusable/visible mechanics or an explicit focus path instead of display: none.

Useful? React with 👍 / 👎.

Keep the workspace add/more buttons focusable without hover by revealing them via opacity instead of display:none, so keyboard and non-hover users can reach the control.

Drop explicit .ts extensions in icon imports to satisfy oxlint, and read the design-system icon catalog directly from the generated icon data.
@wbxl2000

wbxl2000 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 5d29bee6cd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@wbxl2000
wbxl2000 merged commit 6a469b3 into main Jul 2, 2026
9 checks passed
@wbxl2000
wbxl2000 deleted the web/icon-refresh branch July 2, 2026 06:20
@github-actions github-actions Bot mentioned this pull request Jul 2, 2026
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