Skip to content

Commit 349c42a

Browse files
committed
fix(menus): apply the one-rule grouping to the folder context menu
The folder row menu kept a separator at its canEdit permission boundary plus one before Delete — the same shape already corrected in the file row menu, missed because the sweep that found it did not cover this file. Open and Pin above are unconditional, so the surviving rule is always backed on both sides. Also records the standing exception the sweep surfaced: the text editor, terminal, and browser page menus emulate native OS menus, whose banding the user learns outside Sim. That is the ordering rule's own principle — mirror the surface they already read — so those keep their banding while our own resource and row menus, whose toolbars are flat, take one rule.
1 parent e929bcf commit 349c42a

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.claude/rules/sim-list-ordering.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ genuinely buys is a stop before the action you cannot undo.
5959
A second rule is justified only when a menu mixes genuinely different *scopes* — cell-level and
6060
table-level actions in one menu, say — not different verbs.
6161

62+
**The one standing exception: menus that emulate a native menu.** The text-editor menu
63+
(`editor-context-menu.tsx`), the terminal menu (`terminal-context-menu.tsx`), and the browser
64+
page menu (`browser-session.tsx`) each mirror the OS menu the user already knows — clipboard
65+
banding (`Cut · Copy · Paste │ Select all`) is a convention every text field on their machine
66+
teaches them. These keep their native banding, and that is the *same* principle as the ordering
67+
rule above: mirror the surface the user already reads. The test is whether a real menu outside
68+
Sim taught them the grouping. Our own resource, row, and action menus have no such precedent —
69+
the toolbars they mirror are flat — so they take the single rule.
70+
6271
**Both sides of every rule must be guaranteed non-empty.** Write the separator's guard out of
6372
the *exact* render conditions of the items around it, never a looser approximation:
6473

apps/sim/app/workspace/[workspaceId]/components/folders/folder-context-menu.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export const FolderContextMenu = memo(function FolderContextMenu({
9191
)}
9292
{canEdit && (
9393
<>
94-
<DropdownMenuSeparator />
9594
<DropdownMenuItem onSelect={onRename}>
9695
<Pencil />
9796
Rename

0 commit comments

Comments
 (0)