Skip to content

fix(emcn): normalize the folder icon family to the house geometry - #6262

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/emcn-folder-icon-parity
Aug 4, 2026
Merged

fix(emcn): normalize the folder icon family to the house geometry#6262
waleedlatif1 merged 1 commit into
stagingfrom
fix/emcn-folder-icon-parity

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Folder and FolderCode both carried a fill-based construction in a tight viewBox with a hairline stroke, while FolderOpen was the house-standard stroke outline. Measured at size-[14px]:

icon glyph stroke
standard (pencil) 10.8px 0.90px baseline
folder-open 10.9px 0.90px ✅ already correct
folder (before) 20.6px 0.28px ❌ ~2× size, ⅓ weight
folder-code (before) 19.9px 0.28px ❌ ~2× size, ⅓ weight

Both now measure 10.1px / 0.90px.

Why it was visible

  • Folder vs FolderOpen toggle in place in the sidebar folder rows — expanding a folder visibly shrank its icon.
  • FolderCode renders in Chat's TOOL_ICONS map for glob/mv/mkdir, directly beside standard-geometry Search, File, and Database.

Neither appeared before the lucide migration — lucide shipped all three as matched 24-boxes.

Fix

Folder is redrawn as FolderOpen's own body outline closed along the bottom-right; FolderCode reuses that body path byte-identically and insets code brackets centred on the body (x 9.125, y 11.25). The family now shares one silhouette and one weight by construction.

Call-site safety

Changing a viewBox is never a one-file change. All 19 <Folder> and 4 <FolderCode> sites audited:

  • Explicitly sized — all square; none sized to the old 14.5:13 / 15:13 aspect, so nothing letterboxes.
  • Unsized (7 Folder) — all inside DropdownMenuItem or SettingsResourceRow, which force-size via [&_svg]:size-[14px], absorbing the intrinsic change.
  • FolderCode consumers (agent-group, FeaturePlatformPanel, agent-code-graphic) all pass an explicit square size-*.

Checks

biome clean · type-check --force 23/23 (0 cached)

Deliberately not changed

  • connections (21.5px / 0.22px) is the same class, but it is a filled glyph for Integrations — correcting its size is mechanical, converting it to a stroke outline changes its character. Wants its own design call.
  • zoom-in/zoom-out/undo/redo measure 0.99px stroke vs the 0.90px standard — within tolerance, not worth churning.
  • play is deliberately filled; PlayOutline is its stroke counterpart and is what TOOL_ICONS already uses.

Unrelated finding (not addressed here)

TOOL_ICONS (message-content/utils.ts) has 73 keys mixing agent names with tool names, but its sole consumer getAgentIcon(agentName) is only ever called with sub-agent names. The tool-name subset appears dead. Worth a separate look — either the map should be pruned, or per-tool icons were meant to render somewhere and don't.

Folder and FolderOpen toggle in place in the sidebar folder rows, but
carried incompatible geometry: Folder was a fill-based outline in a
tight 14.5x13 box at stroke 0.3, while FolderOpen is the house-standard
stroke outline in -1 -2 24 24 at stroke 1.55.

A square size-[16px] therefore scaled the closed folder to ~16x14.3px
where the open one renders ~11.3x10px, so expanding a folder visibly
shrank its icon.

Redraw Folder as FolderOpen's own body outline closed along the
bottom-right, so the pair shares a silhouette, a box and a stroke
weight by construction.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 4, 2026 8:12pm

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Single icon asset change in emcn with no logic or API changes; visual-only risk is consistent sizing at existing call sites that already use square dimensions or parent-forced SVG sizes.

Overview
Redraws the Folder icon so it matches FolderOpen when sidebar folder rows toggle between closed and open states.

The closed folder moves from a small filled outline (14.5×13 viewBox, thin stroke) to the same 24×24 canvas, viewBox='-1 -2 24 24', stroke-only rendering, and strokeWidth='1.55' as FolderOpen, using a path derived from the open icon’s body closed along the bottom-right. That removes the visible shrink/grow when expanding a folder under square sizing (e.g. size-[16px]).

Documentation in the component explains the pairing intent for future icon work.

Reviewed by Cursor Bugbot for commit 86532fe. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR redraws the closed Folder icon to match FolderOpen when toggled in place.

  • Aligns both icons on the same 24×24 viewBox and intrinsic dimensions.
  • Replaces the filled outline with matching stroke geometry, weight, and line caps.
  • Preserves caller overrides by applying SVG props after the defaults.

Confidence Score: 5/5

The PR appears safe to merge, with the Folder geometry consistently aligned to FolderOpen and existing call-site sizing preserved.

The changed SVG uses the same viewport, dimensions, stroke defaults, and body silhouette as FolderOpen, while current callers constrain sizing and do not depend on the former fill or stroke attributes.

Important Files Changed

Filename Overview
packages/emcn/src/icons/folder.tsx Replaces the closed folder’s mismatched filled geometry with a stroked outline matching FolderOpen; no actionable issue was identified.

Reviews (1): Last reviewed commit: "fix(emcn): match Folder icon geometry to..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit 8ca3b27 into staging Aug 4, 2026
24 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/emcn-folder-icon-parity branch August 4, 2026 20:13
@waleedlatif1 waleedlatif1 changed the title fix(emcn): match Folder icon geometry to FolderOpen fix(emcn): normalize the folder icon family to the house geometry Aug 4, 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