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 f381712
Browse filesBrowse the repository at this point in the historyBrowse files
fix(settings): correct row bleed, delete-confirm binding, and avatar seeding
Follow-up from review of the consolidation.
The sandbox delete confirmation was boolean-only state. Browser Back unmounts
the modal without closing it, so opening another sandbox re-opened it already
confirmed — against the wrong sandbox. Reset it where the draft guard already
handles the same history hazard.
RESOURCE_LIST_GRID kept an 8px column gap after the bleed moved onto the row,
so neighbouring cards overlapped by exactly the gutter and the right-hand card's
stretched hit area won it: clicking between two cards opened the wrong one.
Budget the gap for the bleed instead.
Also: restore the `group` the template-icon hover outlines depend on; add a
`flush` row for headings and overflow boxes; seed MemberAvatar identically on
every surface; keep the MCP transport label visible in all row states; give the
Delete chip a stable id so it doesn't remount mid-delete; and stop an empty
subtitle rendering a phantom line.
Docs: widen the rule's path globs to the surfaces it now governs, drop the
`text-[14px]` example that contradicted the token rule, and add a Mode C for
migrating rows onto the primitive.
@@ -173,8 +176,10 @@ navigation chevron. Never hand-roll any of it, and never wrap the row in your ow
173
176
`iconFill` lets an uploaded image reach the tile edge.
174
177
-`onClick` / `href` — makes the **whole row** activatable via a stretched
175
178
overlay. Prefer `href` when the destination is a route, so the row keeps
176
-
prefetch, middle-click, and open-in-new-tab. `clickLabel` is the accessible
177
-
name and is **required** alongside either: the overlay has no text of its own.
179
+
prefetch, middle-click, and open-in-new-tab. Always pass `clickLabel` with
180
+
either — the overlay holds no text, so it is the control's *only* accessible
181
+
name. The prop is optional in the type (nothing enforces it), so omitting it
182
+
ships a nameless button rather than failing the build.
178
183
-`navigable` — appends the one canonical chevron. Set it on rows that open a
179
184
detail page; leave it off when `onClick` acts in place (revealing a folder).
180
185
Never import an arrow yourself: `lucide-react` and `@sim/emcn/icons` ship
@@ -187,9 +192,13 @@ navigation chevron. Never hand-roll any of it, and never wrap the row in your ow
187
192
containers. A `SettingsResourceRow` carries its own `-mx-2` bleed and padding,
188
193
so a container holding one only sets rhythm: never add a second `-mx-2` (they
189
194
stack into a 16px bleed) and never a different gap. A list of hand-rolled rows
190
-
is the opposite — there the container owns the bleed. Note `-mx-2` inside a
191
-
fixed-height `overflow-y-auto` box forces a horizontal scrollbar; drop the
192
-
bleed there.
195
+
is the opposite — there the container owns the bleed. A row inside a
196
+
fixed-height `overflow-y-auto` box, or a heading that must line up with the
197
+
section labels under it, passes `flush` to drop the bleed and padding.
198
+
`RESOURCE_LIST_GRID` budgets its column gap for the bleed (24px of track gap
199
+
minus 16px of bleed = an 8px gutter); narrowing that gap makes neighbouring
200
+
rows — and their stretched hit areas — overlap, so a click in the gutter opens
201
+
the wrong card.
193
202
194
203
**Three-dots vs. chevron** is not a taste call:
195
204
@@ -221,7 +230,8 @@ navigation chevron. Never hand-roll any of it, and never wrap the row in your ow
221
230
Conditional items become array spreads: `...(canManage ? [{…}] : [])`. Never
222
231
hand-roll the `<DropdownMenu>` + `<MoreHorizontal>` trigger per page.
223
232
-**`RESOURCE_TILE_BASE`** + one of `RESOURCE_TILE_FILL` / `RESOURCE_TILE_PLAIN`
224
-
(`…/components/resource-tile`) — the 36px tile chrome, for the rare tile
233
+
(`app/workspace/[workspaceId]/components/resource-tile` — note: *not* under
234
+
`settings/`, unlike the other `…/` paths on this page) — the 36px tile chrome, for the rare tile
225
235
outside a row (a detail heading). `ResourceTile` wraps the filled pairing.
226
236
-**`MemberAvatar`** (`@/components/permissions/member-avatar`) — the one avatar
227
237
for any member row.
@@ -316,7 +326,7 @@ A settings page is design-system-clean when:
316
326
-[ ] Its `NavigationItem` has an accurate, consistent-length `description`.
317
327
-[ ] Detail sub-views and entitlement/loading gates keep their own chrome (intentional).
318
328
-[ ] If it has editable state: Save/Discard go through `SaveDiscardActions`, dirty is wired via `useSettingsUnsavedGuard` (called before any early-return gate), and there is **no** hand-rolled Save button / `beforeunload` / "Unsaved changes" modal.
319
-
-[ ] No business logic, handlers, or conditional rendering changed by the migration.
329
+
-[ ] No business logic, handlers, or conditional rendering changed by the migration — except where the shared primitive makes a gate structural (a permission gate becomes `onClick={can ? … : undefined}` + `navigable={can}`, which renders a plain non-interactive row).
320
330
-[ ] No literal `text-[Npx]` classes — named scale tokens only (see "Text-scale tokens" above).
321
331
-[ ] Every **resource** list row (a thing with an identity — a tool, a server, a key, a credential) is a `SettingsResourceRow` in a `RESOURCE_LIST_STACK`/`RESOURCE_LIST_GRID` — no wrapper `<button>`/`<Link>`, no hand-passed arrow, no re-derived title/subtitle spans. Rows with a genuinely different shape stay bespoke: multi-line bodies (inbox tasks), tabular columns (billing invoices, credit usage), and grids (secrets).
322
332
-[ ] Rows that open a detail page use `navigable` + `clickLabel`; flat records use `RowActionsMenu`. Not both.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/settings/components/custom-tools/components/custom-tool-detail/custom-tool-detail.tsx
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -219,6 +219,7 @@ export function CustomToolDetail({
0 commit comments