Skip to content

Commit ed77fb1

Browse files
committed
Merge branch 'improvement/org-view' into wip/platform-org-wiring
# Conflicts: # apps/sim/app/_shell/providers/session-provider.tsx # apps/sim/app/o/[organizationId]/home/page.tsx # apps/sim/app/o/[organizationId]/integrations/hydrated-integrations.tsx # apps/sim/app/o/[organizationId]/layout.tsx # apps/sim/app/o/[organizationId]/links/loading.tsx # apps/sim/app/o/[organizationId]/links/page.tsx # apps/sim/app/o/[organizationId]/search/chat/[chatId]/page.tsx # apps/sim/app/o/[organizationId]/search/page.tsx # apps/sim/app/o/[organizationId]/settings/components/integrations/live-search-settings.tsx # apps/sim/app/o/[organizationId]/settings/components/organization-recently-deleted.tsx # apps/sim/app/o/[organizationId]/settings/integrations/providers/[connectorType]/provider-detail.tsx # apps/sim/app/o/[organizationId]/settings/integrations/sources/[connectorId]/source-detail.tsx # apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx # apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.dom.test.tsx # apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.test.ts # apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx # apps/sim/app/workspace/[workspaceId]/settings/components/mothership/mothership.tsx # apps/sim/components/secrets/secrets-editor.tsx # apps/sim/ee/access-control/components/agent-default.tsx # apps/sim/ee/access-control/components/group-detail.tsx # apps/sim/ee/access-control/components/permission-rows.tsx # apps/sim/ee/access-control/lib/editor-catalog-projection.ts # apps/sim/ee/access-control/lib/editor-catalog.server.ts # apps/sim/ee/access-control/lib/editor-registry.ts # apps/sim/ee/access-control/lib/editor.ts # apps/sim/ee/access-requests/lib/policy-description.ts # apps/sim/ee/audit-logs/components/audit-logs.tsx # apps/sim/ee/audit-logs/lib/scope.ts # apps/sim/ee/data-retention/components/data-retention-settings.tsx # apps/sim/ee/data-retention/lib/policy-draft.ts # apps/sim/ee/organization-usage/components/usage-credits.tsx # apps/sim/ee/scim/components/scim-section.tsx # apps/sim/ee/session-policy/components/session-policy-settings.tsx # apps/sim/ee/sso/components/sso-provider-settings.tsx # apps/sim/hooks/queries/logs.ts # apps/sim/hooks/queries/utils/permission-group-keys.ts # apps/sim/lib/core/utils/csv-download.ts # apps/sim/lib/guardrails/custom-patterns.ts # apps/sim/lib/logs/filters.ts # apps/sim/lib/logs/time-range.ts # apps/sim/lib/uploads/utils/file-size.ts # apps/sim/lib/uploads/utils/file.ts # apps/sim/platform/app/(shell)/_components/command-menu/command-menu.tsx # apps/sim/platform/app/(shell)/_components/invite-modal/invite-modal.tsx # apps/sim/platform/app/(shell)/_components/links-page/link-editor.tsx # apps/sim/platform/app/(shell)/_components/links-page/links-frame.tsx # apps/sim/platform/app/(shell)/_components/links-page/links-page.tsx # apps/sim/platform/app/(shell)/_components/organization-menu/organization-menu.tsx # apps/sim/platform/app/(shell)/_components/search/search-results.tsx # apps/sim/platform/app/(shell)/_components/search/source-row.tsx # apps/sim/platform/app/(shell)/_components/settings-navigation/settings-navigation.module.css # apps/sim/platform/app/(shell)/_components/settings-navigation/settings-navigation.tsx # apps/sim/platform/app/(shell)/_components/sidebar/account-menu.tsx # apps/sim/platform/app/(shell)/_components/sidebar/chats-section.tsx # apps/sim/platform/app/(shell)/_components/sidebar/help-menu.tsx # apps/sim/platform/app/(shell)/_components/sidebar/section-status.tsx # apps/sim/platform/app/(shell)/_components/sidebar/sidebar.module.css # apps/sim/platform/app/(shell)/_components/sidebar/sidebar.tsx # apps/sim/platform/app/(shell)/_components/sidebar/support-modal.tsx # apps/sim/platform/app/(shell)/_components/sidebar/workspaces-section.tsx # apps/sim/platform/app/(shell)/home/_components/activity-chart/activity-chart.tsx # apps/sim/platform/app/(shell)/home/_components/activity-list/activity-list.tsx # apps/sim/platform/app/(shell)/home/_components/home-dashboard/home-dashboard-skeleton.tsx # apps/sim/platform/app/(shell)/home/_components/home-dashboard/home-dashboard.tsx # apps/sim/platform/app/(shell)/home/_components/live-home/live-home.tsx # apps/sim/platform/app/(shell)/integrations/_components/connected-credential/connected-credential.tsx # apps/sim/platform/app/(shell)/integrations/_components/integrations-page/integrations-route.tsx # apps/sim/platform/app/(shell)/integrations/_components/tool-permissions/tool-permissions-panel.tsx # apps/sim/platform/app/(shell)/search/_components/search-surface/search-surface.module.css # apps/sim/platform/app/(shell)/search/_components/search-surface/search-surface.tsx # apps/sim/platform/app/(shell)/settings/_components/profile/profile-settings.tsx # apps/sim/platform/app/(shell)/settings/_components/section-parts/saved-settings.tsx # apps/sim/platform/app/(shell)/settings/_components/section-parts/section-parts.module.css # apps/sim/platform/app/(shell)/settings/_components/section-parts/section-parts.tsx # apps/sim/platform/app/(shell)/settings/_components/section-registry.ts # apps/sim/platform/app/(shell)/settings/_components/sections/access-control/access-control-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/access-control/add-members-modal.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/access-control/group-detail.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/access-control/permission-rows.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/access-control/project-issue-restrictions.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/account/account-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/account/authorized-apps.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/account/delete-account.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/account/organization-accounts.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/admin/admin-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/audit-logs/audit-logs-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/billing/billing-view.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/billing/billing.module.css # apps/sim/platform/app/(shell)/settings/_components/sections/connected-accounts/connected-accounts-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/connected-accounts/group-access.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/connected-accounts/group-people.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/connected-accounts/group-providers.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/data-drains/data-drains-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/data-drains/drain-create.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/data-drains/drain-detail.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/data-retention/data-retention-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/data-retention/policy-detail.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/general/general-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/integrations/integrations-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/knowledge-graphs/knowledge-graphs-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/members/member-rows.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/members/members-panel.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/members/members.module.css # apps/sim/platform/app/(shell)/settings/_components/sections/members/remove-member-modal.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/members/seats-overview.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/members/transfer-ownership-modal.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/mothership/mothership-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/preferences/preferences-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/privacy/cookie-preferences.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/privacy/privacy-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/recently-deleted/recently-deleted-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/requests/my-request-modal.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/requests/my-requests.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/requests/request-access-modal.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/requests/requests-panel.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/requests/requests.module.css # apps/sim/platform/app/(shell)/settings/_components/sections/requests/review-modal.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/requests/review-requests.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/search-mcp/search-mcp-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/search-slack/search-slack-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/security/security-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/sso/domains-panel.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/sso/group-mappings.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/sso/provider-detail.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/sso/provider-form.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/sso/require-sso.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/sso/scim-panel.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/sso/sso-section.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/usage/activity.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/usage/usage-consumers.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/usage/usage-credits.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/usage/usage-events.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/usage/usage-heatmap.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/usage/usage-monitoring.tsx # apps/sim/platform/app/(shell)/settings/_components/sections/usage/usage-section.module.css # apps/sim/platform/app/(shell)/settings/_components/sections/whitelabeling/whitelabeling-section.tsx # apps/sim/platform/app/(shell)/settings/_components/settings-screen/settings-screen.module.css # apps/sim/platform/app/(shell)/settings/_components/settings-screen/settings-screen.tsx # apps/sim/platform/design-system/catalog/icon-geometry.tsx # apps/sim/platform/design-system/components/chart/charts.module.css # apps/sim/platform/design-system/components/chart/charts.tsx # apps/sim/platform/design-system/components/menu/action-menu.tsx # apps/sim/platform/design-system/components/modal/modal.tsx # apps/sim/platform/design-system/components/surface/home/home-conversation.tsx # apps/sim/platform/design-system/components/surface/home/live-home.tsx # apps/sim/platform/design-system/components/surface/integrations/search-connection-request.tsx # apps/sim/platform/design-system/components/surface/integrations/slack-search-actions.tsx # apps/sim/platform/design-system/components/surface/notices.tsx # apps/sim/platform/design-system/components/surface/platform-surface.tsx # apps/sim/platform/design-system/components/surface/prefetch-member-inventory.ts # apps/sim/platform/design-system/components/surface/prefetch.test.ts # apps/sim/platform/design-system/components/surface/prefetch.ts # apps/sim/platform/design-system/components/surface/rail/account-menu.tsx # apps/sim/platform/design-system/components/surface/rail/chat-list.ts # apps/sim/platform/design-system/components/surface/rail/chats-section.tsx # apps/sim/platform/design-system/components/surface/rail/command-menu.tsx # apps/sim/platform/design-system/components/surface/rail/destinations.ts # apps/sim/platform/design-system/components/surface/rail/help-menu.tsx # apps/sim/platform/design-system/components/surface/rail/invite-modal.tsx # apps/sim/platform/design-system/components/surface/rail/invite.ts # apps/sim/platform/design-system/components/surface/rail/model.ts # apps/sim/platform/design-system/components/surface/rail/name-modal.tsx # apps/sim/platform/design-system/components/surface/rail/nav-warmers.ts # apps/sim/platform/design-system/components/surface/rail/organization-menu.module.css # apps/sim/platform/design-system/components/surface/rail/organization-menu.tsx # apps/sim/platform/design-system/components/surface/rail/rail-flyout.tsx # apps/sim/platform/design-system/components/surface/rail/row-links.ts # apps/sim/platform/design-system/components/surface/rail/section-row.tsx # apps/sim/platform/design-system/components/surface/rail/section-status.tsx # apps/sim/platform/design-system/components/surface/rail/shell-actions.ts # apps/sim/platform/design-system/components/surface/rail/shell.ts # apps/sim/platform/design-system/components/surface/rail/sidebar-collections.module.css # apps/sim/platform/design-system/components/surface/rail/sidebar.module.css # apps/sim/platform/design-system/components/surface/rail/sidebar.tsx # apps/sim/platform/design-system/components/surface/rail/support-modal.tsx # apps/sim/platform/design-system/components/surface/rail/workspaces-section.tsx # apps/sim/platform/design-system/components/surface/rail/workspaces.ts # apps/sim/platform/design-system/components/surface/search/search-history.tsx # apps/sim/platform/design-system/components/surface/search/search-results.tsx # apps/sim/platform/design-system/components/surface/search/search-surface-header.tsx # apps/sim/platform/design-system/components/surface/search/search-surface.module.css # apps/sim/platform/design-system/components/surface/search/search-surface.tsx # apps/sim/platform/design-system/components/surface/search/search.module.css # apps/sim/platform/design-system/components/surface/search/source-row.tsx # apps/sim/platform/lib/data/access-control/editor.ts # apps/sim/platform/lib/data/access-control/index.ts # apps/sim/platform/lib/data/account.ts # apps/sim/platform/lib/data/audit-logs/feed.ts # apps/sim/platform/lib/data/billing.ts # apps/sim/platform/lib/data/chat-list.ts # apps/sim/platform/lib/data/cookie-consent.ts # apps/sim/platform/lib/data/data-drains/params.ts # apps/sim/platform/lib/data/home-view.ts # apps/sim/platform/lib/data/home.ts # apps/sim/platform/lib/data/integrations-model.ts # apps/sim/platform/lib/data/integrations.ts # apps/sim/platform/lib/data/knowledge-graphs.ts # apps/sim/platform/lib/data/links.ts # apps/sim/platform/lib/data/members.ts # apps/sim/platform/lib/data/people.ts # apps/sim/platform/lib/data/preferences.ts # apps/sim/platform/lib/data/query-view.ts # apps/sim/platform/lib/data/recently-deleted.ts # apps/sim/platform/lib/data/requests.ts # apps/sim/platform/lib/data/settings-navigation.ts # apps/sim/platform/lib/data/shell-actions.ts # apps/sim/platform/lib/data/shell-destinations.ts # apps/sim/platform/lib/data/shell.ts # apps/sim/platform/lib/data/sso/params.ts # apps/sim/platform/lib/data/usage/index.ts # apps/sim/platform/lib/data/usage/reads.ts # apps/sim/platform/lib/data/whitelabeling.ts # apps/sim/platform/lib/notices.ts # apps/sim/platform/lib/notification-tray.module.css # apps/sim/platform/lib/row-links.ts # apps/sim/platform/lib/time.ts # apps/sim/providers/model-lookup.ts # scripts/check-explicit-any.baseline.json # scripts/check-tool-registry-boundary.baseline.json
2 parents 3fcc730 + 17d935e commit ed77fb1

1,255 files changed

Lines changed: 106837 additions & 17388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/add-trigger/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ export const {service}PollingHandler: PollingProviderHandler = {
411411
await markWebhookSuccess(webhookId, logger)
412412
return 'success'
413413
} catch (error) {
414-
logger.error(`[${requestId}] Error processing {service} webhook ${webhookId}:`, error)
414+
logger.error('Error processing {service} webhook:', error)
415415
await markWebhookFailed(webhookId, logger)
416416
return 'failure'
417417
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
description: One pattern per job across the organization views (Settings, People, Integrations, Links, Home)
3+
paths:
4+
- "apps/sim/platform/app/(shell)/{settings,people,integrations,links,home}/**"
5+
- "apps/sim/platform/design-system/components/{status,modal,picker,settings-section,search-field,activity-row}/**"
6+
- "apps/sim/app/o/*/**"
7+
---
8+
9+
# Organization Views
10+
11+
The organization views live in `apps/sim/platform/app/(shell)/` and take everything shared from
12+
`@/platform/design-system/components`. Each job below has one pattern. A view that differs needs a
13+
reason written where it differs; "it was already like that" is not one.
14+
15+
| Job | Use | Never |
16+
| --- | --- | --- |
17+
| First read of a view | `QueryBoundary` (`query`, `failure`, `loadingLabel`, optional `empty`, `loading`), which renders `LoadingRows`, then `FailureNotice`, then `empty`, then `children(data)` | Inline `isPending ? … : error ? …`, a raw `<p>Loading…</p>`, a loading `InlineNotice` |
18+
| Loading | `LoadingRows` by default. A placeholder shaped like its content (`WidgetSkeleton`, usage charts) only where rows would misrepresent it | A second generic skeleton |
19+
| Failed read | `FailureNotice`, labelled Retry. `intent='warning'` where the read partly answered | A hand-built retry button or `InlineNotice` + `Button` |
20+
| Failed background refresh | `FailureNotice` outside the boundary, over the content it keeps | Replacing content already on screen |
21+
| Empty | `EmptyState`, with no create button when the page already has one. A picker's no-match line inside a dialog stays `Muted`, since a block would take over the dialog | `Muted` or a raw `<p>` anywhere else |
22+
| Confirm | `ConfirmDialog` (`target`, `title`, `confirmLabel`, `pendingLabel`, `onConfirm`, `safe` when nothing is lost). Removing a person, revoking an invite and any destructive row action always ask first | `Modal variant='confirm'`, `window.confirm`, an unconfirmed destructive action |
23+
| Save | `SaveActions`, end-aligned in the page flow under the fields it commits: Discard while dirty, then Save. Save is visible and disabled while clean | Save in a header, Save before Discard, a Cancel beside Discard |
24+
| Editing a server value | `useServerDraft`. Adopts a newer value while clean; while dirty it keeps the edits and sets `conflict`. Show `DraftConflictNotice`, and block Save until the viewer chooses | Seeding `useState` from a query once |
25+
| Autosave vs Save | One or the other per page. A page with `SaveActions` holds every field in one draft and writes it in one request. List actions with their own dialog, such as adding or removing a member, are not field edits | A page mixing both |
26+
| Create | A primary compact button in `SectionToolbar`, or in the page header on a page with one | Create in both the toolbar and the empty state |
27+
| Search over a section's rows | `SectionSearch subject='members'` | `SearchField` with its own copy, unless the search covers more than the subject's name |
28+
| Row | `ActivityRow` for a row that opens something, `SettingsRow` for a row holding a control | A hand-built row |
29+
| List of rows | `RowList` (`dividers` for a list read as one block). `ActivityRow density='comfortable'` in settings | `calc(-1 * var(--ui-row-inset))` around a list; styling a row's height from outside |
30+
| Row actions | `ActionMenu` with icon `I108`, destructive item last with a separator | The same action in the row and its menu |
31+
| Section heading | `SettingsSection title` (h2), `DetailHeader` for a sub-view's way back | A hand-written heading |
32+
| Toolbar | `SectionToolbar grow={<SectionSearch />}` with its actions as children | A hand-built flex row |
33+
34+
## Failure feedback
35+
36+
- Form validation is inline, on the field (`error`), once a save has been attempted.
37+
- A dialog's own action failing stays in the dialog: `Modal` shows a rejected `onConfirm`'s message and keeps the draft.
38+
- Any other action failing is a toast. Nothing fails silently.
39+
40+
## Page gates
41+
42+
Every page under `app/o/[organizationId]` calls
43+
`requireOrganizationViewer(organizationId, callbackUrl)` from `@/app/o/[organizationId]/viewer`. It
44+
redirects a signed-out viewer to sign-in and back, 404s a viewer with no access, and returns
45+
`{ userId, principal, surface }`. Never write `{ kind: 'session', ... }` in a page.
46+
47+
## Dialogs
48+
49+
`Modal` holds itself open while `onConfirm`'s promise or its `pending` prop runs. Escape, the backdrop
50+
and Close do nothing until it settles, including when the browser closes the `<dialog>` itself: once
51+
user activation is spent, `cancel` cannot be prevented, so `OverlayDialog` reopens from `close`.
52+
53+
## Files
54+
55+
- A section with more than one job splits by job: `group-detail.tsx` is the shell, `group-general-tab.tsx`
56+
and `group-catalog-tabs.tsx` its bodies, `use-group-draft.ts` its write.
57+
- Merge logic worth a test is a pure module next to the view, such as `secrets-draft.ts`.
58+
- `section-parts/` holds what only settings needs: `SectionStack`, `FieldStack`, `SectionToolbar`,
59+
`DetailHeader`, `HeadingRow`, `Muted`, `SectionSkeleton`, `DraftConflictNotice`. `useServerDraft` is in `_components/`, since Integrations uses it too.
60+
61+
## Legacy workspace settings
62+
63+
`apps/sim/app/workspace/*/settings/**` keeps `SettingsPanel` from `@/components/settings/settings-panel`,
64+
which owns chrome through `settings/[section]/layout.tsx`. The `add-settings-page` skill describes it.
65+
New organization work never imports it.

‎.claude/rules/sim-settings-pages.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
description: Settings page layout and SettingsPanel design-system compliance
33
paths:
44
- "apps/sim/app/workspace/*/settings/**"
5-
- "apps/sim/app/o/*/settings/**"
65
- "apps/sim/app/workspace/*/{integrations,skills,upgrade}/**"
76
- "apps/sim/app/workspace/*/components/{resource-tile,credential-detail}/**"
87
- "apps/sim/components/{settings,permissions}/**"
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
description: "One pattern per job across the organization views (Settings, People, Integrations, Links, Home)"
3+
globs: ["apps/sim/platform/app/(shell)/{settings,people,integrations,links,home}/**","apps/sim/platform/design-system/components/{status,modal,picker,settings-section,search-field,activity-row}/**","apps/sim/app/o/*/**"]
4+
---
5+
6+
<!-- Generated from .claude/rules/sim-platform-views.md by `bun run skills:sync`. Edit the source, not this file. -->
7+
8+
# Organization Views
9+
10+
The organization views live in `apps/sim/platform/app/(shell)/` and take everything shared from
11+
`@/platform/design-system/components`. Each job below has one pattern. A view that differs needs a
12+
reason written where it differs; "it was already like that" is not one.
13+
14+
| Job | Use | Never |
15+
| --- | --- | --- |
16+
| First read of a view | `QueryBoundary` (`query`, `failure`, `loadingLabel`, optional `empty`, `loading`), which renders `LoadingRows`, then `FailureNotice`, then `empty`, then `children(data)` | Inline `isPending ? … : error ? …`, a raw `<p>Loading…</p>`, a loading `InlineNotice` |
17+
| Loading | `LoadingRows` by default. A placeholder shaped like its content (`WidgetSkeleton`, usage charts) only where rows would misrepresent it | A second generic skeleton |
18+
| Failed read | `FailureNotice`, labelled Retry. `intent='warning'` where the read partly answered | A hand-built retry button or `InlineNotice` + `Button` |
19+
| Failed background refresh | `FailureNotice` outside the boundary, over the content it keeps | Replacing content already on screen |
20+
| Empty | `EmptyState`, with no create button when the page already has one. A picker's no-match line inside a dialog stays `Muted`, since a block would take over the dialog | `Muted` or a raw `<p>` anywhere else |
21+
| Confirm | `ConfirmDialog` (`target`, `title`, `confirmLabel`, `pendingLabel`, `onConfirm`, `safe` when nothing is lost). Removing a person, revoking an invite and any destructive row action always ask first | `Modal variant='confirm'`, `window.confirm`, an unconfirmed destructive action |
22+
| Save | `SaveActions`, end-aligned in the page flow under the fields it commits: Discard while dirty, then Save. Save is visible and disabled while clean | Save in a header, Save before Discard, a Cancel beside Discard |
23+
| Editing a server value | `useServerDraft`. Adopts a newer value while clean; while dirty it keeps the edits and sets `conflict`. Show `DraftConflictNotice`, and block Save until the viewer chooses | Seeding `useState` from a query once |
24+
| Autosave vs Save | One or the other per page. A page with `SaveActions` holds every field in one draft and writes it in one request. List actions with their own dialog, such as adding or removing a member, are not field edits | A page mixing both |
25+
| Create | A primary compact button in `SectionToolbar`, or in the page header on a page with one | Create in both the toolbar and the empty state |
26+
| Search over a section's rows | `SectionSearch subject='members'` | `SearchField` with its own copy, unless the search covers more than the subject's name |
27+
| Row | `ActivityRow` for a row that opens something, `SettingsRow` for a row holding a control | A hand-built row |
28+
| List of rows | `RowList` (`dividers` for a list read as one block). `ActivityRow density='comfortable'` in settings | `calc(-1 * var(--ui-row-inset))` around a list; styling a row's height from outside |
29+
| Row actions | `ActionMenu` with icon `I108`, destructive item last with a separator | The same action in the row and its menu |
30+
| Section heading | `SettingsSection title` (h2), `DetailHeader` for a sub-view's way back | A hand-written heading |
31+
| Toolbar | `SectionToolbar grow={<SectionSearch />}` with its actions as children | A hand-built flex row |
32+
33+
## Failure feedback
34+
35+
- Form validation is inline, on the field (`error`), once a save has been attempted.
36+
- A dialog's own action failing stays in the dialog: `Modal` shows a rejected `onConfirm`'s message and keeps the draft.
37+
- Any other action failing is a toast. Nothing fails silently.
38+
39+
## Page gates
40+
41+
Every page under `app/o/[organizationId]` calls
42+
`requireOrganizationViewer(organizationId, callbackUrl)` from `@/app/o/[organizationId]/viewer`. It
43+
redirects a signed-out viewer to sign-in and back, 404s a viewer with no access, and returns
44+
`{ userId, principal, surface }`. Never write `{ kind: 'session', ... }` in a page.
45+
46+
## Dialogs
47+
48+
`Modal` holds itself open while `onConfirm`'s promise or its `pending` prop runs. Escape, the backdrop
49+
and Close do nothing until it settles, including when the browser closes the `<dialog>` itself: once
50+
user activation is spent, `cancel` cannot be prevented, so `OverlayDialog` reopens from `close`.
51+
52+
## Files
53+
54+
- A section with more than one job splits by job: `group-detail.tsx` is the shell, `group-general-tab.tsx`
55+
and `group-catalog-tabs.tsx` its bodies, `use-group-draft.ts` its write.
56+
- Merge logic worth a test is a pure module next to the view, such as `secrets-draft.ts`.
57+
- `section-parts/` holds what only settings needs: `SectionStack`, `FieldStack`, `SectionToolbar`,
58+
`DetailHeader`, `HeadingRow`, `Muted`, `SectionSkeleton`, `DraftConflictNotice`. `useServerDraft` is in `_components/`, since Integrations uses it too.
59+
60+
## Legacy workspace settings
61+
62+
`apps/sim/app/workspace/*/settings/**` keeps `SettingsPanel` from `@/components/settings/settings-panel`,
63+
which owns chrome through `settings/[section]/layout.tsx`. The `add-settings-page` skill describes it.
64+
New organization work never imports it.

‎.cursor/rules/sim-settings-pages.mdc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Settings page layout and SettingsPanel design-system compliance"
3-
globs: ["apps/sim/app/workspace/*/settings/**","apps/sim/app/o/*/settings/**","apps/sim/app/workspace/*/{integrations,skills,upgrade}/**","apps/sim/app/workspace/*/components/{resource-tile,credential-detail}/**","apps/sim/components/{settings,permissions}/**","apps/sim/ee/**/components/**"]
3+
globs: ["apps/sim/app/workspace/*/settings/**","apps/sim/app/workspace/*/{integrations,skills,upgrade}/**","apps/sim/app/workspace/*/components/{resource-tile,credential-detail}/**","apps/sim/components/{settings,permissions}/**","apps/sim/ee/**/components/**"]
44
---
55

66
<!-- Generated from .claude/rules/sim-settings-pages.md by `bun run skills:sync`. Edit the source, not this file. -->

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This file (also `AGENTS.md`) holds the repo-wide rules. Area detail lives in `.c
55
## Global Standards
66

77
- **Package manager**: `bun` and `bunx`, never `npm` and `npx`.
8-
- **Logging**: `createLogger` from `@sim/logger`; `logger.info` / `logger.warn` / `logger.error`, never `console.log`. Inside `withRouteHandler` the logger already carries the request ID — no manual `withMetadata({ requestId })`.
8+
- **Logging**: `createLogger` from `@sim/logger`; `logger.info` / `logger.warn` / `logger.error`, never `console.log`. Messages are static text; ids go in metadata (`logger.info('Sync started', { requestId, documentId })`), never a `[${requestId}]` tag or an interpolated request id, so lines group and filter by field (`check:source-conventions` rule `log-message-tag`). Inside `withRouteHandler` every line already carries the request ID, so a `generateRequestId()` id there needs no field and no manual `withMetadata({ requestId })`.
99
- **Comments**: name things so the code explains itself. TSDoc documents exported APIs and non-obvious modules. An inline `//` is only for a terse, non-obvious *why*, or for a script-enforced `// <tag>: <reason>` annotation (`boundary-raw-fetch`, `double-cast-allowed`, `boundary-raw-json`, `untyped-response`, `rq-lint-allow`, `client-boundary-allow`, `utils-lint-allow`, …). History belongs in the commit message. No `====` separators, commented-out code, or ESLint directives (`eslint-disable`/`eslint-enable`; nothing runs ESLint; `check:comment-hygiene` enforces all three). The `/you-might-not-need-a-comment` skill applies this to a diff.
1010
- **ID generation**: `generateId()` (UUID v4, the default) or `generateShortId(size?)` (URL-safe, 21 chars by default) from `@sim/utils/id` — never `crypto.randomUUID()`, `nanoid`, or `uuid`. Both use `crypto.getRandomValues()`, so they also work in non-secure (HTTP) browsers. For other randomness, `@sim/utils/random` (`randomInt`, `randomFloat`, `randomItem`, `generateRandomBytes`, `generateRandomHex`) — never `Math.random()` or `crypto.randomBytes()`.
1111
- **Common utilities**: use the shared helpers from the `@sim/utils/<module>` subpaths instead of inline implementations (`check:utils` bans most of the inline forms below):

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This file (also `AGENTS.md`) holds the repo-wide rules. Area detail lives in `.c
55
## Global Standards
66

77
- **Package manager**: `bun` and `bunx`, never `npm` and `npx`.
8-
- **Logging**: `createLogger` from `@sim/logger`; `logger.info` / `logger.warn` / `logger.error`, never `console.log`. Inside `withRouteHandler` the logger already carries the request ID — no manual `withMetadata({ requestId })`.
8+
- **Logging**: `createLogger` from `@sim/logger`; `logger.info` / `logger.warn` / `logger.error`, never `console.log`. Messages are static text; ids go in metadata (`logger.info('Sync started', { requestId, documentId })`), never a `[${requestId}]` tag or an interpolated request id, so lines group and filter by field (`check:source-conventions` rule `log-message-tag`). Inside `withRouteHandler` every line already carries the request ID, so a `generateRequestId()` id there needs no field and no manual `withMetadata({ requestId })`.
99
- **Comments**: name things so the code explains itself. TSDoc documents exported APIs and non-obvious modules. An inline `//` is only for a terse, non-obvious *why*, or for a script-enforced `// <tag>: <reason>` annotation (`boundary-raw-fetch`, `double-cast-allowed`, `boundary-raw-json`, `untyped-response`, `rq-lint-allow`, `client-boundary-allow`, `utils-lint-allow`, …). History belongs in the commit message. No `====` separators, commented-out code, or ESLint directives (`eslint-disable`/`eslint-enable`; nothing runs ESLint; `check:comment-hygiene` enforces all three). The `/you-might-not-need-a-comment` skill applies this to a diff.
1010
- **ID generation**: `generateId()` (UUID v4, the default) or `generateShortId(size?)` (URL-safe, 21 chars by default) from `@sim/utils/id` — never `crypto.randomUUID()`, `nanoid`, or `uuid`. Both use `crypto.getRandomValues()`, so they also work in non-secure (HTTP) browsers. For other randomness, `@sim/utils/random` (`randomInt`, `randomFloat`, `randomItem`, `generateRandomBytes`, `generateRandomHex`) — never `Math.random()` or `crypto.randomBytes()`.
1111
- **Common utilities**: use the shared helpers from the `@sim/utils/<module>` subpaths instead of inline implementations (`check:utils` bans most of the inline forms below):

‎apps/docs/components/ui/icon-mapping.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
426426
fireflies_v2: FirefliesIcon,
427427
fivetran: FivetranIcon,
428428
flint: FlintIcon,
429+
flow: ApiIcon,
429430
function: CodeIcon,
430431
gamma: GammaIcon,
431432
generic: WebhookIcon,
@@ -490,6 +491,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
490491
intercom: IntercomIcon,
491492
intercom_v2: IntercomIcon,
492493
intune: IntuneIcon,
494+
jama: ApiIcon,
493495
jina: JinaAIIcon,
494496
jira: JiraIcon,
495497
jira_service_management: JiraServiceManagementIcon,

‎apps/docs/content/docs/cli/credentials.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ sim credentials update <credentialId> [options]
168168
| `--service-account-json <value>` | No | Write-only provider service-account JSON configuration, including Oracle Database connection fields. |
169169
| `--api-token <value>` | No | Write-only provider API token. |
170170
| `--domain <value>` | No | Provider account domain. |
171+
| `--provider-workspace-id <value>` | No | Provider workspace identifier, separate from the Sim workspace. |
171172
| `--atlassian-product <value>` | No | Atlassian product to verify; defaults to Jira on create and preserves the saved product on reconnect. Accepted values: `jira`, `confluence`. |
172173
| `--signing-secret <value>` | No | Write-only webhook signing secret. |
173174
| `--bot-token <value>` | No | Write-only bot token. |

0 commit comments

Comments
 (0)