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.

Canonicalize reporting success buttons

rcourtman36f9cf11c410
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 9597146365..fa6b98f13e 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -25,7 +25,7 @@ that binary, not separate customer-facing agent products.
1. `internal/api/agent_install_command_shared.go`
2. `internal/api/config_setup_handlers.go`
-2a. `internal/api/setup_script_render.go`
+ 2a. `internal/api/setup_script_render.go`
3. `internal/api/unified_agent.go`
4. `internal/agentupdate/update.go`
5. `internal/hostagent/agent.go`
@@ -46,16 +46,16 @@ that binary, not separate customer-facing agent products.
20. `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`
21. `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx`
22. `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx`
-22a. `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx`
+ 22a. `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx`
23. `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`
-23a. `frontend-modern/src/components/Settings/InfrastructureAgentUpdatesDialog.tsx`
+ 23a. `frontend-modern/src/components/Settings/InfrastructureAgentUpdatesDialog.tsx`
24. `frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx`
25. `frontend-modern/src/components/Settings/InfrastructureSourcePicker.tsx`
26. `frontend-modern/src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx`
27. `frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx`
28. `frontend-modern/src/components/Settings/discoverySettingsModel.ts`
29. `frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts`
-29a. `frontend-modern/src/components/Settings/infrastructureAgentUpdateCommandsModel.ts`
+ 29a. `frontend-modern/src/components/Settings/infrastructureAgentUpdateCommandsModel.ts`
30. `frontend-modern/src/components/Settings/proxmoxSettingsModel.ts`
31. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`
32. `frontend-modern/src/components/Settings/useInfrastructureSettingsState.ts`
@@ -69,7 +69,7 @@ that binary, not separate customer-facing agent products.
40. `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`
41. `frontend-modern/src/utils/agentProfilesPresentation.ts`
42. `frontend-modern/src/utils/agentInstallCommand.ts`
-42a. `frontend-modern/src/utils/agentVersion.ts`
+ 42a. `frontend-modern/src/utils/agentVersion.ts`
43. `frontend-modern/src/utils/infrastructureOnboardingPresentation.ts`
44. `frontend-modern/src/api/nodes.ts`
45. `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`
@@ -137,7 +137,7 @@ presented as proof that a guest-local agent is installed.
behavior aligned so the Machines onboarding path does not diverge by OS.
18. `frontend-modern/src/utils/infrastructureSettingsPresentation.ts` shared with `api-contracts`: the infrastructure settings presentation helper is both an agent lifecycle control surface and an API-backed direct-node/discovery settings boundary.
19. `internal/api/agent_install_command_shared.go` shared with `api-contracts`: agent install command assembly is both an agent lifecycle control surface and a canonical API payload contract boundary.
-19a. `internal/api/cloud_agent_install_command.go` shared with `api-contracts`, `cloud-paid`: hosted tenant agent install command generation is both an agent lifecycle enrollment surface and a provider-hosted tenant boundary.
+ 19a. `internal/api/cloud_agent_install_command.go` shared with `api-contracts`, `cloud-paid`: hosted tenant agent install command generation is both an agent lifecycle enrollment surface and a provider-hosted tenant boundary.
The hosted PVE/PBS install command path must stay on the same token-file
command transport as the normal lifecycle install helpers, while failing
closed unless hosted mode is active, the target org exists, and the minted
@@ -791,8 +791,8 @@ helpers or recreating badge spans inline.
access control; target-org approval remains organization-settings plus
security/privacy ownership even when the implementation moves through the
shared backend API tree.
-6. Keep legacy Unified Agent compatibility names explicitly secondary when touching shared `internal/api/` runtime helpers: the legacy host-route family and `host-agent:*` scope names may remain as ingress or migration aliases, but they must not retake primary ownership in router state, live runtime scope checks, handler commentary, or operator-facing guidance.
-7. Add or change the unified agent CLI entrypoint, version/help exit semantics, or startup argument/error routing through `cmd/pulse-agent/main.go`.
+7. Keep legacy Unified Agent compatibility names explicitly secondary when touching shared `internal/api/` runtime helpers: the legacy host-route family and `host-agent:*` scope names may remain as ingress or migration aliases, but they must not retake primary ownership in router state, live runtime scope checks, handler commentary, or operator-facing guidance.
+8. Add or change the unified agent CLI entrypoint, version/help exit semantics, or startup argument/error routing through `cmd/pulse-agent/main.go`.
The CLI entrypoint owns propagation of persistence context into runtime-owned helpers. When installer-selected state roots differ from the default, `cmd/pulse-agent/main.go` must pass that exact `StateDir` through both the host-agent runtime and updater startup paths instead of letting one path silently fall back to `/var/lib/pulse-agent`.
The same runtime-owned boundary also owns Pulse control-plane URL validation for agent startup, remote config, updater continuity, and command transport. Non-loopback control-plane URLs remain HTTPS/WSS by default, but explicitly insecure agent/dev-runtime flows may use plain HTTP/WS for LAN development control planes; installer-persisted dev URLs must not be accepted by one runtime path and rejected by another.
The unified agent CLI copy follows the same command-execution vocabulary as the install surface. `cmd/pulse-agent/main.go` may keep the `--enable-commands` flag name for compatibility, but the help text and inline comments must describe command execution as Pulse command execution for Patrol actions and governed Proxmox LXC Docker inventory rather than reviving AI auto-fix language.
@@ -808,7 +808,7 @@ helpers or recreating badge spans inline.
when `--enable-docker=false` or `PULSE_ENABLE_DOCKER=false` is set on
the host, auto-detection and remote config must not start the Docker /
Podman module.
-8. Add or change installer flags, persisted service arguments, or upgrade-safe re-entry behavior through `scripts/install.sh` and `scripts/install.ps1`.
+9. Add or change installer flags, persisted service arguments, or upgrade-safe re-entry behavior through `scripts/install.sh` and `scripts/install.ps1`.
On Unix systemd hosts, `scripts/install.sh` must keep the default agent unit
hardened, but command-enabled Proxmox VE agents selected with
`--enable-commands --enable-proxmox` and type `pve` or `all` must explicitly
@@ -820,11 +820,11 @@ helpers or recreating badge spans inline.
Approval-gated command execution must expose stable rejection reasons for
invalid approval grants so fleet operators can distinguish missing, expired,
mismatched, and signature-invalid grants through agent metrics.
-9. Preserve canonical token-lifecycle reads in shared `internal/api/` auth/security helpers so lifecycle-adjacent setup and install flows do not revoke a displayed relay pairing token after `lastUsedAt` proves that an already paired device is actively depending on that credential.
-10. Preserve backend-owned Pulse Mobile relay runtime credential minting in those same shared `internal/api/` auth/security helpers so lifecycle-adjacent setup and install flows reuse the canonical mobile token route instead of reintroducing wildcard or browser-authored runtime token bundles.
-11. Preserve the dedicated backend-owned `relay:mobile:access` capability and its governed backward-compatible route inventory plus the shared helper call sites around it, so lifecycle-adjacent setup and install flows do not widen the mobile device credential back into general AI chat/execute scope ownership.
-12. Preserve shipped security-doc guidance in shared lifecycle setup helpers so `internal/api/config_setup_handlers.go` and adjacent install/setup runtime paths point operators at the running build's local security documentation route rather than GitHub `main` links.
-13. Keep shared `internal/api/router.go` workload-chart downsampling presentation-only: when that router caps mixed-cadence workload history into equal-time buckets for operator-facing cards, lifecycle-adjacent setup and fleet surfaces must not reuse the shaped chart samples as heartbeat, enrollment, or last-seen authority.
+10. Preserve canonical token-lifecycle reads in shared `internal/api/` auth/security helpers so lifecycle-adjacent setup and install flows do not revoke a displayed relay pairing token after `lastUsedAt` proves that an already paired device is actively depending on that credential.
+11. Preserve backend-owned Pulse Mobile relay runtime credential minting in those same shared `internal/api/` auth/security helpers so lifecycle-adjacent setup and install flows reuse the canonical mobile token route instead of reintroducing wildcard or browser-authored runtime token bundles.
+12. Preserve the dedicated backend-owned `relay:mobile:access` capability and its governed backward-compatible route inventory plus the shared helper call sites around it, so lifecycle-adjacent setup and install flows do not widen the mobile device credential back into general AI chat/execute scope ownership.
+13. Preserve shipped security-doc guidance in shared lifecycle setup helpers so `internal/api/config_setup_handlers.go` and adjacent install/setup runtime paths point operators at the running build's local security documentation route rather than GitHub `main` links.
+14. Keep shared `internal/api/router.go` workload-chart downsampling presentation-only: when that router caps mixed-cadence workload history into equal-time buckets for operator-facing cards, lifecycle-adjacent setup and fleet surfaces must not reuse the shaped chart samples as heartbeat, enrollment, or last-seen authority.
That same presentation-only boundary must preserve canonical millisecond timestamps when it serializes chart points, so lifecycle-adjacent first-host and fleet surfaces do not misread rounded chart samples as duplicate or restarted heartbeat evidence.
The same rule now applies to storage summary interaction. Shared sticky-card or row-hover focus behavior on infrastructure, workloads, and storage may reuse the canonical chart transport, but lifecycle-adjacent install, enrollment, and fleet surfaces must not treat highlighted summary series or sticky-shell state as agent freshness or setup progress.
The same rule now applies to infrastructure-summary metric filters. Shared
@@ -845,7 +845,7 @@ helpers or recreating badge spans inline.
the omitted `usage` or `total` series as missing lifecycle telemetry or
enrollment-state evidence.
Dashboard storage trend consumers on that shared router boundary must now reuse the single `/api/storage-charts` summary response instead of fanning out per-pool `/api/metrics-store/history` reads, and lifecycle surfaces still must treat that batched storage summary transport as presentation context only rather than install, enrollment, or freshness truth.
-14. Keep install-script serving fallback-free, and keep the lifecycle
+15. Keep install-script serving fallback-free, and keep the lifecycle
agent-download fallback pinned to published release lineage. The served
install-script endpoints (/install.sh, /install.ps1) have no GitHub fallback:
`internal/api/unified_agent.go` serves the locally bundled AGENT installer
@@ -856,7 +856,7 @@ helpers or recreating badge spans inline.
tags and explicit RC prerelease tags as release assets; working-line dev
prereleases and build-metadata versions must fail closed so install/repair do
not depend on unpublished or branch-local URLs.
-15. Keep self-hosted purchase handoff state on the adjacent commercial/auth
+16. Keep self-hosted purchase handoff state on the adjacent commercial/auth
boundary. When shared `internal/api/router.go`,
`internal/api/router_routes_cloud.go`, `internal/api/licensing_handlers.go`,
or `internal/api/demo_mode_commercial.go` evolve public
@@ -941,16 +941,16 @@ helpers or recreating badge spans inline.
compact: the persistent page may expose only a concise discovery status
line plus `Run discovery` / `Discovery settings` actions, while new-source
admission stays on the per-platform table actions instead of competing
- with discovery at the top of the page. Command-backed discovery sweeps and
- forced single-resource refreshes remain API/AI-owned admin operations:
- lifecycle surfaces may expose the controls, but route-level authority must
- require `settings:write` plus the Discovery enablement gate, not
- `monitoring:write`, enrollment state, or any fleet lifecycle shortcut.
- Forced workload discovery also remains API/service-owned for endpoint
- identity: lifecycle surfaces must not fill a Proxmox parent node or agent
- name into workload trigger hostnames when the operator did not provide one,
- because the discovery service resolves VM and system-container names from
- canonical state before suggesting URLs or classifying known services.
+ with discovery at the top of the page. Command-backed discovery sweeps and
+ forced single-resource refreshes remain API/AI-owned admin operations:
+ lifecycle surfaces may expose the controls, but route-level authority must
+ require `settings:write` plus the Discovery enablement gate, not
+ `monitoring:write`, enrollment state, or any fleet lifecycle shortcut.
+ Forced workload discovery also remains API/service-owned for endpoint
+ identity: lifecycle surfaces must not fill a Proxmox parent node or agent
+ name into workload trigger hostnames when the operator did not provide one,
+ because the discovery service resolves VM and system-container names from
+ canonical state before suggesting URLs or classifying known services.
The editor's probe step calls the aggregator probe endpoint and
dispatches the detected or manually-selected type into a credential
slot; it must not bypass the probe endpoint or fabricate probe
@@ -1077,7 +1077,7 @@ helpers or recreating badge spans inline.
may accept a preview-provided connected-resource override, but the live
first-session runtime path must keep `/api/state` polling as the sole
source of connected-system truth when no override is supplied.
-7a. Keep lifecycle-neutral shared `internal/api/` changes from altering agent
+ 7a. Keep lifecycle-neutral shared `internal/api/` changes from altering agent
setup, registration, install, or profile payloads by accident. AI runtime
or entitlement work that touches shared router or handler wiring must keep
lifecycle public routes, setup-token validation, and agent profile payloads
@@ -1091,6 +1091,11 @@ helpers or recreating badge spans inline.
narrative, including an explicit advanced-options disclosure so first-time
operators see token generation, command copy, and status confirmation
before non-default connection controls.
+ Setup handoff and connected-system completion actions in that installer
+ surface must keep their lifecycle meaning, destination, and token/download
+ behavior here, while composing the frontend-primitives `Button` variants for
+ success, outlined success, and ghost success chrome instead of carrying
+ lifecycle-local emerald button shells.
9. Keep `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`
and `frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts`
aligned with that same lifecycle path. The bare
@@ -1130,7 +1135,7 @@ helpers or recreating badge spans inline.
`tests/integration/tests/11-first-session.spec.ts` must refresh first-run
state through `/api/security/dev/reset-first-run`, then prove the
canonical `Add infrastructure` handoff and the explicit `Install Pulse
- Agent` secondary handoff against the live setup wizard instead of relying
+Agent` secondary handoff against the live setup wizard instead of relying
on stale bootstrap tokens, dashboard fallbacks, or preview-only coverage.
The primary handoff must land on the shared infrastructure onboarding
contract at `/settings/infrastructure?add=pick` and normalize back to
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 1787416c27..60e0b1e379 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -473,9 +473,15 @@ not a replacement status card, CTA band, or page-local nested card.
settings/action `px-3 py-2 text-sm` shape, the shared `xs` size owns the
compact settings row-action `px-2.5 py-1 text-xs` shape, and the shared
`iconMd` size owns the settings dialog close-button `h-9 w-9` icon shape.
+ Positive completion or continuation actions such as infrastructure handoff
+ and reporting exports use the shared `success`, `successOutline`, and
+ `successGhost` Button variants instead of carrying page-local emerald action
+ shells.
Settings selection helpers such as `ResourcePicker` must use the same
`Button` primitive for select-all, clear, and chip remove actions instead of
restoring footer-local action shells.
+ Reporting surfaces must use the same primitive for retry, generate, and
+ export actions rather than restoring large local CTA button shells.
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-local
class string.
diff --git a/frontend-modern/scripts/shared-template-registry.json b/frontend-modern/scripts/shared-template-registry.json
index b98d9d16dd..93cd812400 100644
--- a/frontend-modern/scripts/shared-template-registry.json
+++ b/frontend-modern/scripts/shared-template-registry.json
@@ -259,6 +259,7 @@
{ "path": "src/components/Settings/InfrastructureInstallerSection.tsx" },
{ "path": "src/components/Settings/InfrastructureSourceManager.tsx" },
{ "path": "src/components/Settings/InfrastructureWorkspace.tsx" },
+ { "path": "src/components/Settings/ReportingPanel.tsx" },
{ "path": "src/components/Settings/ResourcePicker.tsx" },
{ "path": "src/features/patrol/PatrolIntelligenceWorkspace.tsx" },
{ "path": "src/features/standalone/StandalonePageSurface.tsx" }
@@ -270,6 +271,24 @@
"hover:border-red-500 hover:text-red-400",
"w-full sm:w-auto min-h-10 sm:min-h-9 flex items-center justify-center gap-1.5 px-3 py-2.5 text-sm rounded-md border border-border"
]
+ },
+ {
+ "path": "src/components/Settings/ReportingPanel.tsx",
+ "patterns": [
+ "rounded-md border border-base-300 bg-base-100 px-4 py-2 text-sm font-medium text-base-content",
+ "flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto",
+ "bg-blue-600 text-white hover:bg-blue-700",
+ "bg-emerald-600 text-white hover:bg-emerald-700"
+ ]
+ },
+ {
+ "path": "src/components/Settings/InfrastructureInstallerSection.tsx",
+ "patterns": [
+ "inline-flex items-center justify-center rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-emerald-700",
+ "inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 transition-colors hover:bg-emerald-100",
+ "inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100",
+ "inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100"
+ ]
}
],
"proof": [
@@ -1435,6 +1454,90 @@
"scripts/shared-template-audit.mjs"
]
},
+ {
+ "id": "button-success-settings-action-local-shell",
+ "category": "action-button",
+ "summary": "Settings and infrastructure surfaces must not copy the emerald px-3 py-2 success action-button shell; use Button with the success variant and mdCompact or settingsAction size.",
+ "canonical": {
+ "path": "src/components/shared/buttonModel.ts",
+ "export": "getButtonClass"
+ },
+ "scopes": ["src/components/Settings", "src/features", "src/pages"],
+ "extensions": [".tsx"],
+ "allPatterns": ["rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white"],
+ "legacyReason": "Retired migration debt. Positive settings 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-success-outline-settings-action-local-shell",
+ "category": "action-button",
+ "summary": "Settings and infrastructure surfaces must not copy the emerald outlined px-3 py-2 success action-button shell; use Button with the successOutline variant and mdCompact or settingsAction size.",
+ "canonical": {
+ "path": "src/components/shared/buttonModel.ts",
+ "export": "getButtonClass"
+ },
+ "scopes": ["src/components/Settings", "src/features", "src/pages"],
+ "extensions": [".tsx"],
+ "allPatterns": [
+ "rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900"
+ ],
+ "legacyReason": "Retired migration debt. Positive outlined settings 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-success-ghost-settings-action-local-shell",
+ "category": "action-button",
+ "summary": "Settings and infrastructure surfaces must not copy the emerald ghost px-3 py-2 success action-button shell; use Button with the successGhost variant and mdCompact or settingsAction size.",
+ "canonical": {
+ "path": "src/components/shared/buttonModel.ts",
+ "export": "getButtonClass"
+ },
+ "scopes": ["src/components/Settings", "src/features", "src/pages"],
+ "extensions": [".tsx"],
+ "allPatterns": ["rounded-md px-3 py-2 text-sm font-medium text-emerald-900"],
+ "legacyReason": "Retired migration debt. Positive ghost settings 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-large-reporting-action-local-shell",
+ "category": "action-button",
+ "summary": "Reporting and similar settings CTA rows must not copy the large full-width action-button shell; use Button with the lg size and contextual variant.",
+ "canonical": {
+ "path": "src/components/shared/buttonModel.ts",
+ "export": "getButtonClass"
+ },
+ "scopes": ["src/components/Settings", "src/features", "src/pages"],
+ "extensions": [".tsx"],
+ "allPatterns": [
+ "flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto"
+ ],
+ "legacyReason": "Retired migration debt. Large settings/report 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-danger-settings-action-local-shell",
"category": "action-button",
diff --git a/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx b/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx
index 01b162026d..29bae71c67 100644
--- a/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx
@@ -215,32 +215,28 @@ export const InfrastructureInstallerSection: Component<InfrastructureInstallerSe
</p>
</div>
<div class="flex flex-wrap gap-2 lg:w-64 lg:flex-col">
- <button
- type="button"
+ <Button
+ variant="successOutline"
+ size="mdCompact"
onClick={() =>
void state.copySetupHandoffField(
handoff().apiToken,
'Copied first-run admin API token.',
)
}
- class="inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-100 dark:hover:bg-emerald-800"
>
Copy admin token
- </button>
- <button
- type="button"
+ </Button>
+ <Button
+ variant="successOutline"
+ size="mdCompact"
onClick={state.downloadSetupHandoff}
- class="inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-100 dark:hover:bg-emerald-800"
>
Download credentials
- </button>
- <button
- type="button"
- onClick={state.clearSetupHandoff}
- class="inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100 dark:text-emerald-100 dark:hover:bg-emerald-800"
- >
+ </Button>
+ <Button variant="successGhost" size="mdCompact" onClick={state.clearSetupHandoff}>
Dismiss
- </button>
+ </Button>
</div>
</div>
</div>
@@ -788,20 +784,20 @@ export const InfrastructureInstallerSection: Component<InfrastructureInstallerSe
</div>
<Show when={isConnected()}>
<div class="flex flex-col gap-2 sm:flex-row">
- <button
- type="button"
+ <Button
+ variant="success"
+ size="mdCompact"
onClick={state.openInfrastructure}
- class="inline-flex items-center justify-center rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-emerald-700"
>
Open infrastructure
- </button>
- <button
- type="button"
+ </Button>
+ <Button
+ variant="successOutline"
+ size="mdCompact"
onClick={state.openInfrastructureInventory}
- class="inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 transition-colors hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-100 dark:hover:bg-emerald-800"
>
Open inventory
- </button>
+ </Button>
</div>
</Show>
</div>
diff --git a/frontend-modern/src/components/Settings/ReportingPanel.tsx b/frontend-modern/src/components/Settings/ReportingPanel.tsx
index 4202954e93..a1c7ddd54f 100644
--- a/frontend-modern/src/components/Settings/ReportingPanel.tsx
+++ b/frontend-modern/src/components/Settings/ReportingPanel.tsx
@@ -4,6 +4,7 @@ import Download from 'lucide-solid/icons/download';
import BarChart from 'lucide-solid/icons/bar-chart';
import TableProperties from 'lucide-solid/icons/table-properties';
import OperationsPanel from '@/components/Settings/OperationsPanel';
+import { Button } from '@/components/shared/Button';
import { CalloutCard } from '@/components/shared/CalloutCard';
import { formControl, formField, formHelpText, formLabel } from '@/components/shared/Form';
import { FilterButtonGroup, type FilterOption } from '@/components/shared/FilterButtonGroup';
@@ -115,13 +116,9 @@ export function ReportingPanel() {
<div class="space-y-4 p-4 sm:p-6">
<p class="text-sm text-warning">{reportingCatalogError()}</p>
<div class="flex justify-end">
- <button
- type="button"
- class="rounded-md border border-base-300 bg-base-100 px-4 py-2 text-sm font-medium text-base-content transition-colors hover:bg-base-200"
- onClick={reloadReportingCatalog}
- >
+ <Button variant="secondary" size="md" onClick={reloadReportingCatalog}>
Retry
- </button>
+ </Button>
</div>
</div>
</OperationsPanel>
@@ -237,24 +234,23 @@ export function ReportingPanel() {
</div>
<div class="flex justify-end">
- <button
- class={`flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto ${
- generating()
- ? 'cursor-not-allowed bg-slate-300 text-slate-500'
- : 'bg-blue-600 text-white hover:bg-blue-700'
- }`}
+ <Button
+ variant="primary"
+ size="lg"
+ class="w-full gap-2 font-semibold sm:w-auto"
+ isLoading={generating()}
disabled={generating()}
onClick={handleGenerate}
>
- <Show when={generating()} fallback={<Download size={20} />}>
- <div class="h-5 w-5 animate-spin rounded-full border-2 border-t-white border-white" />
+ <Show when={!generating()}>
+ <Download size={20} />
</Show>
{generating()
? 'Generating...'
: selectedResources().length > 0
? `Generate Report (${selectedResources().length} resource${selectedResources().length !== 1 ? 's' : ''})`
: 'Generate Report'}
- </button>
+ </Button>
</div>
</section>
</Show>
@@ -284,20 +280,19 @@ export function ReportingPanel() {
</Show>
<div class="flex justify-end">
- <button
- class={`flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto ${
- exportingInventory()
- ? 'cursor-not-allowed bg-slate-300 text-slate-500'
- : 'bg-emerald-600 text-white hover:bg-emerald-700'
- }`}
+ <Button
+ variant="success"
+ size="lg"
+ class="w-full gap-2 font-semibold sm:w-auto"
+ isLoading={exportingInventory()}
disabled={exportingInventory()}
onClick={handleExportVMInventory}
>
- <Show when={exportingInventory()} fallback={<TableProperties size={20} />}>
- <div class="h-5 w-5 animate-spin rounded-full border-2 border-t-white border-white" />
+ <Show when={!exportingInventory()}>
+ <TableProperties size={20} />
</Show>
{exportingInventory() ? 'Exporting...' : 'Export VM Inventory'}
- </button>
+ </Button>
</div>
</section>
</Show>
diff --git a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx
index 6325f8763f..88ff1c28d4 100644
--- a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx
@@ -256,4 +256,29 @@ describe('ReportingPanel', () => {
screen.getByRole('button', { name: 'Retry' }).click();
expect(reloadReportingCatalog).toHaveBeenCalledOnce();
});
+
+ it('routes reporting command actions through shared button variants', () => {
+ const handleGenerate = vi.fn();
+ const handleExportVMInventory = vi.fn();
+ useReportingPanelStateMock.mockReturnValue(
+ buildState({
+ handleExportVMInventory,
+ handleGenerate,
+ }),
+ );
+
+ render(() => <ReportingPanel />);
+
+ const generateButton = screen.getByRole('button', { name: 'Generate Report' });
+ expect(generateButton).toHaveClass('bg-blue-600');
+ expect(generateButton).toHaveClass('px-6');
+ generateButton.click();
+ expect(handleGenerate).toHaveBeenCalledOnce();
+
+ const exportButton = screen.getByRole('button', { name: 'Export VM Inventory' });
+ expect(exportButton).toHaveClass('bg-emerald-600');
+ expect(exportButton).toHaveClass('px-6');
+ exportButton.click();
+ expect(handleExportVMInventory).toHaveBeenCalledOnce();
+ });
});
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 3d4d6d139f..ff52d71588 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -271,6 +271,36 @@ describe('settings architecture guardrails', () => {
);
});
+ it('keeps settings command actions on the shared button primitive', () => {
+ expect(reportingPanelSource).toContain("import { Button } from '@/components/shared/Button';");
+ expect(reportingPanelSource).toContain('<Button');
+ expect(reportingPanelSource).toContain('variant="primary"');
+ expect(reportingPanelSource).toContain('variant="success"');
+ expect(reportingPanelSource).toContain('isLoading={generating()}');
+ expect(reportingPanelSource).toContain('isLoading={exportingInventory()}');
+ expect(reportingPanelSource).not.toContain(
+ 'flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto',
+ );
+ expect(reportingPanelSource).not.toContain('bg-blue-600 text-white hover:bg-blue-700');
+ expect(reportingPanelSource).not.toContain('bg-emerald-600 text-white hover:bg-emerald-700');
+
+ expect(infrastructureInstallerSectionSource).toContain(
+ "import { Button, CommandCopyButton } from '@/components/shared/Button';",
+ );
+ expect(infrastructureInstallerSectionSource).toContain('variant="success"');
+ expect(infrastructureInstallerSectionSource).toContain('variant="successOutline"');
+ expect(infrastructureInstallerSectionSource).toContain('variant="successGhost"');
+ expect(infrastructureInstallerSectionSource).not.toContain(
+ 'inline-flex items-center justify-center rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-emerald-700',
+ );
+ expect(infrastructureInstallerSectionSource).not.toContain(
+ 'inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 transition-colors hover:bg-emerald-100',
+ );
+ expect(infrastructureInstallerSectionSource).not.toContain(
+ 'inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100',
+ );
+ });
+
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/Button.test.tsx b/frontend-modern/src/components/shared/Button.test.tsx
index 324c3f6a5a..90a5872aee 100644
--- a/frontend-modern/src/components/shared/Button.test.tsx
+++ b/frontend-modern/src/components/shared/Button.test.tsx
@@ -23,6 +23,9 @@ describe('Button', () => {
"secondary: 'border border-border bg-surface text-base-content shadow-sm hover:bg-surface-hover'",
);
expect(buttonModelSource).toContain('primaryFlat:');
+ expect(buttonModelSource).toContain('success:');
+ expect(buttonModelSource).toContain('successOutline:');
+ expect(buttonModelSource).toContain('successGhost:');
expect(buttonModelSource).toContain(
"'border border-border bg-surface text-muted hover:bg-surface-hover hover:text-base-content'",
);
@@ -76,6 +79,15 @@ describe('Button', () => {
<Button variant="dangerOutline" size="settingsAction">
Remove source
</Button>
+ <Button variant="success" size="settingsAction">
+ Open infrastructure
+ </Button>
+ <Button variant="successOutline" size="settingsAction">
+ Open inventory
+ </Button>
+ <Button variant="successGhost" size="settingsAction">
+ Dismiss
+ </Button>
</>
));
@@ -88,6 +100,18 @@ describe('Button', () => {
expect(removeButton).toHaveClass('min-h-10');
expect(removeButton).toHaveClass('border-rose-300');
expect(removeButton).toHaveClass('text-rose-700');
+
+ const openInfrastructureButton = screen.getByRole('button', { name: 'Open infrastructure' });
+ expect(openInfrastructureButton).toHaveClass('bg-emerald-600');
+ expect(openInfrastructureButton).toHaveClass('text-white');
+
+ const openInventoryButton = screen.getByRole('button', { name: 'Open inventory' });
+ expect(openInventoryButton).toHaveClass('border-emerald-300');
+ expect(openInventoryButton).toHaveClass('text-emerald-900');
+
+ const dismissButton = screen.getByRole('button', { name: 'Dismiss' });
+ expect(dismissButton).toHaveClass('border-transparent');
+ expect(dismissButton).toHaveClass('text-emerald-900');
});
it('renders command-copy icon buttons through the shared primitive', () => {
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index 1e12c3106b..fc1460bc39 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -1563,6 +1563,18 @@ describe('shared primitive guardrails', () => {
const settingsPrimaryActionGuard = registry.patternGuards?.find(
(guard) => guard.id === 'button-primary-settings-action-local-shell',
);
+ const settingsSuccessActionGuard = registry.patternGuards?.find(
+ (guard) => guard.id === 'button-success-settings-action-local-shell',
+ );
+ const settingsSuccessOutlineActionGuard = registry.patternGuards?.find(
+ (guard) => guard.id === 'button-success-outline-settings-action-local-shell',
+ );
+ const settingsSuccessGhostActionGuard = registry.patternGuards?.find(
+ (guard) => guard.id === 'button-success-ghost-settings-action-local-shell',
+ );
+ const largeReportingActionGuard = registry.patternGuards?.find(
+ (guard) => guard.id === 'button-large-reporting-action-local-shell',
+ );
const settingsDangerActionGuard = registry.patternGuards?.find(
(guard) => guard.id === 'button-danger-settings-action-local-shell',
);
@@ -1611,6 +1623,7 @@ describe('shared primitive guardrails', () => {
'src/components/Settings/InfrastructureInstallerSection.tsx',
'src/components/Settings/InfrastructureSourceManager.tsx',
'src/components/Settings/InfrastructureWorkspace.tsx',
+ 'src/components/Settings/ReportingPanel.tsx',
'src/components/Settings/ResourcePicker.tsx',
'src/features/patrol/PatrolIntelligenceWorkspace.tsx',
'src/features/standalone/StandalonePageSurface.tsx',
@@ -1624,6 +1637,24 @@ describe('shared primitive guardrails', () => {
'w-full sm:w-auto min-h-10 sm:min-h-9 flex items-center justify-center gap-1.5 px-3 py-2.5 text-sm rounded-md border border-border',
]),
}),
+ expect.objectContaining({
+ path: 'src/components/Settings/ReportingPanel.tsx',
+ patterns: expect.arrayContaining([
+ 'rounded-md border border-base-300 bg-base-100 px-4 py-2 text-sm font-medium text-base-content',
+ 'flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto',
+ 'bg-blue-600 text-white hover:bg-blue-700',
+ 'bg-emerald-600 text-white hover:bg-emerald-700',
+ ]),
+ }),
+ expect.objectContaining({
+ path: 'src/components/Settings/InfrastructureInstallerSection.tsx',
+ patterns: expect.arrayContaining([
+ 'inline-flex items-center justify-center rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-emerald-700',
+ 'inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 transition-colors hover:bg-emerald-100',
+ 'inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100',
+ 'inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100',
+ ]),
+ }),
]),
);
expect(registeredGuard?.canonical?.path).toBe('src/components/shared/buttonModel.ts');
@@ -1688,6 +1719,68 @@ describe('shared primitive guardrails', () => {
expect(settingsPrimaryActionGuard?.ignoredPaths).toEqual([
'src/components/shared/Button.test.tsx',
]);
+ expect(settingsSuccessActionGuard?.canonical?.path).toBe(
+ 'src/components/shared/buttonModel.ts',
+ );
+ expect(settingsSuccessActionGuard?.canonical?.export).toBe('getButtonClass');
+ expect(settingsSuccessActionGuard?.allPatterns).toEqual([
+ 'rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white',
+ ]);
+ expect(settingsSuccessActionGuard?.scopes).toEqual([
+ 'src/components/Settings',
+ 'src/features',
+ 'src/pages',
+ ]);
+ expect(settingsSuccessActionGuard?.allowedPaths ?? []).toHaveLength(0);
+ expect(settingsSuccessActionGuard?.ignoredPaths).toEqual([
+ 'src/components/shared/Button.test.tsx',
+ ]);
+ expect(settingsSuccessOutlineActionGuard?.canonical?.path).toBe(
+ 'src/components/shared/buttonModel.ts',
+ );
+ expect(settingsSuccessOutlineActionGuard?.canonical?.export).toBe('getButtonClass');
+ expect(settingsSuccessOutlineActionGuard?.allPatterns).toEqual([
+ 'rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900',
+ ]);
+ expect(settingsSuccessOutlineActionGuard?.scopes).toEqual([
+ 'src/components/Settings',
+ 'src/features',
+ 'src/pages',
+ ]);
+ expect(settingsSuccessOutlineActionGuard?.allowedPaths ?? []).toHaveLength(0);
+ expect(settingsSuccessOutlineActionGuard?.ignoredPaths).toEqual([
+ 'src/components/shared/Button.test.tsx',
+ ]);
+ expect(settingsSuccessGhostActionGuard?.canonical?.path).toBe(
+ 'src/components/shared/buttonModel.ts',
+ );
+ expect(settingsSuccessGhostActionGuard?.canonical?.export).toBe('getButtonClass');
+ expect(settingsSuccessGhostActionGuard?.allPatterns).toEqual([
+ 'rounded-md px-3 py-2 text-sm font-medium text-emerald-900',
+ ]);
+ expect(settingsSuccessGhostActionGuard?.scopes).toEqual([
+ 'src/components/Settings',
+ 'src/features',
+ 'src/pages',
+ ]);
+ expect(settingsSuccessGhostActionGuard?.allowedPaths ?? []).toHaveLength(0);
+ expect(settingsSuccessGhostActionGuard?.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([
+ 'flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto',
+ ]);
+ expect(largeReportingActionGuard?.scopes).toEqual([
+ 'src/components/Settings',
+ 'src/features',
+ 'src/pages',
+ ]);
+ expect(largeReportingActionGuard?.allowedPaths ?? []).toHaveLength(0);
+ expect(largeReportingActionGuard?.ignoredPaths).toEqual([
+ 'src/components/shared/Button.test.tsx',
+ ]);
expect(settingsDangerActionGuard?.canonical?.path).toBe('src/components/shared/buttonModel.ts');
expect(settingsDangerActionGuard?.canonical?.export).toBe('getButtonClass');
expect(settingsDangerActionGuard?.allPatterns).toEqual([
@@ -1790,6 +1883,9 @@ describe('shared primitive guardrails', () => {
expect(buttonModelSource).toContain('BUTTON_VARIANT_CLASSES');
expect(buttonModelSource).toContain('BUTTON_SIZE_CLASSES');
expect(buttonModelSource).toContain('primaryFlat:');
+ expect(buttonModelSource).toContain('success:');
+ expect(buttonModelSource).toContain('successOutline:');
+ expect(buttonModelSource).toContain('successGhost:');
expect(buttonModelSource).toContain('COPY_VALUE_BUTTON_VARIANT_CLASSES');
expect(buttonModelSource).toContain('COPY_VALUE_BUTTON_SIZE_CLASSES');
expect(buttonModelSource).toContain('dangerOutline:');
@@ -1861,9 +1957,24 @@ describe('shared primitive guardrails', () => {
);
expect(infrastructureInstallerSectionSource).toContain('@/components/shared/Button');
expect(infrastructureInstallerSectionSource).toContain('CommandCopyButton');
+ expect(infrastructureInstallerSectionSource).toContain('variant="success"');
+ expect(infrastructureInstallerSectionSource).toContain('variant="successOutline"');
+ expect(infrastructureInstallerSectionSource).toContain('variant="successGhost"');
expect(infrastructureInstallerSectionSource).not.toContain(
'rounded-md border border-border bg-surface px-3 py-2 text-sm font-medium text-base-content',
);
+ expect(infrastructureInstallerSectionSource).not.toContain(
+ 'inline-flex items-center justify-center rounded-md bg-emerald-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-emerald-700',
+ );
+ expect(infrastructureInstallerSectionSource).not.toContain(
+ 'inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 transition-colors hover:bg-emerald-100',
+ );
+ expect(infrastructureInstallerSectionSource).not.toContain(
+ 'inline-flex items-center justify-center rounded-md border border-emerald-300 bg-white px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100',
+ );
+ expect(infrastructureInstallerSectionSource).not.toContain(
+ 'inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium text-emerald-900 hover:bg-emerald-100',
+ );
expect(infrastructureInstallerSectionSource).not.toContain('absolute right-2 top-2');
expect(infrastructureInstallerSectionSource).not.toContain('bg-surface-hover p-2');
expect(infrastructureAgentUpdatesDialogSource).toContain('@/components/shared/Button');
@@ -1907,6 +2018,17 @@ describe('shared primitive guardrails', () => {
expect(resourcePickerSource).not.toContain(
'w-full sm:w-auto min-h-10 sm:min-h-9 flex items-center justify-center gap-1.5 px-3 py-2.5 text-sm rounded-md border border-border',
);
+ expect(reportingPanelSource).toContain('@/components/shared/Button');
+ expect(reportingPanelSource).toContain('<Button');
+ expect(reportingPanelSource).toContain('variant="success"');
+ expect(reportingPanelSource).not.toContain(
+ 'rounded-md border border-base-300 bg-base-100 px-4 py-2 text-sm font-medium text-base-content',
+ );
+ expect(reportingPanelSource).not.toContain(
+ 'flex w-full items-center justify-center gap-2 rounded-md px-6 py-3 font-semibold transition-all sm:w-auto',
+ );
+ expect(reportingPanelSource).not.toContain('bg-blue-600 text-white hover:bg-blue-700');
+ expect(reportingPanelSource).not.toContain('bg-emerald-600 text-white hover:bg-emerald-700');
expect(discoveryTabSource).toContain('@/components/shared/Button');
expect(discoveryTabSource).toContain('@/components/shared/CopyableCodeRow');
expect(discoveryTabSource).toContain('CopyValueButton');
diff --git a/frontend-modern/src/components/shared/buttonModel.ts b/frontend-modern/src/components/shared/buttonModel.ts
index 0b9ecef8ff..c962e4fc39 100644
--- a/frontend-modern/src/components/shared/buttonModel.ts
+++ b/frontend-modern/src/components/shared/buttonModel.ts
@@ -1,6 +1,9 @@
export type ButtonVariant =
| 'primary'
| 'primaryFlat'
+ | 'success'
+ | 'successOutline'
+ | 'successGhost'
| 'secondary'
| 'danger'
| 'dangerOutline'
@@ -22,6 +25,11 @@ export const BUTTON_BASE_CLASS =
export const BUTTON_VARIANT_CLASSES: Record<ButtonVariant, string> = {
primary: 'border border-transparent bg-blue-600 text-white shadow-sm hover:bg-blue-700',
primaryFlat: 'border border-transparent bg-blue-600 text-white hover:bg-blue-700',
+ success: 'border border-transparent bg-emerald-600 text-white shadow-sm hover:bg-emerald-700',
+ successOutline:
+ 'border border-emerald-300 bg-white text-emerald-900 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-100 dark:hover:bg-emerald-800',
+ successGhost:
+ 'border border-transparent bg-transparent text-emerald-900 hover:bg-emerald-100 dark:text-emerald-100 dark:hover:bg-emerald-800',
secondary: 'border border-border bg-surface text-base-content shadow-sm hover:bg-surface-hover',
danger: 'border border-transparent bg-rose-600 text-white shadow-sm hover:bg-rose-700',
dangerOutline: