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(settings): wire flush, drop the lone skeleton, close review gaps
Final review round. Two fixes the previous commit claimed but did not land:
`CredentialDetailHeading` never passed `flush`, so every credential detail
heading wore list-row padding, and the empty-subtitle guard was never applied.
Both were scripted replacements that silently no-op'd.
RESOURCE_LIST_GRID also dropped to one column 32px earlier than the grid it
replaced — `auto-fit` measures tracks, not margin boxes, so widening the gap
for the rows' bleed moved the breakpoint. Track minimum now budgets for it.
Removes the BYOK skeleton rather than maintaining a second copy of the row: it
was the only skeleton in settings, and it had already desynced from the row it
imitates. Its peers render nothing while loading.
Also: unify the glyph-tile treatment across MCP/sandboxes/workflow-MCP with
custom tools; move decoration out of `trailing` in verified-domains and
recently-deleted; convert the last hand-rolled row and empty states in
workflow-MCP, api-keys, copilot and group-detail; give copilot's delete the
same `...` affordance as api-keys; announce the row description via
aria-describedby, which the stretched overlay had silenced; and let
SettingsField render its own value so callers stop restating type tokens.
Docs: correct claims that predate this PR — `aside` does not exist, the
navigation source of truth is under components/, beforeunload mounts in the
layouts, `getSettingsSectionMeta` takes two args — and stop asserting a
literal-pixel grep returns zero when display type legitimately uses it.
-**`SettingsSection`** (`…/components/settings-section/settings-section` — this
218
+
directory has no barrel) — muted label, hairline
215
219
divider, body. Also carries `headerAccessory` and `action` slots. Never
216
220
re-derive the label/divider chrome; `sim-styling.md` owns those tokens.
217
221
-**`SettingsField`** (`…/components/settings-field`) — a read-only label/value
@@ -231,8 +235,10 @@ navigation chevron. Never hand-roll any of it, and never wrap the row in your ow
231
235
hand-roll the `<DropdownMenu>` + `<MoreHorizontal>` trigger per page.
232
236
-**`RESOURCE_TILE_BASE`** + one of `RESOURCE_TILE_FILL` / `RESOURCE_TILE_PLAIN`
233
237
(`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
235
-
outside a row (a detail heading). `ResourceTile` wraps the filled pairing.
238
+
`settings/`, unlike the other `…/` paths on this page) — the 36px tile chrome, for
239
+
any tile the row does not draw itself: a detail heading, or a caller-supplied
240
+
`iconVariant='custom'` tile. `ResourceTile` wraps the filled pairing. Use
241
+
`RESOURCE_TILE_FILL` for a glyph, `RESOURCE_TILE_PLAIN` for a brand logo or favicon.
236
242
237
243
238
244
**Member avatars are deliberately two components, not one.**`member-list.tsx`
@@ -295,8 +301,9 @@ shells. Reach for it before hand-rolling a `Chip`.
295
301
(from `@/app/workspace/[workspaceId]/components/credential-detail`). The
296
302
in-view header **Discard** chip (via `SaveDiscardActions onDiscard`) is a
297
303
*reset to original* — distinct from the back-confirm's discard, which leaves.
298
-
-**`useSettingsBeforeUnload`** is mounted **once** in the settings shell
299
-
(`settings/[section]/settings.tsx`) — never add a per-page `beforeunload`.
304
+
-**`useSettingsBeforeUnload`** is mounted by the settings shells
305
+
(`settings/layout.tsx` and `components/settings/standalone-settings-shell.tsx`) —
306
+
never add a per-page `beforeunload`.
300
307
-**Dirty *computation* stays local** (shapes differ: field-compare vs
301
308
normalize+stringify) — only how dirty is *consumed* is shared. Derive it (a
302
309
`const`/`useMemo`), never store it in `useState`.
@@ -333,7 +340,7 @@ A settings page is design-system-clean when:
333
340
-[ ] 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.
334
341
-[ ] 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).
335
342
-[ ] No literal `text-[Npx]` classes — named scale tokens only (see "Text-scale tokens" above).
336
-
-[ ] 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).
343
+
-[ ] 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, and draw their own arrow with `RESOURCE_ROW_ARROW_CLASSES`: multi-line bodies (inbox tasks), tabular columns (billing invoices, credit usage), grids (secrets), and the member rows (see the avatar note above).
337
344
-[ ] Rows that open a detail page use `navigable` + `clickLabel`; flat records use `RowActionsMenu`. Not both.
338
345
-[ ] Decorative trailing content is in `badge`, not `trailing`.
339
346
-[ ] Labeled sections use `SettingsSection`; read-only fields use `SettingsField`; empty/loading/error use `SettingsEmptyState`.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/credential-detail-heading.tsx
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,14 @@ export function CredentialDetailHeading({
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/settings/components/browser/components/password-detail/password-detail.tsx
0 commit comments