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
fix(dashboards): menu order, org-chat entitlement, mention ids, contract bounds (#8495)
* fix(mothership): order dashboards between chats and tables in resource menus
* chore(rules): drop the resource-menu sidebar-mirroring rule
* fix(dashboards): scope entitlements, keep mention ids, and tighten contracts
---------
Co-authored-by: Waleed Latif <walif6@gmail.com>
Copy file name to clipboardExpand all lines: .claude/rules/sim-list-ordering.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: List and menu ordering that mirrors the sidebar or toolbar, with one separator before the destructive action
2
+
description: List and menu ordering that mirrors the toolbar or settings nav, encoded once, with one separator before the destructive action
3
3
paths:
4
4
- "apps/sim/app/**/*.tsx"
5
5
- "apps/sim/ee/**/*.tsx"
@@ -8,7 +8,7 @@ paths:
8
8
9
9
# List & Menu Ordering
10
10
11
-
**A list orders itself the way the user already reads the same things somewhere else.** Dropdowns, context menus, tab strips, command palettes, and settings navs are all *second* presentations of a set the user has already seen — in the sidebar, in a toolbar, in a column-header row. When the second presentation reorders that set, the user re-reads it from scratch every time.
11
+
**A list orders itself the way the user already reads the same things somewhere else.** Dropdowns, context menus, tab strips, command palettes, and settings navs are all *second* presentations of a set the user has already seen — in a toolbar, in the settings nav, in a column-header row. When the second presentation reorders that set, the user re-reads it from scratch every time.
12
12
13
13
This is not a style preference. Order is the cheapest affordance a list has, and the only one that costs nothing to get right.
14
14
@@ -18,13 +18,14 @@ Before writing a list of items, find where the user sees those same items *first
| A "New …" menu | the order those things appear once created |
25
24
26
25
Left-to-right becomes top-to-bottom. A toolbar reading `Filter · Sort · Export · Delete` becomes a menu reading Filter, Sort, Export, Delete — never alphabetized, never grouped by implementation, never "destructive last" unless the toolbar already puts it last.
27
26
27
+
Resource menus (`+` attach, `@` mention, resource-tab `+`) do not mirror the sidebar. Their order is a product decision encoded in `RESOURCE_MENU_ORDER` (see below), and every resource menu shares it.
28
+
28
29
Platform-only entries (desktop **Browser** and **Terminal**) trail the shared set rather than interleaving, so the common prefix is identical on every platform.
29
30
30
31
## Grouping: a rule marks a change in what the action acts on
@@ -107,10 +108,10 @@ grouping wants the standard grouping.
107
108
An order duplicated across surfaces is an order that will drift. Export **one** constant and sort by it — do not hand-maintain a matching literal per menu.
108
109
109
110
```ts
110
-
/** Top-down order for every menu listing resource families, mirroring the sidebar. */
111
+
/** Top-down order for every menu listing resource families. */
<!-- Generated from .claude/rules/sim-list-ordering.md by `bun run skills:sync`. Edit the source, not this file. -->
7
7
8
8
# List & Menu Ordering
9
9
10
-
**A list orders itself the way the user already reads the same things somewhere else.** Dropdowns, context menus, tab strips, command palettes, and settings navs are all *second* presentations of a set the user has already seen — in the sidebar, in a toolbar, in a column-header row. When the second presentation reorders that set, the user re-reads it from scratch every time.
10
+
**A list orders itself the way the user already reads the same things somewhere else.** Dropdowns, context menus, tab strips, command palettes, and settings navs are all *second* presentations of a set the user has already seen — in a toolbar, in the settings nav, in a column-header row. When the second presentation reorders that set, the user re-reads it from scratch every time.
11
11
12
12
This is not a style preference. Order is the cheapest affordance a list has, and the only one that costs nothing to get right.
13
13
@@ -17,13 +17,14 @@ Before writing a list of items, find where the user sees those same items *first
| A "New …" menu | the order those things appear once created |
24
23
25
24
Left-to-right becomes top-to-bottom. A toolbar reading `Filter · Sort · Export · Delete` becomes a menu reading Filter, Sort, Export, Delete — never alphabetized, never grouped by implementation, never "destructive last" unless the toolbar already puts it last.
26
25
26
+
Resource menus (`+` attach, `@` mention, resource-tab `+`) do not mirror the sidebar. Their order is a product decision encoded in `RESOURCE_MENU_ORDER` (see below), and every resource menu shares it.
27
+
27
28
Platform-only entries (desktop **Browser** and **Terminal**) trail the shared set rather than interleaving, so the common prefix is identical on every platform.
28
29
29
30
## Grouping: a rule marks a change in what the action acts on
@@ -106,10 +107,10 @@ grouping wants the standard grouping.
106
107
An order duplicated across surfaces is an order that will drift. Export **one** constant and sort by it — do not hand-maintain a matching literal per menu.
107
108
108
109
```ts
109
-
/** Top-down order for every menu listing resource families, mirroring the sidebar. */
110
+
/** Top-down order for every menu listing resource families. */
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
@@ -91,7 +91,7 @@ The `'use client'` server boundary, the app/worker runtime env split, and featur
91
91
-**Components**: `'use client'` only for hooks or browser APIs. Structure order, extraction thresholds, and list-render rules: `.claude/rules/sim-components.md`. Render-performance idioms (lazy-init refs, hoisting, `Map` pre-indexing, `[...arr].sort()` never `toSorted()` on client paths): `.claude/rules/sim-react-performance.md`. For effect/state/memo/callback anti-patterns use the `/you-might-not-need-*` skills and verify against the running UI.
92
92
-**State ownership**: React Query owns server data — never `useState` + `fetch`; shareable client view-state (tabs, filters, search, pagination, selected id) lives in the URL via `nuqs`; Zustand owns global client state; `useState` owns UI-only state. Hooks: `.claude/rules/sim-hooks.md`. Stores (`devtools`, `persist` only with an explicit `partialize` whitelist, workflow value invariants): `.claude/rules/sim-stores.md`. URL state: `.claude/rules/sim-url-state.md`.
93
93
-**Utils**: inline a helper with one consumer; create `utils.ts` when 2+ files share it — in `lib/` (app-wide) or `feature/utils/` (feature-scoped). Check `lib/` before writing a new one.
94
-
-**Lists and menus** mirror the order the user already reads elsewhere (sidebar, toolbar), encoded in one exported order constant; a separator marks only a change in what the action acts on (typically one, before the destructive action): `.claude/rules/sim-list-ordering.md`.
94
+
-**Lists and menus** mirror the order the user already reads elsewhere (toolbar, settings nav), encoded in one exported order constant (resource menus share `RESOURCE_MENU_ORDER`, a product order that does not mirror the sidebar); a separator marks only a change in what the action acts on (typically one, before the destructive action): `.claude/rules/sim-list-ordering.md`.
95
95
-**Caching**: `lru-cache` with a `max` ceiling, never a hand-rolled TTL `Map`; a lifecycle map is not a cache; cache the gate, never the credential: `.claude/rules/sim-caching.md`.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-registry.tsx
0 commit comments