From b98dd8ba5e64366f726bcaf217ccb19e8e1730f9 Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 4 Aug 2026 14:37:03 -0700 Subject: [PATCH] fix(emcn): normalize MoreHorizontal and TerminalWindow geometry (#6265) 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. --- .../w/[workflowId]/components/panel/panel.tsx | 2 +- .../w/components/sidebar/sidebar.tsx | 4 +-- packages/emcn/src/icons/more-horizontal.tsx | 31 ++++++++++--------- packages/emcn/src/icons/terminal-window.tsx | 27 ++++++++++------ 4 files changed, 36 insertions(+), 28 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx index 301614bd00..953902ec06 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx @@ -693,7 +693,7 @@ export const Panel = memo(function Panel() { diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx index ee944c2322..0b0515f5b5 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx @@ -271,7 +271,7 @@ const SidebarChatItem = memo(function SidebarChatItem({ isMenuOpen && 'opacity-100' )} > - + )} @@ -1612,7 +1612,7 @@ export const Sidebar = memo(function Sidebar({ {isImporting || isCreatingFolder ? ( ) : ( - + )} diff --git a/packages/emcn/src/icons/more-horizontal.tsx b/packages/emcn/src/icons/more-horizontal.tsx index 505c0ef01d..0f513b96d2 100644 --- a/packages/emcn/src/icons/more-horizontal.tsx +++ b/packages/emcn/src/icons/more-horizontal.tsx @@ -2,31 +2,32 @@ import type { SVGProps } from 'react' /** * MoreHorizontal icon component (three horizontal dots) + * + * The exact transpose of {@link MoreVertical} about (10.25, 9.75) — same radius, + * same stroke, same 6-unit spacing. The two are the same glyph rotated 90deg and + * appear in the same overflow-menu role, so they must match by construction + * rather than by coincidence. + * * @param props - SVG properties including className, fill, etc. */ export function MoreHorizontal(props: SVGProps) { return ( ) } diff --git a/packages/emcn/src/icons/terminal-window.tsx b/packages/emcn/src/icons/terminal-window.tsx index 9eb411955a..fa2cd63ad2 100644 --- a/packages/emcn/src/icons/terminal-window.tsx +++ b/packages/emcn/src/icons/terminal-window.tsx @@ -2,26 +2,33 @@ import type { SVGProps } from 'react' /** * Terminal window icon component + * + * Redrawn on the house geometry (24-box, 1.55 stroke, round joins) so it sits at + * the weight of the icons it shares the resource registry tab strip with. The + * original character is kept: a window with a title bar and three chrome dots. + * * @param props - SVG properties including className, fill, etc. */ export function TerminalWindow(props: SVGProps) { return ( ) }