fix(emcn): normalize MoreHorizontal and TerminalWindow geometry - #6265
Conversation
MoreVertical was migrated to the house geometry; MoreHorizontal was left on its original 0 0 12 3 fill construction. Because that box is far wider than it is tall, a square size class scales it by 14/12 and the dots stretch edge to edge: 3.17px dots across a 14px span, where MoreVertical draws 1.78px dots across 8.78px. The two are the same glyph rotated 90deg and sit in the same overflow-menu role, so the mismatch is visible on any row carrying one. Redraw MoreHorizontal as the exact transpose of MoreVertical about (10.25, 9.75). Both now measure 8.80px. TerminalWindow had the same problem in the resource registry tab strip, where ten icons render side by side at size-[14px]: it drew 14.00px filled against neighbours at 10.30-12.05px on a 0.90px stroke. Redraw it on the 24-box keeping its character - a window, a title bar, three chrome dots. Now 10.85px. Three call sites needed updating alongside the viewBox change: - panel.tsx passed no size and sat in a Button, which does not force-size its svg children, so the icon would have jumped to its new 24x24 intrinsic size inside a 30px button. - The two sidebar size-[9px] values were compensations for the oversized glyph (9px against a 12-wide box happens to yield a ~9px span). Against the 24-box they would render 5.64px, so they move to size-[14px], which lands at 8.78px - exactly MoreVertical.
PR SummaryLow Risk Overview
Call sites in Reviewed by Cursor Bugbot for commit fa4549e. Configure here. |
Greptile SummaryThe PR normalizes
Confidence Score: 5/5The PR appears safe to merge with no concrete regressions identified in the changed icon geometry or affected call sites. The new SVG strokes remain within their viewBoxes, MoreHorizontal matches its vertical sibling by construction, and current callers constrain both normalized icons to appropriate square dimensions.
|
| Filename | Overview |
|---|---|
| packages/emcn/src/icons/more-horizontal.tsx | Replaces the oversized filled glyph with a correctly bounded stroked transpose of MoreVertical. |
| packages/emcn/src/icons/terminal-window.tsx | Redraws the terminal window on the shared square icon geometry without clipping its strokes. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx | Explicitly constrains the normalized MoreHorizontal icon to 14px in the panel action button. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx | Removes two obsolete 9px compensations and sizes the normalized overflow icon consistently at 14px. |
Reviews (1): Last reviewed commit: "fix(emcn): normalize MoreHorizontal and ..." | Re-trigger Greptile
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The sidebar row's
...renders visibly oversized. Root cause:MoreVerticalwas migrated to the house geometry andMoreHorizontalwas left behind.MoreVertical-1 -2 24 241.55MoreHorizontal(before)0 0 12 3MoreHorizontal(after)-1 -2 24 241.55(measured at
size-[14px])They are the same glyph rotated 90°, in the same overflow-menu role. Because
12×3is far wider than tall, a square size class scales by14/12and the dots stretch edge-to-edge, while every neighbour on that row sits well inside (Folder9.7px,ChevronRight9.4px,Lock11.2px).Redrawn as the exact transpose of
MoreVerticalabout(10.25, 9.75)— same radius, same stroke, same 6-unit spacing. Both now measure 8.80px, mirrored (8.8×1.8vs1.8×8.8).TerminalWindow— same class, found by the sweepRESOURCE_REGISTRYrenders ten icons side by side as tabs atsize-[14px]:Redrawn on the 24-box keeping its character (window + title bar + three chrome dots): now 10.85px, and the strip is uniform at 10.30–12.05px / 0.90px stroke.
Call-site changes that must ship with the viewBox change
panel.tsx:696passed no size inside<Button className='size-[30px]'>.Buttonhas no[&_svg]:size-*, so the icon renders at its intrinsic size — it would have jumped12×3 → 24×24inside a 30px button. Now explicitlysize-[14px].sidebar.tsx:274and:1615usedsize-[9px]— compensations for the oversized glyph (9px against a 12-wide box yields a ~9px span). Against the 24-box they would render 5.64px, so they move tosize-[14px]→ 8.78px, exactlyMoreVertical.Every other site was verified: 8 more
MoreHorizontalsites already pass a square size; the two unsized ones sit insideDropdownMenuItemAction, which force-sizes[&_svg]:size-[16px]. All 6TerminalWindowsites resolve to square sizes (3 explicit, 3 via callerclassName—resource-tabssize-[14px],recently-deletedsize-5,ContextMentionIconsize-[12px]/size-[14px]). No aspect-ratio (h-[N] w-[M]) sizing anywhere in either call graph, so nothing letterboxes.How this was found
All 168 icon components were measured by rendering each at 20× and scanning the alpha channel for its true ink bounding box, rather than estimating from path coordinates. Median span is 11.45px at
size-[14px]. Both redraws were rendered against their real neighbours and visually checked before committing.Verified not bugs
Sim,Wordmark,Blimp— brand marks;Play— deliberately filled (PlayOutlineis the stroke variant)BubbleChatClose/Preview— both0 0 14 14filled at 12.6px, but they only ever toggle against each otherDocumentAttachment— 13.55px, but zero call sites (exported from the barrel, unused)0 0 24 24/0.90stroke — that's glyph shape, not geometryChecks
biomeclean ·type-check --force23/23 (0 cached) · no test references either icon; the 5 sidebar collection errors are pre-existing — a pristineorigin/stagingworktree reproduces the same 5 with zero changes applied.