Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Converge settings spinners on LoadingSpinner

rcourtman8c1c7dfda470
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 483a9420ab..9782fd0c3f 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -528,6 +528,11 @@ entitlement checks, upgrade destinations, and label selection, but the
button-styled upgrade action must compose frontend-primitives'
`UpgradeButtonLink` instead of exporting or applying a lifecycle-local CTA
class helper.
+Agent profile loading indicators follow that same split:
+`AgentProfilesPanel.tsx` may own license-checking, profile-loading, and empty
+profile semantics, but spinner shell, size, tone, and accessible status
+behavior must compose frontend-primitives' `LoadingSpinner` instead of
+lifecycle-local `animate-spin` border classes.
## Extension Points
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index 663270a5e0..45b52df37b 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -378,6 +378,9 @@ payload shape change when the portal presents compact client rows.
frontend-primitives' `ExternalTextLink`; API contracts own the token scope,
usage, preset, and revoke semantics, not new-tab anchor safety or link
chrome.
+ Token refresh/loading state remains API contract data only while the
+ visible spinner shell routes through frontend-primitives-owned
+ `LoadingSpinner` instead of an API-token-local animate-spin SVG.
11. `frontend-modern/src/components/Settings/apiTokenManagerModel.ts` shared with `security-privacy`: the pure API token settings model is both a security/privacy control surface and a canonical API payload contract boundary.
12. `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx` shared with `agent-lifecycle`: the inline node credential slot is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.
13. `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx` shared with `agent-lifecycle`: the pure infrastructure operations inventory/install model is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index d09f135cce..fdd223b521 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -1331,6 +1331,10 @@ not a replacement status card, CTA band, or page-local nested card.
`SettingsLoadingSkeleton` primitive and the
`settings-loading-skeleton-shell` registry rule instead of local
`animate-pulse` block templates.
+ Pure Settings loading indicators that are spinners rather than skeleton
+ placeholders must stay on `LoadingSpinner` and the `loading-spinner-shell`
+ registry rule instead of local `border-t-transparent` or `border-b-2`
+ animate-spin shells.
3. Update this contract when a new canonical UI pattern is adopted
4. Remove local forks after the shared primitive is introduced
5. Keep shared feature-level presenters on capability truth. When reusable
@@ -2766,9 +2770,10 @@ green/yellow span classes in storage components or storage-backup presentation
helpers.
Loading indicators are registry-backed too. `LoadingSpinner` owns the shared
border-based spinner shell, size catalog, tone catalog, decorative status, and
-accessible status label behavior. Patrol and AI finding surfaces must compose
-that primitive for loading and action-pending spinners; icon-specific refresh
-rotation remains local icon state, not a loading-spinner shell.
+accessible status label behavior. Settings, Patrol, and AI finding surfaces
+must compose that primitive for pure loading and action-pending spinners;
+icon-specific refresh rotation remains local icon state, not a loading-spinner
+shell.
Native select controls are registry-backed too. `FormSelect` owns label/id
wiring, helper-text description merging, value synchronization, default select
chrome, dynamic-option value synchronization, and compact styling hooks for
diff --git a/docs/release-control/v6/internal/subsystems/organization-settings.md b/docs/release-control/v6/internal/subsystems/organization-settings.md
index 0b5881d641..39396f9420 100644
--- a/docs/release-control/v6/internal/subsystems/organization-settings.md
+++ b/docs/release-control/v6/internal/subsystems/organization-settings.md
@@ -120,6 +120,10 @@ create, review, and approve cross-organization shares.
membership, role, and sharing meaning of those loading surfaces, while
frontend-primitives owns the skeleton animation, fill tokens, and table/card
placeholder shells.
+8. Keep RBAC role and user-assignment loading indicators on the shared
+ `LoadingSpinner` primitive. Organization settings owns RBAC loading
+ semantics; frontend-primitives owns spinner size, tone, and accessible
+ status behavior.
## Current State
diff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.md
index cf6c1d733d..59be85b735 100644
--- a/docs/release-control/v6/internal/subsystems/security-privacy.md
+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md
@@ -210,6 +210,10 @@ controls as normal product settings.
placeholders on the shared `SettingsLoadingSkeleton` primitive. This
subsystem owns the security/privacy posture semantics; frontend-primitives
owns skeleton animation, fill tokens, and placeholder shell consistency.
+6a. Keep API token refresh/loading indicators on the shared `LoadingSpinner`
+ primitive. Security/privacy owns the token-management trust copy and
+ refresh semantics; frontend-primitives owns spinner shell, tone, and
+ accessible status behavior.
6. Keep the shared storage-directory and secure storage-file hardening helper aligned with the crypto manager plus control-plane magic-link key and store handling whenever runtime data-root ownership assumptions change.
7. Keep auth-env ingestion, hosted commercial base URL validation, and shared
fingerprint-verifier TLS defaults aligned whenever runtime auth loading,
diff --git a/frontend-modern/scripts/shared-template-registry.json b/frontend-modern/scripts/shared-template-registry.json
index 56a7159dd3..cca67c3b06 100644
--- a/frontend-modern/scripts/shared-template-registry.json
+++ b/frontend-modern/scripts/shared-template-registry.json
@@ -435,13 +435,23 @@
{
"id": "loading-spinner-shell",
"category": "loading-indicator",
- "summary": "Patrol, AI, and shared loading indicators must compose LoadingSpinner for shared size, tone, and accessibility behavior instead of recreating border-based animate-spin spans.",
+ "summary": "Settings, Patrol, AI, and shared loading indicators must compose LoadingSpinner for shared size, tone, and accessibility behavior instead of recreating border-based animate-spin spans.",
"canonical": {
"path": "src/components/shared/LoadingSpinner.tsx",
"export": "LoadingSpinner"
},
"requiredConsumers": [
{ "path": "src/components/AI/FindingsPanel.tsx" },
+ { "path": "src/components/Settings/AISettings.tsx" },
+ { "path": "src/components/Settings/AISettingsDialogs.tsx" },
+ { "path": "src/components/Settings/APITokenManager.tsx" },
+ { "path": "src/components/Settings/AgentProfilesPanel.tsx" },
+ { "path": "src/components/Settings/RolesPanel.tsx" },
+ { "path": "src/components/Settings/SSOProvidersPanel.tsx" },
+ { "path": "src/components/Settings/UpdateInstallGuide.tsx" },
+ { "path": "src/components/Settings/UpdatesSettingsPanel.tsx" },
+ { "path": "src/components/Settings/UserAssignmentsDialog.tsx" },
+ { "path": "src/components/Settings/UserAssignmentsPanel.tsx" },
{ "path": "src/components/patrol/ApprovalBanner.tsx" },
{ "path": "src/components/patrol/ApprovalSection.tsx" },
{ "path": "src/components/patrol/InvestigationMessages.tsx" },
@@ -457,6 +467,64 @@
"h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"
]
},
+ {
+ "path": "src/components/Settings/AISettings.tsx",
+ "patterns": [
+ "h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"
+ ]
+ },
+ {
+ "path": "src/components/Settings/AISettingsDialogs.tsx",
+ "patterns": [
+ "h-4 w-4 border-2 border-white border-t-transparent rounded-full animate-spin"
+ ]
+ },
+ {
+ "path": "src/components/Settings/APITokenManager.tsx",
+ "patterns": ["<svg class=\"h-4 w-4 animate-spin\""]
+ },
+ {
+ "path": "src/components/Settings/AgentProfilesPanel.tsx",
+ "patterns": [
+ "animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"
+ ]
+ },
+ {
+ "path": "src/components/Settings/RolesPanel.tsx",
+ "patterns": [
+ "animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"
+ ]
+ },
+ {
+ "path": "src/components/Settings/SSOProvidersPanel.tsx",
+ "patterns": [
+ "h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"
+ ]
+ },
+ {
+ "path": "src/components/Settings/UpdateInstallGuide.tsx",
+ "patterns": [
+ "h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent"
+ ]
+ },
+ {
+ "path": "src/components/Settings/UpdatesSettingsPanel.tsx",
+ "patterns": [
+ "animate-spin h-4 w-4 border-2 border-white border-t-transparent rounded-full"
+ ]
+ },
+ {
+ "path": "src/components/Settings/UserAssignmentsDialog.tsx",
+ "patterns": [
+ "animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500"
+ ]
+ },
+ {
+ "path": "src/components/Settings/UserAssignmentsPanel.tsx",
+ "patterns": [
+ "animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"
+ ]
+ },
{
"path": "src/components/patrol/ApprovalBanner.tsx",
"patterns": [
@@ -2645,6 +2713,46 @@
"scripts/shared-template-audit.mjs"
]
},
+ {
+ "id": "settings-local-border-loading-spinner-shell",
+ "category": "loading-indicator",
+ "summary": "Settings surfaces must not recreate border-top-transparent loading spinners locally; compose LoadingSpinner so size, tone, and accessibility behavior stay shared.",
+ "canonical": {
+ "path": "src/components/shared/LoadingSpinner.tsx",
+ "export": "LoadingSpinner"
+ },
+ "scopes": ["src/components/Settings"],
+ "extensions": [".tsx"],
+ "allPatterns": ["border-t-transparent", "animate-spin"],
+ "legacyReason": "Retired migration debt. Settings AI, SSO, API token, and update loading states compose LoadingSpinner instead of local border-based spinner shells.",
+ "allowedPaths": [],
+ "ignoredPaths": ["src/components/shared/SharedPrimitives.guardrails.test.ts"],
+ "proof": [
+ "src/components/shared/LoadingSpinner.test.tsx",
+ "src/components/shared/SharedPrimitives.guardrails.test.ts",
+ "scripts/shared-template-audit.mjs"
+ ]
+ },
+ {
+ "id": "settings-local-border-bottom-loading-spinner-shell",
+ "category": "loading-indicator",
+ "summary": "Settings surfaces must not recreate border-bottom loading spinners locally; compose LoadingSpinner so size, tone, and accessibility behavior stay shared.",
+ "canonical": {
+ "path": "src/components/shared/LoadingSpinner.tsx",
+ "export": "LoadingSpinner"
+ },
+ "scopes": ["src/components/Settings"],
+ "extensions": [".tsx"],
+ "allPatterns": ["border-b-2", "animate-spin"],
+ "legacyReason": "Retired migration debt. Settings RBAC and agent profile loading states compose LoadingSpinner instead of local border-bottom spinner shells.",
+ "allowedPaths": [],
+ "ignoredPaths": ["src/components/shared/SharedPrimitives.guardrails.test.ts"],
+ "proof": [
+ "src/components/shared/LoadingSpinner.test.tsx",
+ "src/components/shared/SharedPrimitives.guardrails.test.ts",
+ "scripts/shared-template-audit.mjs"
+ ]
+ },
{
"id": "platform-table-shell-local-frame",
"category": "platform-table-shell",
diff --git a/frontend-modern/src/components/Settings/AISettings.tsx b/frontend-modern/src/components/Settings/AISettings.tsx
index 6faaa88a63..a243bf13b0 100644
--- a/frontend-modern/src/components/Settings/AISettings.tsx
+++ b/frontend-modern/src/components/Settings/AISettings.tsx
@@ -6,6 +6,7 @@ import { AIModelSelectionSection } from '@/components/Settings/AIModelSelectionS
import { AIRuntimeControlsSection } from '@/components/Settings/AIRuntimeControlsSection';
import { AISettingsStatusAndActions } from '@/components/Settings/AISettingsStatusAndActions';
import { useAISettingsState } from '@/components/Settings/useAISettingsState';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import SettingsPanel from '@/components/shared/SettingsPanel';
import { Toggle } from '@/components/shared/Toggle';
import { PATROL_PATH } from '@/routing/resourceLinks';
@@ -48,7 +49,7 @@ export const AISettings: Component = () => {
<form class="divide-y divide-border" onSubmit={state.handleSave}>
<Show when={state.loading()}>
<div class="flex items-center gap-3 text-sm text-muted p-4 sm:p-6">
- <span class="h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin" />
+ <LoadingSpinner size="md" tone="current" />
{getAISettingsLoadingState().text}
</div>
</Show>
diff --git a/frontend-modern/src/components/Settings/AISettingsDialogs.tsx b/frontend-modern/src/components/Settings/AISettingsDialogs.tsx
index 3886c7406b..2ba99b389e 100644
--- a/frontend-modern/src/components/Settings/AISettingsDialogs.tsx
+++ b/frontend-modern/src/components/Settings/AISettingsDialogs.tsx
@@ -1,6 +1,7 @@
import { Show, type Accessor, type Component, type Setter } from 'solid-js';
import { Dialog } from '@/components/shared/Dialog';
import { ExternalTextLink } from '@/components/shared/ExternalTextLink';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import { SelectionCardGroup } from '@/components/shared/SelectionCardGroup';
import { getAISettingsSetupDialogPresentation } from '@/utils/aiSettingsPresentation';
import type { AIProvider } from '@/types/ai';
@@ -108,7 +109,7 @@ export const AISettingsDialogs: Component<AISettingsDialogsProps> = (props) => {
}
>
{props.setupSaving() && (
- <span class="h-4 w-4 border-2 border-white border-t-transparent rounded-full animate-spin" />
+ <LoadingSpinner size="md" tone="inverse" />
)}
{setupPresentation().submitLabel}
</button>
diff --git a/frontend-modern/src/components/Settings/APITokenManager.tsx b/frontend-modern/src/components/Settings/APITokenManager.tsx
index 65dd77d5ba..f8fc5ae907 100644
--- a/frontend-modern/src/components/Settings/APITokenManager.tsx
+++ b/frontend-modern/src/components/Settings/APITokenManager.tsx
@@ -3,6 +3,7 @@ import { Card } from '@/components/shared/Card';
import { Dialog } from '@/components/shared/Dialog';
import { ExternalTextLink } from '@/components/shared/ExternalTextLink';
import { SectionHeader } from '@/components/shared/SectionHeader';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import { PulseDataGrid } from '@/components/shared/PulseDataGrid';
import BadgeCheck from 'lucide-solid/icons/badge-check';
import { MONITORING_READ_SCOPE } from '@/constants/apiScopes';
@@ -161,23 +162,7 @@ export const APITokenManager: Component<APITokenManagerProps> = (props) => {
padding="sm"
class="flex items-center gap-2 border border-blue-200 text-xs text-blue-800 dark:border-blue-800 dark:text-blue-200"
>
- <svg class="h-4 w-4 animate-spin" viewBox="0 0 24 24" fill="none" stroke="currentColor">
- <circle
- class="opacity-25"
- cx="12"
- cy="12"
- r="10"
- stroke-width="4"
- stroke="currentColor"
- />
- <path
- class="opacity-75"
- d="M4 12a8 8 0 018-8"
- stroke-width="4"
- stroke-linecap="round"
- stroke="currentColor"
- />
- </svg>
+ <LoadingSpinner size="md" tone="info" />
<span>Refreshing security status…</span>
</Card>
</Show>
diff --git a/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx b/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx
index 1403090489..d19bbdb911 100644
--- a/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx
+++ b/frontend-modern/src/components/Settings/AgentProfilesPanel.tsx
@@ -5,6 +5,7 @@ import SettingsPanel from '@/components/shared/SettingsPanel';
import { Dialog } from '@/components/shared/Dialog';
import { FormSelect } from '@/components/shared/FormSelect';
import { FormTextarea } from '@/components/shared/FormTextarea';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import { StatusIndicatorBadge } from '@/components/shared/StatusIndicatorBadge';
import { UpgradeButtonLink } from '@/components/shared/UpgradeLink';
import { SuggestProfileModal } from './SuggestProfileModal';
@@ -73,7 +74,7 @@ export const AgentProfilesPanel: Component = () => {
fallback={
<Card padding="lg">
<div class="flex items-center justify-center py-8">
- <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" />
+ <LoadingSpinner size="xl" tone="info" />
<span class="ml-3 text-muted">Checking license...</span>
</div>
</Card>
@@ -146,7 +147,11 @@ export const AgentProfilesPanel: Component = () => {
>
<Show when={loading()}>
<div class="flex items-center justify-center py-8">
- <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" />
+ <LoadingSpinner
+ size="xl"
+ tone="info"
+ label="Loading configuration profiles"
+ />
</div>
</Show>
diff --git a/frontend-modern/src/components/Settings/RolesPanel.tsx b/frontend-modern/src/components/Settings/RolesPanel.tsx
index f791165e3b..73ca4ff233 100644
--- a/frontend-modern/src/components/Settings/RolesPanel.tsx
+++ b/frontend-modern/src/components/Settings/RolesPanel.tsx
@@ -3,6 +3,7 @@ import SettingsPanel from '@/components/shared/SettingsPanel';
import { RBACFeatureGateSection } from './RBACFeatureGateSection';
import { RolesEditorDialog } from './RolesEditorDialog';
import { useRolesPanelState } from './useRolesPanelState';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import { getRolesEmptyState } from '@/utils/rbacPresentation';
import Plus from 'lucide-solid/icons/plus';
import Pencil from 'lucide-solid/icons/pencil';
@@ -41,7 +42,7 @@ export const RolesPanel: Component = () => {
<Show when={state.loading()}>
<div class="flex items-center justify-center py-8">
- <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" />
+ <LoadingSpinner size="xl" tone="info" label="Loading roles" />
</div>
</Show>
diff --git a/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx b/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx
index 938d2a32ea..0545c39112 100644
--- a/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx
+++ b/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx
@@ -4,6 +4,7 @@ import { Toggle } from '@/components/shared/Toggle';
import { formField, labelClass, controlClass, formHelpText } from '@/components/shared/Form';
import { FormTextarea } from '@/components/shared/FormTextarea';
import { Dialog } from '@/components/shared/Dialog';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import Plus from 'lucide-solid/icons/plus';
import Pencil from 'lucide-solid/icons/pencil';
import Trash2 from 'lucide-solid/icons/trash-2';
@@ -108,7 +109,7 @@ export const SSOProvidersPanel: Component<SSOProvidersPanelProps> = (props) => {
{/* Content */}
<Show when={loading()}>
<div class="flex items-center gap-3 text-sm text-muted">
- <span class="h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin" />
+ <LoadingSpinner size="md" tone="current" />
{getSSOProvidersLoadingState().text}
</div>
</Show>
diff --git a/frontend-modern/src/components/Settings/UpdateInstallGuide.tsx b/frontend-modern/src/components/Settings/UpdateInstallGuide.tsx
index 1e0486d32a..9d8614e18e 100644
--- a/frontend-modern/src/components/Settings/UpdateInstallGuide.tsx
+++ b/frontend-modern/src/components/Settings/UpdateInstallGuide.tsx
@@ -11,6 +11,7 @@ import type {
VersionInfo,
} from '@/api/updates';
import { CopyCommandBlock } from '@/components/Settings/CopyCommandBlock';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import {
buildIdleDockerComposeCommand,
buildIdleDockerUpdateCommand,
@@ -247,7 +248,7 @@ export const UpdateInstallGuide: Component<UpdateInstallGuideProps> = (props) =>
</Show>
}
>
- <div class="h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent" />
+ <LoadingSpinner size="md" tone="inverse" />
Installing...
</Show>
</button>
diff --git a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx
index ad53d846d5..b878219378 100644
--- a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx
+++ b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx
@@ -2,6 +2,7 @@ import { Component, Show, For, Accessor, Setter, createUniqueId } from 'solid-js
import SettingsPanel from '@/components/shared/SettingsPanel';
import { FormSelect } from '@/components/shared/FormSelect';
import { HelpIcon } from '@/components/shared/HelpIcon';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import {
SelectionCardGroup,
type SelectionCardOption,
@@ -199,7 +200,7 @@ export const UpdatesSettingsPanel: Component<UpdatesSettingsPanelProps> = (props
>
{props.checkingForUpdates() ? (
<>
- <div class="animate-spin h-4 w-4 border-2 border-white border-t-transparent rounded-full"></div>
+ <LoadingSpinner size="md" tone="inverse" />
{getUpdateCheckActionLabel(true)}
</>
) : (
diff --git a/frontend-modern/src/components/Settings/UserAssignmentsDialog.tsx b/frontend-modern/src/components/Settings/UserAssignmentsDialog.tsx
index e894a6a92e..400ed14c10 100644
--- a/frontend-modern/src/components/Settings/UserAssignmentsDialog.tsx
+++ b/frontend-modern/src/components/Settings/UserAssignmentsDialog.tsx
@@ -1,5 +1,6 @@
import { Component, For, Show } from 'solid-js';
import { Dialog } from '@/components/shared/Dialog';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import type { Permission, Role, UserRoleAssignment } from '@/types/rbac';
import BadgeCheck from 'lucide-solid/icons/badge-check';
import Shield from 'lucide-solid/icons/shield';
@@ -90,7 +91,7 @@ export const UserAssignmentsDialog: Component<UserAssignmentsDialogProps> = (pro
Effective Permissions Preview
</h4>
<Show when={props.loadingPermissions}>
- <div class="animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500" />
+ <LoadingSpinner size="md" tone="info" label="Loading effective permissions" />
</Show>
</div>
<div class="bg-surface-hover rounded-md p-4 border border-border-subtle">
diff --git a/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx b/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx
index 87461b4b5b..9c59ca9b3d 100644
--- a/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx
+++ b/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx
@@ -3,6 +3,7 @@ import SettingsPanel from '@/components/shared/SettingsPanel';
import { RBACFeatureGateSection } from './RBACFeatureGateSection';
import { UserAssignmentsDialog } from './UserAssignmentsDialog';
import { useUserAssignmentsPanelState } from './useUserAssignmentsPanelState';
+import { LoadingSpinner } from '@/components/shared/LoadingSpinner';
import Users from 'lucide-solid/icons/users';
import Shield from 'lucide-solid/icons/shield';
import Pencil from 'lucide-solid/icons/pencil';
@@ -41,7 +42,7 @@ export const UserAssignmentsPanel: Component = () => {
<Show when={state.loading()}>
<div class="flex items-center justify-center py-8">
- <div class="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" />
+ <LoadingSpinner size="xl" tone="info" label="Loading user access" />
</div>
</Show>
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 048e30e132..bebc74467f 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -378,6 +378,54 @@ describe('settings architecture guardrails', () => {
}
});
+ it('keeps settings loading spinners on the shared spinner primitive', () => {
+ const spinnerConsumers: Array<[string, string[]]> = [
+ [
+ '../AISettings.tsx',
+ ['h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin'],
+ ],
+ [
+ '../AISettingsDialogs.tsx',
+ ['h-4 w-4 border-2 border-white border-t-transparent rounded-full animate-spin'],
+ ],
+ ['../APITokenManager.tsx', ['<svg class="h-4 w-4 animate-spin"']],
+ [
+ '../AgentProfilesPanel.tsx',
+ ['animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500'],
+ ],
+ ['../RolesPanel.tsx', ['animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500']],
+ [
+ '../SSOProvidersPanel.tsx',
+ ['h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin'],
+ ],
+ [
+ '../UpdateInstallGuide.tsx',
+ ['h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent'],
+ ],
+ [
+ '../UpdatesSettingsPanel.tsx',
+ ['animate-spin h-4 w-4 border-2 border-white border-t-transparent rounded-full'],
+ ],
+ [
+ '../UserAssignmentsDialog.tsx',
+ ['animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500'],
+ ],
+ [
+ '../UserAssignmentsPanel.tsx',
+ ['animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500'],
+ ],
+ ];
+
+ for (const [path, retiredPatterns] of spinnerConsumers) {
+ const source = settingsRuntimeSources[path];
+ expect(source).toContain('@/components/shared/LoadingSpinner');
+ expect(source).toContain('LoadingSpinner');
+ for (const retiredPattern of retiredPatterns) {
+ expect(source).not.toContain(retiredPattern);
+ }
+ }
+ });
+
it('keeps telemetry disclosure aligned with the security privacy contract', () => {
expect(generalSettingsPanelSource).toContain('aggregate self-hosted adoption');
expect(generalSettingsPanelSource).toContain('counts, and coarse feature flags');
diff --git a/frontend-modern/src/components/shared/LoadingSpinner.test.tsx b/frontend-modern/src/components/shared/LoadingSpinner.test.tsx
index dee3f3a864..af1c29def9 100644
--- a/frontend-modern/src/components/shared/LoadingSpinner.test.tsx
+++ b/frontend-modern/src/components/shared/LoadingSpinner.test.tsx
@@ -57,5 +57,7 @@ describe('LoadingSpinner', () => {
expect(getLoadingSpinnerClass({ size: 'xs', tone: 'muted', class: 'align-middle' })).toContain(
'align-middle',
);
+ expect(getLoadingSpinnerClass({ size: 'xl', tone: 'info' })).toContain('h-6');
+ expect(getLoadingSpinnerClass({ size: 'xl', tone: 'info' })).toContain('border-blue-500');
});
});
diff --git a/frontend-modern/src/components/shared/LoadingSpinner.tsx b/frontend-modern/src/components/shared/LoadingSpinner.tsx
index 6c3d42aa8d..387c5d12ca 100644
--- a/frontend-modern/src/components/shared/LoadingSpinner.tsx
+++ b/frontend-modern/src/components/shared/LoadingSpinner.tsx
@@ -1,6 +1,6 @@
import { splitProps, type JSX } from 'solid-js';
-export type LoadingSpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
+export type LoadingSpinnerSize = 'xs' | 'sm' | 'md' | 'xl' | 'lg';
export type LoadingSpinnerTone = 'current' | 'inverse' | 'info' | 'muted';
export interface LoadingSpinnerProps extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, 'class'> {
@@ -14,6 +14,7 @@ const LOADING_SPINNER_SIZE_CLASSES: Record<LoadingSpinnerSize, string> = {
xs: 'h-2 w-2 border',
sm: 'h-3 w-3 border-2',
md: 'h-4 w-4 border-2',
+ xl: 'h-6 w-6 border-2',
lg: 'h-12 w-12 border-4',
};
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index 65bc091502..257c540e89 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -2459,12 +2459,13 @@ describe('shared primitive guardrails', () => {
}
});
- it('keeps Patrol and AI loading spinners on the shared LoadingSpinner primitive', () => {
+ it('keeps Settings, Patrol, and AI loading spinners on the shared LoadingSpinner primitive', () => {
const registry = JSON.parse(sharedTemplateRegistrySource) as {
rules?: Array<{
id: string;
canonical?: { path?: string; export?: string };
requiredConsumers?: Array<{ path?: string }>;
+ forbiddenPatterns?: Array<{ path?: string; patterns?: string[] }>;
}>;
patternGuards?: Array<{
id: string;
@@ -2479,11 +2480,27 @@ describe('shared primitive guardrails', () => {
const registeredGuard = registry.patternGuards?.find(
(guard) => guard.id === 'patrol-ai-local-loading-spinner-shell',
);
+ const settingsBorderTopGuard = registry.patternGuards?.find(
+ (guard) => guard.id === 'settings-local-border-loading-spinner-shell',
+ );
+ const settingsBorderBottomGuard = registry.patternGuards?.find(
+ (guard) => guard.id === 'settings-local-border-bottom-loading-spinner-shell',
+ );
expect(registeredRule?.canonical?.path).toBe('src/components/shared/LoadingSpinner.tsx');
expect(registeredRule?.canonical?.export).toBe('LoadingSpinner');
expect(registeredRule?.requiredConsumers?.map((consumer) => consumer.path)).toEqual([
'src/components/AI/FindingsPanel.tsx',
+ 'src/components/Settings/AISettings.tsx',
+ 'src/components/Settings/AISettingsDialogs.tsx',
+ 'src/components/Settings/APITokenManager.tsx',
+ 'src/components/Settings/AgentProfilesPanel.tsx',
+ 'src/components/Settings/RolesPanel.tsx',
+ 'src/components/Settings/SSOProvidersPanel.tsx',
+ 'src/components/Settings/UpdateInstallGuide.tsx',
+ 'src/components/Settings/UpdatesSettingsPanel.tsx',
+ 'src/components/Settings/UserAssignmentsDialog.tsx',
+ 'src/components/Settings/UserAssignmentsPanel.tsx',
'src/components/patrol/ApprovalBanner.tsx',
'src/components/patrol/ApprovalSection.tsx',
'src/components/patrol/InvestigationMessages.tsx',
@@ -2500,6 +2517,20 @@ describe('shared primitive guardrails', () => {
'src/components/AI/FindingsPanel.tsx',
]);
expect(registeredGuard?.allowedPaths ?? []).toHaveLength(0);
+ expect(settingsBorderTopGuard?.canonical?.path).toBe(
+ 'src/components/shared/LoadingSpinner.tsx',
+ );
+ expect(settingsBorderTopGuard?.canonical?.export).toBe('LoadingSpinner');
+ expect(settingsBorderTopGuard?.allPatterns).toEqual(['border-t-transparent', 'animate-spin']);
+ expect(settingsBorderTopGuard?.scopes).toEqual(['src/components/Settings']);
+ expect(settingsBorderTopGuard?.allowedPaths ?? []).toHaveLength(0);
+ expect(settingsBorderBottomGuard?.canonical?.path).toBe(
+ 'src/components/shared/LoadingSpinner.tsx',
+ );
+ expect(settingsBorderBottomGuard?.canonical?.export).toBe('LoadingSpinner');
+ expect(settingsBorderBottomGuard?.allPatterns).toEqual(['border-b-2', 'animate-spin']);
+ expect(settingsBorderBottomGuard?.scopes).toEqual(['src/components/Settings']);
+ expect(settingsBorderBottomGuard?.allowedPaths ?? []).toHaveLength(0);
expect(loadingSpinnerSource).toContain('getLoadingSpinnerClass');
expect(loadingSpinnerSource).toContain('aria-hidden={ariaHidden()}');
@@ -2516,6 +2547,32 @@ describe('shared primitive guardrails', () => {
expect(source).toContain('LoadingSpinner');
expect(source).not.toMatch(/border(?:-\d)?[^\n]*border-t-transparent[^\n]*animate-spin/);
}
+
+ const settingsSpinnerConsumers = [
+ 'src/components/Settings/AISettings.tsx',
+ 'src/components/Settings/AISettingsDialogs.tsx',
+ 'src/components/Settings/APITokenManager.tsx',
+ 'src/components/Settings/AgentProfilesPanel.tsx',
+ 'src/components/Settings/RolesPanel.tsx',
+ 'src/components/Settings/SSOProvidersPanel.tsx',
+ 'src/components/Settings/UpdateInstallGuide.tsx',
+ 'src/components/Settings/UpdatesSettingsPanel.tsx',
+ 'src/components/Settings/UserAssignmentsDialog.tsx',
+ 'src/components/Settings/UserAssignmentsPanel.tsx',
+ ];
+ const forbiddenPatternsByPath = new Map(
+ registeredRule?.forbiddenPatterns?.map((entry) => [entry.path, entry.patterns ?? []]) ?? [],
+ );
+
+ for (const path of settingsSpinnerConsumers) {
+ const source = readFrontendSource(path);
+ expect(source).toContain('LoadingSpinner');
+ for (const retiredPattern of forbiddenPatternsByPath.get(path) ?? []) {
+ expect(source).not.toContain(retiredPattern);
+ }
+ expect(source).not.toContain('border-t-transparent');
+ expect(source).not.toContain('border-b-2 border-blue-500');
+ }
});
it('keeps organization Settings loading skeletons on the shared skeleton primitive', () => {
diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.py
index cdbeee3da7..9197baeb3d 100644
--- a/scripts/release_control/subsystem_lookup_test.py
+++ b/scripts/release_control/subsystem_lookup_test.py
@@ -2860,7 +2860,7 @@ class SubsystemLookupTest(unittest.TestCase):
{
"heading": "## Shared Boundaries",
"path": "internal/api/access_control_handlers.go",
- "line": 469,
+ "line": 472,
"heading_line": 123,
}
],