You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b1759f3
Browse filesBrowse the repository at this point in the historyBrowse files
improvement(menus): band by what the action acts on, not by verb (#6994)
Replaces "at most one separator" with the test that actually earns a
rule: does the next group stop acting on the thing the user clicked.
Most row menus have only the destructive transition and keep their one
rule. Three menus have a second, and now show it — the logs row menu
between this log and the page's filters, and the table row and column
menus where they stop acting on the clicked cell or column and start
creating siblings. Count follows content rather than a fixed number.
The workflow panel menu had six items across four scopes and no
separator at all, so "Delete workflow" sat flush against "Duplicate
workflow"; it now carries the destructive rule every other menu has.
Two label fixes: the logs menu wrote 'Retrying...' with ASCII dots two
lines above 'Stopping…' with the character, and "Import CSV…" was the
only ellipsis anywhere in the workspace menu surface while the same
action reads "Import CSV" in the list menu.
Platform-only entries (desktop **Browser** and **Terminal**) trail the shared set rather than interleaving, so the common prefix is identical on every platform.
28
28
29
-
## Grouping: one rule, against the consequential group
29
+
## Grouping: a rule marks a change in what the action acts on
30
30
31
-
Order is governed above. **Separators are governed here** — and the answer is: use at most one.
31
+
Order is governed above. **Separators are governed here.**
32
32
33
-
Put a single `DropdownMenuSeparator` against the **consequential group** — the actions that
34
-
delete, detach, or change a run — and nowhere else. Everything on the other side of it runs
35
-
uninterrupted in toolbar-mirroring order.
33
+
A `DropdownMenuSeparator` earns its place when the next group stops acting on the thing the user
34
+
clicked. That is the whole test — one question, asked the same way in every menu:
36
35
37
-
That group trails in almost every menu, so in practice the rule reads "one rule immediately
38
-
before Delete / Leave / Close / Hide". It leads in exactly one place: the **logs row menu**,
39
-
where `Retry` and `Cancel Run` are the primary actions on a failed run and sit at the top, with
40
-
the rule beneath them. Ordering follows the surface (see "The rule" above); the separator simply
41
-
fences whichever end the consequential group occupies. A menu whose consequential actions are
42
-
merely *disabled* still gets no extra rule — `disabled` is not a group.
36
+
| The group | Gets a rule before it |
37
+
| --- | --- |
38
+
| Acts on the clicked item (open, rename, duplicate, export, copy, edit, pin, run) | no — this is the body of the menu |
39
+
| Acts on **something else** — the page's filters or view, or a newly created sibling | yes |
40
+
|**Destroys or detaches** it (delete, leave, close, hide, remove) | yes |
41
+
42
+
Most row menus only ever have the one transition, so they carry one rule, immediately before
43
+
`Delete`. A menu that also filters the page or inserts siblings carries two. Nothing carries
44
+
more, because there is no third thing a menu acts on.
45
+
46
+
Do **not** band by verb. "Navigation", "status", "edit", "copy" are categories of *what the verb
47
+
is*, not of *what it touches*, and the user meets no such taxonomy anywhere else — every toolbar
48
+
in the app is a flat `gap-1` chip row with no dividers. Menus banded that way put the same action
49
+
in different groups depending on which siblings happened to be visible.
50
+
51
+
The consequential group trails in almost every menu. It leads in exactly one: the **logs row
52
+
menu**, where `Retry` and `Cancel Run` act on the run itself and are the primary actions on a
53
+
failure, so they sit on top with the rule beneath them. Ordering follows the surface (see "The
54
+
rule" above); the separator fences whichever end that group occupies.
55
+
56
+
A group whose items are merely *disabled* still gets no extra rule — `disabled` is not a group.
43
57
44
58
```tsx
45
59
// ✗ Bad — four semantic bands the user meets nowhere else
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -388,7 +388,7 @@ A list orders itself the way the user already reads the same things somewhere el
388
388
389
389
Encode the order in ONE exported constant and sort by it — never a hand-maintained literal per menu (`RESOURCE_MENU_ORDER` / `byResourceMenuOrder` in `home/components/mothership-view/components/resource-registry`). Render mixed item kinds in a single ordered pass; emitting all submenu-backed families and then all flat ones silently pins every submenu to the top no matter what the constant says. Divergence is allowed only for search ranking, user-controlled ordering, and recency.
390
390
391
-
**Grouping**: at most ONE `DropdownMenuSeparator`per menu, fencing the consequential group — immediately before Delete/Leave/Close/Hide in almost every menu, and immediately after Retry/Cancel Run in the logs row menu, where those lead. No toolbar in the app renders a divider, so multi-band menus teach a taxonomy that exists on no other surface. Build each separator's guard from the EXACT render conditions of the items on both sides — a looser guard is what leaves a dangling rule when its group is conditional. Never add a prop to move a rule. Full rule in `.claude/rules/sim-list-ordering.md`.
391
+
**Grouping**: a `DropdownMenuSeparator`marks a change in WHAT the action acts on — the clicked item (no rule), something else like the page's filters or a new sibling (rule), or destroying it (rule). Most row menus have only the destructive transition and carry one rule before Delete/Leave/Close/Hide; menus that also filter the page or insert siblings carry two. Never band by verb (navigation/status/edit/copy) — the toolbars are flat, so that taxonomy exists nowhere else. No toolbar in the app renders a divider, so multi-band menus teach a taxonomy that exists on no other surface. Build each separator's guard from the EXACT render conditions of the items on both sides — a looser guard is what leaves a dangling rule when its group is conditional. Never add a prop to move a rule. Full rule in `.claude/rules/sim-list-ordering.md`.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/workflow-group-meta-cell.tsx
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -238,6 +238,9 @@ export function ColumnOptionsMenu({
238
238
{isPinned ? 'Unpin column' : 'Pin column'}
239
239
</DropdownMenuItem>
240
240
)}
241
+
{/* Stops acting on this column and starts creating siblings — `Edit column`
242
+
above is unconditional, so the rule is always backed. */}
0 commit comments