Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Converge organization settings actions on shared Button primitives
rcourtman85ae9ad54027
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 3cddacc5f7..9158a8a9a3 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -581,6 +581,10 @@ not a replacement status card, CTA band, or page-local nested card.feature-gate, and row-action semantics, while `Button` / `ActionIconButton`own primary, ghost, accent, danger, focus, disabled, and settings-actionchrome.+ Organization overview, access, invitation, member, and sharing actions stay+ in that same primitive family: organization settings owns membership and+ share semantics, while `Button` owns primary, danger-outline, success-ghost,+ danger-ghost, disabled, focus, and row-action chrome.If a new surface needs a variant that the shared primitive does not expose,extend the primitive and registry guard rather than adding a page-localclass string.diff --git a/docs/release-control/v6/internal/subsystems/organization-settings.md b/docs/release-control/v6/internal/subsystems/organization-settings.mdindex a706350d94..a52d7e4e2f 100644--- a/docs/release-control/v6/internal/subsystems/organization-settings.md+++ b/docs/release-control/v6/internal/subsystems/organization-settings.md@@ -124,11 +124,13 @@ create, review, and approve cross-organization shares.`LoadingSpinner` primitive. Organization settings owns RBAC loadingsemantics; frontend-primitives owns spinner size, tone, and accessiblestatus behavior.-9. Keep RBAC role creation, role edit/delete row actions, and user-access- management actions on the shared `Button` / `ActionIconButton` primitives.- Organization settings owns the role and assignment semantics, feature-gate- availability, and row-action behavior; frontend-primitives owns primary,- ghost, accent, danger, focus, disabled, and settings-action chrome.+9. Keep organization overview, invitation, member, share, RBAC role creation,+ role edit/delete row actions, and user-access management actions on the+ shared `Button` / `ActionIconButton` primitives. Organization settings owns+ role, membership, sharing, feature-gate availability, and row-action+ behavior; frontend-primitives owns primary, danger-outline, success-ghost,+ danger-ghost, ghost, accent, danger, focus, disabled, and settings-action+ chrome.## Current Statediff --git a/frontend-modern/scripts/shared-template-registry.json b/frontend-modern/scripts/shared-template-registry.jsonindex 86dfd38248..1b5d55161f 100644--- a/frontend-modern/scripts/shared-template-registry.json+++ b/frontend-modern/scripts/shared-template-registry.json@@ -965,6 +965,13 @@{ "path": "src/components/Settings/InfrastructureInstallerSection.tsx" },{ "path": "src/components/Settings/InfrastructureSourceManager.tsx" },{ "path": "src/components/Settings/InfrastructureWorkspace.tsx" },+ { "path": "src/components/Settings/OrganizationAccessInvitationsSection.tsx" },+ { "path": "src/components/Settings/OrganizationAccessManagementSection.tsx" },+ { "path": "src/components/Settings/OrganizationAccessMembersSection.tsx" },+ { "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx" },+ { "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx" },+ { "path": "src/components/Settings/OrganizationOverviewDetailsSection.tsx" },+ { "path": "src/components/Settings/OrganizationSharingCreateSection.tsx" },{ "path": "src/components/Settings/ProLicensePanel.tsx" },{ "path": "src/components/Settings/ProLicensePlanSection.tsx" },{ "path": "src/components/Settings/ReportingPanel.tsx" },@@ -1019,6 +1026,51 @@"inline-flex w-full sm:w-auto min-h-10 sm:min-h-9 items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-2.5 text-sm font-medium text-white transition-colors hover:bg-blue-700"]},+ {+ "path": "src/components/Settings/OrganizationAccessInvitationsSection.tsx",+ "patterns": [+ "inline-flex items-center justify-center rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60",+ "inline-flex items-center justify-center rounded-md border border-border bg-surface px-3 py-1.5 text-sm font-medium text-base-content transition-colors hover:border-red-300 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60"+ ]+ },+ {+ "path": "src/components/Settings/OrganizationAccessManagementSection.tsx",+ "patterns": [+ "inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60"+ ]+ },+ {+ "path": "src/components/Settings/OrganizationAccessMembersSection.tsx",+ "patterns": [+ "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60"+ ]+ },+ {+ "path": "src/components/Settings/OrganizationIncomingSharesSection.tsx",+ "patterns": [+ "inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-emerald-700 hover:bg-emerald-50 dark:text-emerald-300 dark:hover:bg-emerald-900 disabled:cursor-not-allowed disabled:opacity-60",+ "inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60"+ ]+ },+ {+ "path": "src/components/Settings/OrganizationOutgoingSharesSection.tsx",+ "patterns": [+ "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60"+ ]+ },+ {+ "path": "src/components/Settings/OrganizationOverviewDetailsSection.tsx",+ "patterns": [+ "inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60"+ ]+ },+ {+ "path": "src/components/Settings/OrganizationSharingCreateSection.tsx",+ "patterns": [+ "text-xs font-medium text-blue-700 hover:text-blue-800 dark:text-blue-300 dark:hover:text-blue-200",+ "inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60"+ ]+ },{"path": "src/components/Settings/ReportingPanel.tsx","patterns": [@@ -5518,6 +5570,29 @@"scripts/shared-template-audit.mjs"]},+ {+ "id": "button-success-ghost-settings-row-action-local-shell",+ "category": "action-button",+ "summary": "Settings and infrastructure surfaces must not copy emerald ghost row-action shells; use Button with the successGhost variant and xs size.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings", "src/features", "src/pages"],+ "extensions": [".tsx"],+ "allPatterns": [+ "rounded-md px-2 py-1 text-xs font-medium text-emerald-700",+ "hover:bg-emerald-50 dark:text-emerald-300 dark:hover:bg-emerald-900"+ ],+ "legacyReason": "Retired migration debt. Positive row actions belong to the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": ["src/components/shared/Button.test.tsx"],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },{"id": "button-info-settings-action-local-shell","category": "action-button",@@ -5604,6 +5679,29 @@"scripts/shared-template-audit.mjs"]},+ {+ "id": "button-danger-ghost-settings-row-action-local-shell",+ "category": "action-button",+ "summary": "Settings and infrastructure surfaces must not copy red ghost row-action shells; use Button with the dangerGhost variant and xs size.",+ "canonical": {+ "path": "src/components/shared/buttonModel.ts",+ "export": "getButtonClass"+ },+ "scopes": ["src/components/Settings", "src/features", "src/pages"],+ "extensions": [".tsx"],+ "allPatterns": [+ "rounded-md px-2 py-1 text-xs font-medium text-red-600",+ "hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900"+ ],+ "legacyReason": "Retired migration debt. Destructive row actions belong to the shared Button primitive family.",+ "allowedPaths": [],+ "ignoredPaths": ["src/components/shared/Button.test.tsx"],+ "proof": [+ "src/components/shared/SharedPrimitives.guardrails.test.ts",+ "src/components/shared/Button.test.tsx",+ "scripts/shared-template-audit.mjs"+ ]+ },{"id": "button-outline-settings-row-action-local-shell","category": "action-button",diff --git a/frontend-modern/src/components/Settings/OrganizationAccessInvitationsSection.tsx b/frontend-modern/src/components/Settings/OrganizationAccessInvitationsSection.tsxindex 7fc7fb99c3..463e81fd4d 100644--- a/frontend-modern/src/components/Settings/OrganizationAccessInvitationsSection.tsx+++ b/frontend-modern/src/components/Settings/OrganizationAccessInvitationsSection.tsx@@ -1,4 +1,5 @@import { Component, For, Show } from 'solid-js';+import { Button } from '@/components/shared/Button';import { OrganizationRoleBadge } from '@/components/shared/OrganizationBadges';import { formatOrgDate } from '@/utils/orgUtils';import type { useOrganizationAccessPanelState } from './useOrganizationAccessPanelState';@@ -34,22 +35,22 @@ export const OrganizationAccessInvitationsSection: Component<<OrganizationRoleBadge role={invitation.role} /></div><div class="mt-3 flex gap-2">- <button- type="button"+ <Button+ variant="primary"+ size="mdCompact"onClick={() => void props.state.acceptInvitation(invitation.orgId)}disabled={props.state.saving()}- class="inline-flex items-center justify-center rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60">Accept- </button>- <button- type="button"+ </Button>+ <Button+ variant="dangerOutline"+ size="mdCompact"onClick={() => void props.state.declineInvitation(invitation.orgId)}disabled={props.state.saving()}- class="inline-flex items-center justify-center rounded-md border border-border bg-surface px-3 py-1.5 text-sm font-medium text-base-content transition-colors hover:border-red-300 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60">Decline- </button>+ </Button></div></div>)}@@ -77,14 +78,14 @@ export const OrganizationAccessInvitationsSection: Component<</div><div class="flex items-center gap-2"><OrganizationRoleBadge role={invitation.role} />- <button- type="button"+ <Button+ variant="dangerOutline"+ size="mdCompact"onClick={() => void props.state.revokeInvitation(invitation.userId)}disabled={props.state.saving()}- class="inline-flex items-center justify-center rounded-md border border-border bg-surface px-3 py-1.5 text-sm font-medium text-base-content transition-colors hover:border-red-300 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60">Revoke- </button>+ </Button></div></div>)}diff --git a/frontend-modern/src/components/Settings/OrganizationAccessManagementSection.tsx b/frontend-modern/src/components/Settings/OrganizationAccessManagementSection.tsxindex cdef9deadf..f2a7c39721 100644--- a/frontend-modern/src/components/Settings/OrganizationAccessManagementSection.tsx+++ b/frontend-modern/src/components/Settings/OrganizationAccessManagementSection.tsx@@ -1,5 +1,6 @@import type { OrganizationRole } from '@/api/orgs';import { Component, For, Show } from 'solid-js';+import { Button } from '@/components/shared/Button';import { FormSelect } from '@/components/shared/FormSelect';import { ORGANIZATION_MEMBER_ROLE_OPTIONS } from '@/utils/organizationRolePresentation';import { getOrganizationAccessManageRequiredMessage } from '@/utils/organizationSettingsPresentation';@@ -46,14 +47,15 @@ export const OrganizationAccessManagementSection: Component<{(option) => <option value={option.value}>{option.label}</option>}</For></FormSelect>- <button- type="button"+ <Button+ variant="primary"+ size="settingsAction"+ class="w-full sm:w-auto"onClick={props.state.inviteMember}disabled={props.state.saving()}- class="inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60">{props.state.saving() ? 'Saving...' : 'Invite'}- </button>+ </Button></div></div></Show>diff --git a/frontend-modern/src/components/Settings/OrganizationAccessMembersSection.tsx b/frontend-modern/src/components/Settings/OrganizationAccessMembersSection.tsxindex 1d5f68b62f..15fc8adc11 100644--- a/frontend-modern/src/components/Settings/OrganizationAccessMembersSection.tsx+++ b/frontend-modern/src/components/Settings/OrganizationAccessMembersSection.tsx@@ -1,4 +1,5 @@import { Component, For, Show } from 'solid-js';+import { Button } from '@/components/shared/Button';import { FormSelect } from '@/components/shared/FormSelect';import { OrganizationRoleBadge } from '@/components/shared/OrganizationBadges';import { PulseDataGrid } from '@/components/shared/PulseDataGrid';@@ -83,17 +84,18 @@ export const OrganizationAccessMembersSection: Component<OrganizationAccessMembeconst isOwner = () => member.userId === currentOrg().ownerUserId;return (<Show when={props.state.canManageCurrentOrg() && !isOwner()}>- <button- type="button"+ <Button+ variant="dangerGhost"+ size="xs"+ class="gap-1"onClick={() => {void props.state.removeMember(member);}}disabled={props.state.saving()}- class="inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60"><Trash2 class="w-3.5 h-3.5" />Remove- </button>+ </Button></Show>);},diff --git a/frontend-modern/src/components/Settings/OrganizationIncomingSharesSection.tsx b/frontend-modern/src/components/Settings/OrganizationIncomingSharesSection.tsxindex 6202fbeaba..c230f61353 100644--- a/frontend-modern/src/components/Settings/OrganizationIncomingSharesSection.tsx+++ b/frontend-modern/src/components/Settings/OrganizationIncomingSharesSection.tsx@@ -1,4 +1,5 @@import { Component, Show } from 'solid-js';+import { Button } from '@/components/shared/Button';import {OrganizationRoleBadge,OrganizationShareStatusBadge,@@ -82,27 +83,27 @@ export const OrganizationIncomingSharesSection: Component<<Show when={props.state.canManageCurrentOrg()}><div class="flex items-center justify-end gap-2"><Show when={share.status === 'pending'}>- <button- type="button"+ <Button+ variant="successGhost"+ size="xs"onClick={() => {void props.state.acceptIncomingShare(share);}}disabled={props.state.saving()}- class="inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-emerald-700 hover:bg-emerald-50 dark:text-emerald-300 dark:hover:bg-emerald-900 disabled:cursor-not-allowed disabled:opacity-60">Accept- </button>+ </Button></Show>- <button- type="button"+ <Button+ variant="dangerGhost"+ size="xs"onClick={() => {void props.state.declineIncomingShare(share);}}disabled={props.state.saving()}- class="inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60">{share.status === 'pending' ? 'Decline' : 'Remove'}- </button>+ </Button></div></Show>),diff --git a/frontend-modern/src/components/Settings/OrganizationOutgoingSharesSection.tsx b/frontend-modern/src/components/Settings/OrganizationOutgoingSharesSection.tsxindex e7b3fd0b87..8d39cdb7e7 100644--- a/frontend-modern/src/components/Settings/OrganizationOutgoingSharesSection.tsx+++ b/frontend-modern/src/components/Settings/OrganizationOutgoingSharesSection.tsx@@ -1,4 +1,5 @@import { Component, Show } from 'solid-js';+import { Button } from '@/components/shared/Button';import {OrganizationRoleBadge,OrganizationShareStatusBadge,@@ -83,17 +84,18 @@ export const OrganizationOutgoingSharesSection: Component<align: 'right',render: (share) => (<Show when={props.state.canManageCurrentOrg()}>- <button- type="button"+ <Button+ variant="dangerGhost"+ size="xs"+ class="gap-1"onClick={() => {void props.state.deleteShare(share);}}disabled={props.state.saving()}- class="inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60"><Trash2 class="w-3.5 h-3.5" />Remove- </button>+ </Button></Show>),},diff --git a/frontend-modern/src/components/Settings/OrganizationOverviewDetailsSection.tsx b/frontend-modern/src/components/Settings/OrganizationOverviewDetailsSection.tsxindex ccc31f7d1b..e622bd0eb0 100644--- a/frontend-modern/src/components/Settings/OrganizationOverviewDetailsSection.tsx+++ b/frontend-modern/src/components/Settings/OrganizationOverviewDetailsSection.tsx@@ -1,4 +1,5 @@import { Component, Show } from 'solid-js';+import { Button } from '@/components/shared/Button';import { formatOrgDate } from '@/utils/orgUtils';import { getOrganizationOverviewManageRequiredMessage } from '@/utils/organizationSettingsPresentation';import type { useOrganizationOverviewPanelState } from './useOrganizationOverviewPanelState';@@ -37,10 +38,7 @@ export const OrganizationOverviewDetailsSection: Component<</div><div class="space-y-2">- <label- class="block text-sm font-medium text-base-content"- for="org-display-name-input"- >+ <label class="block text-sm font-medium text-base-content" for="org-display-name-input">Display Name</label><div class="flex flex-col gap-2 sm:flex-row sm:items-center">@@ -52,14 +50,15 @@ export const OrganizationOverviewDetailsSection: Component<disabled={!props.state.canManageCurrentOrg() || props.state.saving()}class="w-full rounded-md border px-3 py-2 text-sm shadow-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500 "/>- <button- type="button"+ <Button+ variant="primary"+ size="settingsAction"+ class="w-full sm:w-auto"onClick={props.state.saveDisplayName}disabled={!props.state.canManageCurrentOrg() || props.state.saving()}- class="inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60">{props.state.saving() ? 'Saving...' : 'Save'}- </button>+ </Button></div><Show when={!props.state.canManageCurrentOrg()}><p class="text-xs text-muted">{getOrganizationOverviewManageRequiredMessage()}</p>diff --git a/frontend-modern/src/components/Settings/OrganizationSharingCreateSection.tsx b/frontend-modern/src/components/Settings/OrganizationSharingCreateSection.tsxindex 1391714769..4d24477629 100644--- a/frontend-modern/src/components/Settings/OrganizationSharingCreateSection.tsx+++ b/frontend-modern/src/components/Settings/OrganizationSharingCreateSection.tsx@@ -1,4 +1,5 @@import { Component, For, Show } from 'solid-js';+import { Button } from '@/components/shared/Button';import { FormSelect } from '@/components/shared/FormSelect';import { CANONICAL_RESOURCE_TYPES } from '@/utils/canonicalResourceTypes';import {@@ -78,13 +79,14 @@ export const OrganizationSharingCreateSection: Component<OrganizationSharingCrea<p class="text-xs text-blue-700 dark:text-blue-300">Choose a discovered resource, or switch to manual entry.</p>- <button- type="button"+ <Button+ variant="ghost"+ size="xs"+ class="text-blue-700 hover:text-blue-800 dark:text-blue-300 dark:hover:text-blue-200"onClick={props.state.toggleManualEntry}- class="text-xs font-medium text-blue-700 hover:text-blue-800 dark:text-blue-300 dark:hover:text-blue-200">{props.state.manualEntryExpanded() ? 'Hide manual entry' : 'Enter manually'}- </button>+ </Button></div></div></Show>@@ -150,14 +152,15 @@ export const OrganizationSharingCreateSection: Component<OrganizationSharingCrea</Show><div class="flex justify-end">- <button- type="button"+ <Button+ variant="primary"+ size="settingsAction"+ class="w-full sm:w-auto"onClick={props.state.createShare}disabled={!props.state.canCreateShare()}- class="inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60">{props.state.saving() ? 'Saving...' : 'Create Share'}- </button>+ </Button></div></div></div>diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 4366c35311..5174aeeef7 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -62,8 +62,12 @@ import nodeModalStateSource from '../useNodeModalState.ts?raw';import availabilityTargetSlotSource from '../ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx?raw';import trueNASCredentialSlotSource from '../ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx?raw';import vmwareCredentialSlotSource from '../ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx?raw';+import organizationAccessInvitationsSectionSource from '../OrganizationAccessInvitationsSection.tsx?raw';import organizationAccessManagementSectionSource from '../OrganizationAccessManagementSection.tsx?raw';import organizationAccessMembersSectionSource from '../OrganizationAccessMembersSection.tsx?raw';+import organizationIncomingSharesSectionSource from '../OrganizationIncomingSharesSection.tsx?raw';+import organizationOutgoingSharesSectionSource from '../OrganizationOutgoingSharesSection.tsx?raw';+import organizationOverviewDetailsSectionSource from '../OrganizationOverviewDetailsSection.tsx?raw';import organizationSharingCreateSectionSource from '../OrganizationSharingCreateSection.tsx?raw';import rolesEditorDialogSource from '../RolesEditorDialog.tsx?raw';import rolesPanelSource from '../RolesPanel.tsx?raw';@@ -365,6 +369,40 @@ describe('settings architecture guardrails', () => {expect(userAssignmentsPanelSource).not.toContain('inline-flex min-h-10 sm:min-h-9 items-center gap-2 px-3 py-1.5 rounded-md',);++ for (const organizationActionSource of [+ organizationAccessInvitationsSectionSource,+ organizationAccessManagementSectionSource,+ organizationAccessMembersSectionSource,+ organizationIncomingSharesSectionSource,+ organizationOutgoingSharesSectionSource,+ organizationOverviewDetailsSectionSource,+ organizationSharingCreateSectionSource,+ ]) {+ expect(organizationActionSource).toContain('@/components/shared/Button');+ expect(organizationActionSource).toContain('<Button');+ }+ expect(organizationAccessInvitationsSectionSource).toContain('variant="dangerOutline"');+ expect(organizationIncomingSharesSectionSource).toContain('variant="successGhost"');+ expect(organizationIncomingSharesSectionSource).toContain('variant="dangerGhost"');+ expect(organizationAccessMembersSectionSource).toContain('variant="dangerGhost"');+ expect(organizationOutgoingSharesSectionSource).toContain('variant="dangerGhost"');+ expect(organizationSharingCreateSectionSource).toContain('variant="ghost"');+ for (const source of [+ organizationAccessInvitationsSectionSource,+ organizationAccessManagementSectionSource,+ organizationAccessMembersSectionSource,+ organizationIncomingSharesSectionSource,+ organizationOutgoingSharesSectionSource,+ organizationOverviewDetailsSectionSource,+ organizationSharingCreateSectionSource,+ ]) {+ expect(source).not.toContain(+ 'inline-flex items-center justify-center rounded-md bg-blue-600',+ );+ expect(source).not.toContain('hover:bg-red-50 dark:text-red-300');+ expect(source).not.toContain('hover:bg-emerald-50 dark:text-emerald-300');+ }});it('keeps settings callouts on the shared CalloutCard primitive', () => {diff --git a/frontend-modern/src/components/shared/Button.test.tsx b/frontend-modern/src/components/shared/Button.test.tsxindex f0eb213e8b..30b55c4c99 100644--- a/frontend-modern/src/components/shared/Button.test.tsx+++ b/frontend-modern/src/components/shared/Button.test.tsx@@ -39,6 +39,7 @@ describe('Button', () => {expect(buttonModelSource).toContain('success:');expect(buttonModelSource).toContain('successOutline:');expect(buttonModelSource).toContain('successGhost:');+ expect(buttonModelSource).toContain('dangerGhost:');expect(buttonModelSource).toContain("'border border-border bg-surface text-muted hover:bg-surface-hover hover:text-base-content'",);@@ -110,6 +111,9 @@ describe('Button', () => {<Button variant="successGhost" size="settingsAction">Dismiss</Button>+ <Button variant="dangerGhost" size="xs">+ Remove member+ </Button><Button variant="info" size="settingsAction">View reference</Button>@@ -141,6 +145,11 @@ describe('Button', () => {expect(dismissButton).toHaveClass('border-transparent');expect(dismissButton).toHaveClass('text-emerald-900');+ const removeMemberButton = screen.getByRole('button', { name: 'Remove member' });+ expect(removeMemberButton).toHaveClass('border-transparent');+ expect(removeMemberButton).toHaveClass('text-red-600');+ expect(removeMemberButton).toHaveClass('text-xs');+const infoButton = screen.getByRole('button', { name: 'View reference' });expect(infoButton).toHaveClass('border-blue-200');expect(infoButton).toHaveClass('bg-blue-50');diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex 8a037adef2..f4723ff04c 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -250,8 +250,10 @@ import generalSettingsPanelSource from '@/components/Settings/GeneralSettingsPanimport infrastructureInstallerSectionSource from '@/components/Settings/InfrastructureInstallerSection.tsx?raw';import infrastructureWorkspaceSource from '@/components/Settings/InfrastructureWorkspace.tsx?raw';import monitoredSystemImpactPreviewSource from '@/components/Settings/MonitoredSystemImpactPreview.tsx?raw';+import organizationAccessManagementSectionSource from '@/components/Settings/OrganizationAccessManagementSection.tsx?raw';import organizationAccessLoadingStateSource from '@/components/Settings/OrganizationAccessLoadingState.tsx?raw';import organizationBillingLoadingStateSource from '@/components/Settings/OrganizationBillingLoadingState.tsx?raw';+import organizationOverviewDetailsSectionSource from '@/components/Settings/OrganizationOverviewDetailsSection.tsx?raw';import organizationOverviewLoadingStateSource from '@/components/Settings/OrganizationOverviewLoadingState.tsx?raw';import organizationSharingLoadingStateSource from '@/components/Settings/OrganizationSharingLoadingState.tsx?raw';import organizationAccessInvitationsSectionSource from '@/components/Settings/OrganizationAccessInvitationsSection.tsx?raw';@@ -259,6 +261,7 @@ import organizationAccessMembersSectionSource from '@/components/Settings/Organiimport organizationIncomingSharesSectionSource from '@/components/Settings/OrganizationIncomingSharesSection.tsx?raw';import organizationOutgoingSharesSectionSource from '@/components/Settings/OrganizationOutgoingSharesSection.tsx?raw';import organizationOverviewMembersSectionSource from '@/components/Settings/OrganizationOverviewMembersSection.tsx?raw';+import organizationSharingCreateSectionSource from '@/components/Settings/OrganizationSharingCreateSection.tsx?raw';import proLicensePanelSource from '@/components/Settings/ProLicensePanel.tsx?raw';import proLicensePlanSectionSource from '@/components/Settings/ProLicensePlanSection.tsx?raw';import reportingPanelSource from '@/components/Settings/ReportingPanel.tsx?raw';@@ -3006,6 +3009,9 @@ describe('shared primitive guardrails', () => {const settingsSuccessGhostActionGuard = registry.patternGuards?.find((guard) => guard.id === 'button-success-ghost-settings-action-local-shell',);+ const settingsSuccessGhostRowActionGuard = registry.patternGuards?.find(+ (guard) => guard.id === 'button-success-ghost-settings-row-action-local-shell',+ );const largeReportingActionGuard = registry.patternGuards?.find((guard) => guard.id === 'button-large-reporting-action-local-shell',);@@ -3015,6 +3021,9 @@ describe('shared primitive guardrails', () => {const settingsDangerOutlineActionGuard = registry.patternGuards?.find((guard) => guard.id === 'button-danger-outline-settings-action-local-shell',);+ const settingsDangerGhostRowActionGuard = registry.patternGuards?.find(+ (guard) => guard.id === 'button-danger-ghost-settings-row-action-local-shell',+ );const settingsRowActionGuard = registry.patternGuards?.find((guard) => guard.id === 'button-outline-settings-row-action-local-shell',);@@ -3093,6 +3102,13 @@ describe('shared primitive guardrails', () => {'src/components/Settings/InfrastructureInstallerSection.tsx','src/components/Settings/InfrastructureSourceManager.tsx','src/components/Settings/InfrastructureWorkspace.tsx',+ 'src/components/Settings/OrganizationAccessInvitationsSection.tsx',+ 'src/components/Settings/OrganizationAccessManagementSection.tsx',+ 'src/components/Settings/OrganizationAccessMembersSection.tsx',+ 'src/components/Settings/OrganizationIncomingSharesSection.tsx',+ 'src/components/Settings/OrganizationOutgoingSharesSection.tsx',+ 'src/components/Settings/OrganizationOverviewDetailsSection.tsx',+ 'src/components/Settings/OrganizationSharingCreateSection.tsx','src/components/Settings/ProLicensePanel.tsx','src/components/Settings/ProLicensePlanSection.tsx','src/components/Settings/ReportingPanel.tsx',@@ -3148,6 +3164,51 @@ describe('shared primitive guardrails', () => {'inline-flex w-full sm:w-auto min-h-10 sm:min-h-9 items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-2.5 text-sm font-medium text-white transition-colors hover:bg-blue-700',]),}),+ expect.objectContaining({+ path: 'src/components/Settings/OrganizationAccessInvitationsSection.tsx',+ patterns: expect.arrayContaining([+ 'inline-flex items-center justify-center rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60',+ 'inline-flex items-center justify-center rounded-md border border-border bg-surface px-3 py-1.5 text-sm font-medium text-base-content transition-colors hover:border-red-300 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60',+ ]),+ }),+ expect.objectContaining({+ path: 'src/components/Settings/OrganizationAccessManagementSection.tsx',+ patterns: expect.arrayContaining([+ 'inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60',+ ]),+ }),+ expect.objectContaining({+ path: 'src/components/Settings/OrganizationAccessMembersSection.tsx',+ patterns: expect.arrayContaining([+ 'inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60',+ ]),+ }),+ expect.objectContaining({+ path: 'src/components/Settings/OrganizationIncomingSharesSection.tsx',+ patterns: expect.arrayContaining([+ 'inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-emerald-700 hover:bg-emerald-50 dark:text-emerald-300 dark:hover:bg-emerald-900 disabled:cursor-not-allowed disabled:opacity-60',+ 'inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60',+ ]),+ }),+ expect.objectContaining({+ path: 'src/components/Settings/OrganizationOutgoingSharesSection.tsx',+ patterns: expect.arrayContaining([+ 'inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60',+ ]),+ }),+ expect.objectContaining({+ path: 'src/components/Settings/OrganizationOverviewDetailsSection.tsx',+ patterns: expect.arrayContaining([+ 'inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60',+ ]),+ }),+ expect.objectContaining({+ path: 'src/components/Settings/OrganizationSharingCreateSection.tsx',+ patterns: expect.arrayContaining([+ 'text-xs font-medium text-blue-700 hover:text-blue-800 dark:text-blue-300 dark:hover:text-blue-200',+ 'inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60',+ ]),+ }),expect.objectContaining({path: 'src/components/Settings/ReportingPanel.tsx',patterns: expect.arrayContaining([@@ -3410,6 +3471,23 @@ describe('shared primitive guardrails', () => {expect(settingsSuccessGhostActionGuard?.ignoredPaths).toEqual(['src/components/shared/Button.test.tsx',]);+ expect(settingsSuccessGhostRowActionGuard?.canonical?.path).toBe(+ 'src/components/shared/buttonModel.ts',+ );+ expect(settingsSuccessGhostRowActionGuard?.canonical?.export).toBe('getButtonClass');+ expect(settingsSuccessGhostRowActionGuard?.allPatterns).toEqual([+ 'rounded-md px-2 py-1 text-xs font-medium text-emerald-700',+ 'hover:bg-emerald-50 dark:text-emerald-300 dark:hover:bg-emerald-900',+ ]);+ expect(settingsSuccessGhostRowActionGuard?.scopes).toEqual([+ 'src/components/Settings',+ 'src/features',+ 'src/pages',+ ]);+ expect(settingsSuccessGhostRowActionGuard?.allowedPaths ?? []).toHaveLength(0);+ expect(settingsSuccessGhostRowActionGuard?.ignoredPaths).toEqual([+ 'src/components/shared/Button.test.tsx',+ ]);expect(largeReportingActionGuard?.canonical?.path).toBe('src/components/shared/buttonModel.ts');expect(largeReportingActionGuard?.canonical?.export).toBe('getButtonClass');expect(largeReportingActionGuard?.allPatterns).toEqual([@@ -3454,6 +3532,23 @@ describe('shared primitive guardrails', () => {expect(settingsDangerOutlineActionGuard?.ignoredPaths).toEqual(['src/components/shared/Button.test.tsx',]);+ expect(settingsDangerGhostRowActionGuard?.canonical?.path).toBe(+ 'src/components/shared/buttonModel.ts',+ );+ expect(settingsDangerGhostRowActionGuard?.canonical?.export).toBe('getButtonClass');+ expect(settingsDangerGhostRowActionGuard?.allPatterns).toEqual([+ 'rounded-md px-2 py-1 text-xs font-medium text-red-600',+ 'hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900',+ ]);+ expect(settingsDangerGhostRowActionGuard?.scopes).toEqual([+ 'src/components/Settings',+ 'src/features',+ 'src/pages',+ ]);+ expect(settingsDangerGhostRowActionGuard?.allowedPaths ?? []).toHaveLength(0);+ expect(settingsDangerGhostRowActionGuard?.ignoredPaths).toEqual([+ 'src/components/shared/Button.test.tsx',+ ]);expect(settingsRowActionGuard?.canonical?.path).toBe('src/components/shared/buttonModel.ts');expect(settingsRowActionGuard?.canonical?.export).toBe('getButtonClass');expect(settingsRowActionGuard?.allPatterns).toEqual([@@ -3747,6 +3842,7 @@ describe('shared primitive guardrails', () => {expect(buttonModelSource).toContain('success:');expect(buttonModelSource).toContain('successOutline:');expect(buttonModelSource).toContain('successGhost:');+ expect(buttonModelSource).toContain('dangerGhost:');expect(buttonModelSource).toContain('COPY_VALUE_BUTTON_VARIANT_CLASSES');expect(buttonModelSource).toContain('COPY_VALUE_BUTTON_SIZE_CLASSES');expect(buttonModelSource).toContain('ACTION_ICON_BUTTON_TONE_CLASSES');@@ -3947,6 +4043,58 @@ describe('shared primitive guardrails', () => {expect(rolesPanelSource).not.toContain('p-1.5 rounded-md text-slate-500 hover:text-red-600 hover:bg-red-50 dark:hover:text-red-400 dark:hover:bg-red-900',);+ for (const organizationActionSource of [+ organizationAccessInvitationsSectionSource,+ organizationAccessManagementSectionSource,+ organizationAccessMembersSectionSource,+ organizationIncomingSharesSectionSource,+ organizationOutgoingSharesSectionSource,+ organizationOverviewDetailsSectionSource,+ organizationSharingCreateSectionSource,+ ]) {+ expect(organizationActionSource).toContain('@/components/shared/Button');+ expect(organizationActionSource).toContain('<Button');+ }+ for (const organizationPrimarySource of [+ organizationAccessInvitationsSectionSource,+ organizationAccessManagementSectionSource,+ organizationOverviewDetailsSectionSource,+ organizationSharingCreateSectionSource,+ ]) {+ expect(organizationPrimarySource).toContain('variant="primary"');+ }+ for (const organizationDangerGhostSource of [+ organizationAccessMembersSectionSource,+ organizationIncomingSharesSectionSource,+ organizationOutgoingSharesSectionSource,+ ]) {+ expect(organizationDangerGhostSource).toContain('variant="dangerGhost"');+ expect(organizationDangerGhostSource).toContain('size="xs"');+ }+ expect(organizationIncomingSharesSectionSource).toContain('variant="successGhost"');+ expect(organizationAccessInvitationsSectionSource).toContain('variant="dangerOutline"');+ expect(organizationSharingCreateSectionSource).toContain('variant="ghost"');+ for (const retiredOrganizationActionPattern of [+ 'inline-flex items-center justify-center rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60',+ 'inline-flex items-center justify-center rounded-md border border-border bg-surface px-3 py-1.5 text-sm font-medium text-base-content transition-colors hover:border-red-300 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60',+ 'inline-flex w-full sm:w-auto items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-60',+ 'inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60',+ 'inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-emerald-700 hover:bg-emerald-50 dark:text-emerald-300 dark:hover:bg-emerald-900 disabled:cursor-not-allowed disabled:opacity-60',+ 'inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900 disabled:cursor-not-allowed disabled:opacity-60',+ 'text-xs font-medium text-blue-700 hover:text-blue-800 dark:text-blue-300 dark:hover:text-blue-200',+ ]) {+ for (const organizationActionSource of [+ organizationAccessInvitationsSectionSource,+ organizationAccessManagementSectionSource,+ organizationAccessMembersSectionSource,+ organizationIncomingSharesSectionSource,+ organizationOutgoingSharesSectionSource,+ organizationOverviewDetailsSectionSource,+ organizationSharingCreateSectionSource,+ ]) {+ expect(organizationActionSource).not.toContain(retiredOrganizationActionPattern);+ }+ }expect(reportingPanelSource).toContain('@/components/shared/Button');expect(reportingPanelSource).toContain('<Button');expect(reportingPanelSource).toContain('variant="success"');diff --git a/frontend-modern/src/components/shared/buttonModel.ts b/frontend-modern/src/components/shared/buttonModel.tsindex 717de31881..9b505047d5 100644--- a/frontend-modern/src/components/shared/buttonModel.ts+++ b/frontend-modern/src/components/shared/buttonModel.ts@@ -9,6 +9,7 @@ export type ButtonVariant =| 'secondary'| 'danger'| 'dangerOutline'+ | 'dangerGhost'| 'ghost'| 'outline';export type ButtonSize =@@ -40,6 +41,8 @@ export const BUTTON_VARIANT_CLASSES: Record<ButtonVariant, string> = {danger: 'border border-transparent bg-rose-600 text-white shadow-sm hover:bg-rose-700',dangerOutline:'border border-rose-300 bg-transparent text-rose-700 hover:bg-rose-50 dark:border-rose-900 dark:text-rose-300 dark:hover:bg-rose-950',+ dangerGhost:+ 'border border-transparent bg-transparent text-red-600 hover:bg-red-50 dark:text-red-300 dark:hover:bg-red-900',ghost: 'border border-transparent bg-transparent text-base-content hover:bg-surface-hover',outline: 'border border-border bg-transparent text-base-content hover:bg-surface-hover',};