fix(emcn/header): icon consistency — breadcrumb menus, Connections, FolderCode - #6263
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 99b3f62. Configure here. |
Greptile SummaryThe PR standardizes breadcrumb action menus by adding icons to folder actions and redraws Connections and FolderCode on the shared 24-unit outline geometry.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/files/files.tsx | Adds the established Pencil component to the folder breadcrumb Rename action. |
| apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx | Adds established Pencil and Trash components to folder breadcrumb actions using the existing dropdown contract. |
| apps/sim/app/workspace/[workspaceId]/tables/tables.tsx | Adds Pencil and Trash icons to folder actions without changing permissions or action behavior. |
| packages/emcn/src/icons/connections.tsx | Replaces the filled Connections glyph with bounded stroke geometry whose known callers provide explicit sizing. |
| packages/emcn/src/icons/folder-code.tsx | Aligns FolderCode with the Folder outline geometry; known callers provide explicit square sizing. |
Reviews (3): Last reviewed commit: "fix(emcn): match FolderCode geometry to ..." | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6d971d5. Configure here.
The resource crumb's menu (table, knowledge base, document, file) rendered Rename/Tags/Share/Download/Delete with icons, but the folder crumb's menu rendered bare labels. The two open from adjacent segments of the same breadcrumb, so the inconsistency was visible side by side. Add the matching icons to the three folder-crumb menus.
Connections was a filled glyph in a tight 0 0 13 13 box with a 0.2 hairline stroke. At size-[14px] it rendered a 21.5px glyph at 0.22px stroke where its neighbours render ~10.5px at 0.90px, so it read as a different weight class in the resource registry it shares with Library, Globe and Database. Redraw as a stroke outline on the 24-box at 1.55, preserving the topology: a 2x2 grid with a circle top-right, linked along the top, down the right column, and along the bottom. Now 10.9px at 0.90px.
FolderCode carried the same fill-based construction Folder did: a tight 0 0 15 13 box with a 0.3 hairline stroke. At size-[14px] it rendered a 19.9px glyph at 0.28px stroke where a standard icon renders ~10.5px at 0.90px — roughly twice the size at a third the weight. It renders in Chat's TOOL_ICONS map for glob/mv/mkdir, directly beside Search, File and Database, so the mismatch was visible in a single list. Reuse Folder's body path verbatim and inset code brackets centred on the body, so the whole folder family shares one silhouette and one weight.
6d971d5 to
99b3f62
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 99b3f62. Configure here.
Some resource-header breadcrumb dropdowns rendered icons next to their labels and some rendered bare text. The split turned out to be perfectly systematic:
Resource crumb menus — all had icons
tables/[tableId]/table.tsx:1097knowledge/[id]/base.tsx:892knowledge/[id]/[documentId]/document.tsx:541files/files.tsx:1260Folder crumb menus — none had icons
files/files.tsx:1794tables/tables.tsx:463knowledge/knowledge.tsx:923Both menus open from adjacent segments of the same breadcrumb, so the inconsistency was visible side by side. This adds
Pencil/Trashto the three folder-crumb menus, reusing the exact icons their resource-crumb counterparts already use.DropdownOption.iconwas already optional and already rendered byresource-header.tsx:332— no component change needed.Swept for stragglers
A repo-wide scan for
{ label, onClick }options without aniconin any file buildingdropdownItems/currentFolderActionsnow returns zero. Three initial hits were false positives, left as-is:table.tsx:1165andfiles.tsx:1127— toast actions (toast.error(..., { action })), not menu items.files.tsx:1244— the root "Files" crumb itself, which takes its glyph from the header'scrumb.icon ?? Iconfallback.Checks
biomeclean ·type-check --force23/23 (0 cached)Also in this PR:
Connectionsredrawn on the house geometryConnectionswas a filled glyph in a tight0 0 13 13box with a0.2hairline stroke. Measured atsize-[14px]:libraryglobedatabasepencilconnections(before)connections(after)It sits in
RESOURCE_REGISTRYbesideLibrary,GlobeandDatabaseand renders through the samerenderTabIcon(className), so it read as a different weight class in a single row.Redrawn as a stroke outline on the 24-box at
1.55, preserving the topology: a 2×2 grid with a circle top-right, linked left-to-right along the top, down the right column, and left-to-right along the bottom. Verified by rendering old and new side by side against their registry neighbours at both 14px and 96px before committing.Call-site safety
The intrinsic size changes
13×13 → 24×24, so every render path was checked — all pass an explicit square size:resource-tabs.tsx:242→size-[14px]recently-deleted.tsx→ICON_CLASS = size-5 shrink-0add-resource-dropdown.tsx:492,669,677→size-[14px]biomeclean ·type-check --force23/23 (0 cached)Also in this PR:
FolderCode— rescued from #6262#6262 was merged at its first commit (
86532fed9) while GitHub was still showing the PR as one commit, so its second commit — theFolderCodegeometry fix — never shipped.folder.tsxis on staging;folder-code.tsxwas left as the original.That commit is cherry-picked here (
99b3f626b). Its body path is byte-identical to theFolderbody that merged in #6262.FolderCodecarried the same fill-based constructionFolderdid —0 0 15 13with a0.3hairline stroke. Atsize-[14px]it rendered a 19.9px glyph at 0.28px stroke where a standard icon renders ~10.5px at 0.90px. Now 10.1px / 0.90px, matchingfolderandfolder-open.Call sites (
agent-group.tsx,FeaturePlatformPanel,agent-code-graphic.tsx, playground) all pass an explicit squaresize-*, so the intrinsic15×13 → 24×24change is absorbed.Rebased onto current staging (which now carries the merged
Folderfix).biomeclean ·type-check --force23/23 (0 cached).