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.

Localize pricing handoff and restore frontend lint

rcourtmana05c273b6ad6
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 508bd3019d..68eafea28d 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -1421,6 +1421,9 @@ Agent` secondary handoff against the live setup wizard instead of relying
path must also auto-create the scoped first-host install token so the
operator lands on ready-to-copy commands instead of being asked to perform a
second manual token-generation step immediately after securing the server.
+ The install-state hook may skip UI state updates after the component is
+ disposed, but cleanup must not return from `finally` or mask lifecycle token
+ creation failures.
Any first-run credentials download generated from that same handoff must
describe the prepared first-host token path consistently instead of telling
the operator to generate another install token manually.
@@ -2402,6 +2405,10 @@ That same landing/table contract now also owns collection-method phrasing.
`InfrastructureSourceManager.tsx` must present the same plain-language subtitle (`via platform API`, `via Pulse Agent`, or `via
platform API and Pulse Agent`) from the shared ledger contract instead of
shipping badge-only heuristics that operators have to decode visually.
+Source badge class selection may use semantic gray treatment for API-only rows
+and typed non-gray tones for agent, probe, or combined sources, but the source
+identity remains the API/Agent/Probe label and subtitle from the shared ledger
+contract rather than a color-only cue.
That same lifecycle-owned platform onboarding boundary must keep API-backed
provider state operationally useful, not CRUD-only.
`useTrueNASSettingsPanelState.ts` and `useVMwareSettingsPanelState.ts` must
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index d66287f06e..b8fcf36396 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -1547,6 +1547,10 @@ a new API state machine, queue contract, or verification-accounting field.
Machines membership requires Pulse Agent resource evidence. API clients
must not infer that classification from protocol, hostname, port, or row
label.
+ The settings-side availability model may choose semantic and state-colored
+ chip classes for the visible target status, but route/query parameters,
+ `targetKind`, and the status payload remain API-owned contract facts rather
+ than CSS-derived state.
3. Add dedicated contract tests for new stable payloads
Unified resource type-filter and organization-share resource type additions
must route through `internal/api/resources.go`, `internal/api/org_handlers.go`,
@@ -2101,6 +2105,9 @@ a new API state machine, queue contract, or verification-accounting field.
11. Add or change API token scope, assignment, and revocation presentation through `frontend-modern/src/components/Settings/APITokenManager.tsx`, `frontend-modern/src/components/Settings/apiTokenManagerModel.ts`, and `frontend-modern/src/components/Settings/useAPITokenManagerState.ts`
That same shared token contract also owns audit scope separation: audit event, verification, summary, export, and unified action/export audit reads must require the dedicated `audit:read` scope instead of reusing broader monitoring or settings-read token grants.
12. Add or change infrastructure operations token generation, lookup, assignment, the pure unified-agent inventory/install model, the split infrastructure install state owner, the split direct-node/discovery infrastructure settings owners, the shared infrastructure-operations state provider/context shell, and install presentation through `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`, `frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts`, `frontend-modern/src/components/Settings/useInfrastructureDiscoveryRuntimeState.ts`, `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`, and `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`. Phase 9 retired the InfrastructureOperationsController shell and the useInfrastructureReportingState reporting path; they must not be reintroduced, and aggregator-backed reporting reads are owned by `frontend-modern/src/components/Settings/useConnectionsLedger.ts` under the frontend-primitives contract.
+ Setup-handoff auto-token cleanup in the shared install state hook may guard
+ state updates after disposal, but it must not return from `finally` or mask
+ token-generation and lookup failures owned by the API contract.
That same aggregator-backed reporting read may hide passive config or
rollout handshakes from primary source-manager attention when the API
reason says only that an agent has not yet reported a comparable applied
@@ -6159,6 +6166,10 @@ status branches in discovery and monitoring clients.
Agent and guest metadata CRUD clients must now also route through one shared
metadata client in `frontend-modern/src/api/metadataClient.ts` rather than
duplicating the same `get/update/delete/list` transport logic in two files.
+The thin agent, docker, and guest metadata TypeScript models remain aliases
+over `ResourceMetadataRecord`; they must not grow empty local interface shells
+or imply a resource-specific wire shape until the backend payload actually
+adds one.
AI investigation and chat stream clients must now also route through one shared
SSE JSON event consumer in `frontend-modern/src/api/streaming.ts` rather than
duplicating reader lifecycle, timeout, chunk parsing, and event decoding logic
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index 412a1b1f03..c3a00c14a7 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -1309,6 +1309,11 @@ and public-pricing fallback truth. The route must not fork a raw top-level
heading, duplicate destination logic in the page shell, or let commercial
handoff framing drift away from the same shared browser chrome used by the
rest of the product.
+The visible redirect title and manual-link copy on that page may use the
+shared frontend i18n catalog for first-wave locale coverage, but the
+destination selection, self-hosted `GET /auth/license-purchase-start` handoff,
+public pricing URL fallback, feature query keys, and purchase-return states
+remain cloud-paid-owned and machine-stable.
The governed browser proof for that posture lives in
`tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts` and is
expected to stay runnable through
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index a716b1b861..4abfe020d0 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -11,6 +11,7 @@
"registry_file": "docs/release-control/v6/internal/subsystems/registry.json",
"dependency_subsystem_ids": [
"agent-lifecycle",
+ "api-contracts",
"cloud-paid",
"storage-recovery"
]
@@ -202,8 +203,8 @@ first-wave non-translatable token rules. The active app locale is a shared user
preference initialized from stored or browser language and exposed through
Settings > General; individual surfaces must consume that shared preference
instead of creating local language toggles. Customer-facing shell, navigation,
-settings, first-run, empty-state, and alert copy may be localized through this
-catalog — including the alert-to-Patrol action surface ("Have Patrol
+settings, first-run, empty-state, commercial handoff, and alert copy may be
+localized through this catalog — including the alert-to-Patrol action surface ("Have Patrol
investigate" and its targeted-check menu hint) that is primary on
resource-backed active alert cards, plus the secondary Assistant explanation
handoff strings — but
@@ -236,6 +237,10 @@ alert-owned presentation helpers. Alert IDs, alert types, resource IDs,
resource names, node names, source messages, event payloads, commands, command
output, logs, and Assistant model-context labels stay machine-stable and
untranslated.
+The legacy pricing handoff page may also route its visible redirect title and
+manual-link copy through the catalog, but `Pulse Account`, route paths, feature
+keys, query parameters, public URLs, and purchase-return state remain
+machine-stable and untranslated.
Alert thresholds consume the shared FilterBar primitive and route state, while
the alerts subsystem owns the resource data and platform-specific threshold
@@ -2970,6 +2975,10 @@ behavior, and whitespace handling. Product surfaces such as Patrol findings
may own the labels and state-to-tone mapping in their presentation helpers, but
they must render visible metadata chips through `MetadataBadge` instead of
recreating local bordered xs spans.
+Neutral and muted badge treatments must use semantic surface/text tokens rather
+than hardcoded gray palettes; non-gray typed tones may retain their state color
+vocabulary so success, warning, danger, info, and platform-adjacent metadata do
+not collapse into visually identical chips.
Patrol run-history labels follow this state-badge boundary:
Patrol may derive the status label and typed variant in
`patrolRunPresentation.ts` or `patrolSummaryPresentation.ts`, but
@@ -3040,6 +3049,9 @@ That tooltip owner now also holds the CSP-safe hover contract: chart tooltips
must render inside the chart surface with model-owned layout and SVG/attribute
positioning, not through fixed portals or inline `left`/`top` style attributes
that violate the public demo CSP.
+Tooltip shell chrome must follow semantic surface, text, and border tokens
+rather than hardcoded dark palette utilities so light and dark themes share one
+primitive-owned contrast contract.
The shared container update badge now follows that same owner split.
`frontend-modern/src/components/shared/ContainerUpdateBadge.tsx` stays the
render surface for the badge, icon, and update button shells,
diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json
index 9e470682a8..2a5e79bdee 100644
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@ -1990,6 +1990,7 @@
"frontend-modern/src/components/Settings/AgentIntegrationsPanel.tsx",
"frontend-modern/src/components/Settings/APITokenManager.tsx",
"frontend-modern/src/components/Settings/apiTokenManagerModel.ts",
+ "frontend-modern/src/components/Settings/availabilitySettingsModel.ts",
"frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/AvailabilityTargetSlot.tsx",
"frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx",
"frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx",
@@ -2390,6 +2391,7 @@
"test_prefixes": [],
"exact_files": [
"frontend-modern/src/api/__tests__/availabilityTargets.test.ts",
+ "frontend-modern/src/components/Settings/__tests__/availabilitySettingsModel.test.ts",
"frontend-modern/src/components/Settings/__tests__/AvailabilitySettingsPanel.test.tsx",
"frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts",
"frontend-modern/src/components/Settings/ConnectionEditor/__tests__/AvailabilityTargetSlot.test.tsx",
@@ -3775,9 +3777,11 @@
"frontend-modern/src/features/platformPage/PlatformResourceDetailTableRow.tsx",
"frontend-modern/src/features/platformPage/sharedPlatformPage.tsx",
"frontend-modern/src/hooks/createNonSuspendingQuery.ts",
+ "frontend-modern/src/i18n/index.ts",
"frontend-modern/src/i18n/messages.de.ts",
"frontend-modern/src/i18n/messages.es.ts",
"frontend-modern/src/i18n/messages.ts",
+ "frontend-modern/src/i18n/policy.ts",
"frontend-modern/src/index.css",
"frontend-modern/src/routing/routePreload.ts",
"frontend-modern/src/stores/aiChat.ts",
@@ -3951,9 +3955,11 @@
"label": "localized settings message catalog proof",
"match_prefixes": [],
"match_files": [
+ "frontend-modern/src/i18n/index.ts",
"frontend-modern/src/i18n/messages.de.ts",
"frontend-modern/src/i18n/messages.es.ts",
- "frontend-modern/src/i18n/messages.ts"
+ "frontend-modern/src/i18n/messages.ts",
+ "frontend-modern/src/i18n/policy.ts"
],
"allow_same_subsystem_tests": false,
"test_prefixes": [],
diff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.md
index fc903cbb18..5ff010c30f 100644
--- a/docs/release-control/v6/internal/subsystems/security-privacy.md
+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md
@@ -258,6 +258,10 @@ existing resource-policy redaction still governs any model-bound context.
boundary when it frames Pro setup as choosing Patrol autonomy; it must not
alter API Access, authentication, privacy, or token-management terminology in
the same edit.
+ Commercial pricing handoff localization may share the same catalog boundary
+ only for redirect/manual-link copy and must preserve `Pulse Account`,
+ security/privacy disclosures, token names, API field names, route/query keys,
+ and purchase-return state exactly.
6. Change operator-facing telemetry/adoption reporting through `scripts/telemetry_adoption_report.py` together with the privacy disclosure whenever release-identity interpretation changes.
7. Change data-at-rest encryption-key or control-plane magic-link HMAC key and storage-root hardening semantics through `internal/crypto/crypto.go`, `internal/cloudcp/auth/magiclink.go`, `internal/cloudcp/auth/magiclink_store.go`, and `internal/securityutil/secure_storage_dir.go` together so writable-but-not-owned runtime storage mounts stay supported without weakening file-level secrecy.
8. Change auth-env password normalization, hosted commercial base URL
diff --git a/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts b/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts
index 42efc30e1a..740a8380a1 100644
--- a/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts
+++ b/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts
@@ -5,6 +5,7 @@ import agentProfilesSource from '@/api/agentProfiles.ts?raw';
import alertsSource from '@/api/alerts.ts?raw';
import discoverySource from '@/api/discovery.ts?raw';
import agentMetadataSource from '@/api/agentMetadata.ts?raw';
+import dockerMetadataSource from '@/api/dockerMetadata.ts?raw';
import monitoringSource from '@/api/monitoring.ts?raw';
import notificationsSource from '@/api/notifications.ts?raw';
import nodesSource from '@/api/nodes.ts?raw';
@@ -31,7 +32,9 @@ describe('API error-status guardrails', () => {
expect(responseUtilsSource).toContain('export function apiResponseStatus');
expect(responseUtilsSource).toContain('export function isAPIResponseStatus');
expect(responseUtilsSource).toContain('export async function assertAPIResponseOK');
- expect(responseUtilsSource).toContain('export async function assertAPIResponseOKOrAllowedStatus');
+ expect(responseUtilsSource).toContain(
+ 'export async function assertAPIResponseOKOrAllowedStatus',
+ );
expect(responseUtilsSource).toContain('export async function assertAPIResponseOKOrThrowStatus');
expect(responseUtilsSource).toContain('export async function parseRequiredAPIResponse');
expect(responseUtilsSource).toContain('export async function parseOptionalAPIResponse');
@@ -142,18 +145,13 @@ describe('API error-status guardrails', () => {
monitoringSource.match(/assertAPIResponseOKOrThrowStatus\(\s*response,\s*404,/g) ?? [],
).toHaveLength(1);
expect(
- monitoringSource.match(/const response = await apiFetch\(url,\s*\{\s*method: 'POST',\s*\}\);/g) ??
- [],
- ).toHaveLength(1);
- expect(
- monitoringSource.match(/return triggerResourceCommand</g) ?? [],
- ).toHaveLength(3);
- expect(
- monitoringSource.match(/await runResourceAction\(url\);/g) ?? [],
- ).toHaveLength(3);
- expect(
- monitoringSource.match(/parseOptionalSuccessAPIResponse</g) ?? [],
+ monitoringSource.match(
+ /const response = await apiFetch\(url,\s*\{\s*method: 'POST',\s*\}\);/g,
+ ) ?? [],
).toHaveLength(1);
+ expect(monitoringSource.match(/return triggerResourceCommand</g) ?? []).toHaveLength(3);
+ expect(monitoringSource.match(/await runResourceAction\(url\);/g) ?? []).toHaveLength(3);
+ expect(monitoringSource.match(/parseOptionalSuccessAPIResponse</g) ?? []).toHaveLength(1);
expect(discoverySource).toContain('assertAPIResponseOK(response,');
expect(discoverySource).toContain('parseRequiredAPIResponse(');
expect(discoverySource).toContain('parseRequiredAPIResponseOrNull(');
@@ -173,11 +171,33 @@ describe('API error-status guardrails', () => {
expect(discoverySource).not.toContain('isAPIResponseStatus(response, 404)');
expect(discoverySource).not.toContain('readAPIErrorMessage(');
- expect(agentMetadataSource).toContain("buildMetadataAPI<AgentMetadata>('/api/agents/metadata')");
+ expect(agentMetadataSource).toContain(
+ "buildMetadataAPI<AgentMetadata>('/api/agents/metadata')",
+ );
expect(agentMetadataSource).not.toContain('apiFetchJSON(');
- expect(guestMetadataSource).toContain("buildMetadataAPI<GuestMetadata>('/api/guests/metadata')");
+ expect(dockerMetadataSource).toContain(
+ "buildMetadataAPI<DockerMetadata>('/api/docker/metadata')",
+ );
+ expect(dockerMetadataSource).not.toContain('apiFetchJSON(');
+ expect(guestMetadataSource).toContain(
+ "buildMetadataAPI<GuestMetadata>('/api/guests/metadata')",
+ );
expect(guestMetadataSource).not.toContain('apiFetchJSON(');
+ });
+ it('keeps thin metadata models as shared record aliases', () => {
+ expect(agentMetadataSource).toContain('export type AgentMetadata = ResourceMetadataRecord;');
+ expect(agentMetadataSource).not.toContain(
+ 'export interface AgentMetadata extends ResourceMetadataRecord',
+ );
+ expect(dockerMetadataSource).toContain('export type DockerMetadata = ResourceMetadataRecord;');
+ expect(dockerMetadataSource).not.toContain(
+ 'export interface DockerMetadata extends ResourceMetadataRecord',
+ );
+ expect(guestMetadataSource).toContain('export type GuestMetadata = ResourceMetadataRecord;');
+ expect(guestMetadataSource).not.toContain(
+ 'export interface GuestMetadata extends ResourceMetadataRecord',
+ );
});
it('routes canonical collection normalization through responseUtils', () => {
@@ -313,10 +333,10 @@ describe('API error-status guardrails', () => {
const rawNullLookupPattern =
/if\s*\(\s*isAPIResponseStatus\(response,\s*404\)\s*\)\s*\{\s*return null;\s*\}/;
const governedMetadataEntries = runtimeEntries.filter(([path]) =>
- /\/(?:agentMetadata|guestMetadata)\.ts$/.test(path),
+ /\/(?:agentMetadata|dockerMetadata|guestMetadata)\.ts$/.test(path),
);
const rawMetadataCrudPattern =
- /(?:apiFetchJSON\(|private static baseUrl = '\/api\/(?:agents|guests)\/metadata')/;
+ /(?:apiFetchJSON\(|private static baseUrl = '\/api\/(?:agents|docker|guests)\/metadata')/;
const governedStreamEntries = runtimeEntries.filter(([path]) =>
/\/(?:ai|aiChat)\.ts$/.test(path),
);
@@ -347,8 +367,7 @@ describe('API error-status guardrails', () => {
const governedFetchJSONFallbackEntries = runtimeEntries.filter(([path]) =>
/\/(?:ai|agentProfiles)\.ts$/.test(path),
);
- const rawFetchJSONStatusFallbackPattern =
- /isAPIErrorStatus\((?:error|err),\s*(?:402|404)\)/;
+ const rawFetchJSONStatusFallbackPattern = /isAPIErrorStatus\((?:error|err),\s*(?:402|404)\)/;
const heuristicOffenders = runtimeEntries
.filter(([, source]) => rawStatusHeuristicPattern.test(source))
diff --git a/frontend-modern/src/api/agentMetadata.ts b/frontend-modern/src/api/agentMetadata.ts
index 37cf90e89e..cfb6e014a9 100644
--- a/frontend-modern/src/api/agentMetadata.ts
+++ b/frontend-modern/src/api/agentMetadata.ts
@@ -1,6 +1,6 @@
import { buildMetadataAPI, type ResourceMetadataRecord } from './metadataClient';
-export interface AgentMetadata extends ResourceMetadataRecord {}
+export type AgentMetadata = ResourceMetadataRecord;
const agentMetadataAPI = buildMetadataAPI<AgentMetadata>('/api/agents/metadata');
diff --git a/frontend-modern/src/api/dockerMetadata.ts b/frontend-modern/src/api/dockerMetadata.ts
index 9acf46ee48..ae4176d4a9 100644
--- a/frontend-modern/src/api/dockerMetadata.ts
+++ b/frontend-modern/src/api/dockerMetadata.ts
@@ -1,6 +1,6 @@
import { buildMetadataAPI, type ResourceMetadataRecord } from './metadataClient';
-export interface DockerMetadata extends ResourceMetadataRecord {}
+export type DockerMetadata = ResourceMetadataRecord;
const dockerMetadataAPI = buildMetadataAPI<DockerMetadata>('/api/docker/metadata');
diff --git a/frontend-modern/src/api/guestMetadata.ts b/frontend-modern/src/api/guestMetadata.ts
index 7402c96f83..071fdfb716 100644
--- a/frontend-modern/src/api/guestMetadata.ts
+++ b/frontend-modern/src/api/guestMetadata.ts
@@ -1,7 +1,7 @@
// Guest Metadata API
import { buildMetadataAPI, type ResourceMetadataRecord } from './metadataClient';
-export interface GuestMetadata extends ResourceMetadataRecord {}
+export type GuestMetadata = ResourceMetadataRecord;
const guestMetadataAPI = buildMetadataAPI<GuestMetadata>('/api/guests/metadata');
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx
index 9e7d250bf1..9fa7d8a5a5 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx
@@ -315,6 +315,24 @@ describe('infrastructure operations model', () => {
expect(installStateSource).toContain('setupHandoffInstallStepActive() &&');
});
+ it('keeps setup-handoff token cleanup from masking API failures', () => {
+ expect(useInfrastructureInstallStateSource).toContain(
+ [
+ '} finally {',
+ ' if (!disposed) {',
+ ' setIsGeneratingToken(false);',
+ " if (source === 'setup_handoff') {",
+ ' setSetupHandoffAutoTokenPending(false);',
+ ' }',
+ ' }',
+ ' }',
+ ].join('\n'),
+ );
+ expect(useInfrastructureInstallStateSource).not.toMatch(
+ /finally \{[\s\S]*?if \(disposed\) \{[\s\S]*?return;/,
+ );
+ });
+
it('keeps infrastructure install and operations surfaces free of retired commercial telemetry wrappers', () => {
for (const source of [
infrastructureOperationsModelSource,
diff --git a/frontend-modern/src/components/Settings/__tests__/availabilitySettingsModel.test.ts b/frontend-modern/src/components/Settings/__tests__/availabilitySettingsModel.test.ts
index 08a24c72df..c3fdf7605f 100644
--- a/frontend-modern/src/components/Settings/__tests__/availabilitySettingsModel.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/availabilitySettingsModel.test.ts
@@ -6,6 +6,7 @@ import {
getAvailabilityTargetAddressLabel,
getAvailabilityTargetKindLabel,
getAvailabilityTargetMethodLabel,
+ getAvailabilityTargetStatusClass,
getAvailabilityTargetStatusLabel,
getAvailabilityTargetsSummary,
normalizeAvailabilityTargetKind,
@@ -104,5 +105,23 @@ describe('availabilitySettingsModel', () => {
}),
]),
).toBe('1 down · 2 enabled');
+ expect(getAvailabilityTargetStatusClass(target({ enabled: false }))).toBe(
+ 'bg-surface-alt text-muted',
+ );
+ expect(getAvailabilityTargetStatusClass(target())).toBe(
+ 'bg-sky-100 text-sky-700 dark:bg-sky-900 dark:text-sky-300',
+ );
+ expect(
+ getAvailabilityTargetStatusClass(
+ target({
+ status: { ...target(), targetId: 'mqtt-broker', available: true, latencyMillis: 12 },
+ }),
+ ),
+ ).toBe('bg-emerald-100 text-emerald-700 dark:bg-emerald-900 dark:text-emerald-300');
+ expect(
+ getAvailabilityTargetStatusClass(
+ target({ status: { ...target(), targetId: 'mqtt-broker', available: false } }),
+ ),
+ ).toBe('bg-rose-100 text-rose-700 dark:bg-rose-900 dark:text-rose-300');
});
});
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 6bbd52ccae..869062d4a6 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -42,6 +42,7 @@ import agentProfilesPanelSource from '../AgentProfilesPanel.tsx?raw';
import infrastructureWorkspaceSource from '../InfrastructureWorkspace.tsx?raw';
import infrastructureInstallerSectionSource from '../InfrastructureInstallerSection.tsx?raw';
import infrastructureOperationsModelSource from '../infrastructureOperationsModel.tsx?raw';
+import connectionsTableModelSource from '../connectionsTableModel.ts?raw';
import infrastructureSourceManagerSource from '../InfrastructureSourceManager.tsx?raw';
import infrastructureSourcePickerSource from '../InfrastructureSourcePicker.tsx?raw';
import discoverySettingsFormSource from '../DiscoverySettingsForm.tsx?raw';
@@ -84,6 +85,7 @@ import rbacFeatureGateStateSource from '../useRBACFeatureGateState.ts?raw';
import reportingStateSource from '../useReportingPanelState.ts?raw';
import ssoProvidersPanelSource from '../SSOProvidersPanel.tsx?raw';
import ssoProvidersStateSource from '../useSSOProvidersState.ts?raw';
+import useInfrastructureInstallStateSource from '../useInfrastructureInstallState.tsx?raw';
import infrastructureOnboardingPresentationSource from '../../../utils/infrastructureOnboardingPresentation.ts?raw';
import selfHostedBillingPresentationSource from '../selfHostedBillingPresentation.ts?raw';
import systemSettingsPresentationSource from '../../../utils/systemSettingsPresentation.ts?raw';
@@ -663,7 +665,7 @@ describe('settings architecture guardrails', () => {
});
it('keeps Assistant and Patrol provider-specific fields model-driven', () => {
- expect(aiSettingsModelSource).toContain("export const AI_PROVIDERS: AIProvider[] = [");
+ expect(aiSettingsModelSource).toContain('export const AI_PROVIDERS: AIProvider[] = [');
for (const provider of ['zai', 'groq', 'mistral', 'cerebras', 'together', 'fireworks']) {
expect(aiSettingsModelSource).toContain(`provider: '${provider}'`);
expect(aiSettingsStateSource).toContain(`${provider}_api_key`);
@@ -1170,6 +1172,33 @@ describe('settings architecture guardrails', () => {
expect(useConnectionsLedgerSource).toContain('createNonSuspendingQuery');
expect(useConnectionsLedgerSource).toContain('pollMs: POLL_INTERVAL_MS');
expect(useConnectionsLedgerSource).not.toContain('createResource');
+
+ expect(connectionsTableModelSource).toContain(
+ "'inline-flex items-center rounded-full bg-surface-alt px-2 py-0.5 text-[11px] font-medium text-base-content'",
+ );
+ expect(connectionsTableModelSource).toContain(
+ "'inline-flex items-center rounded-full bg-emerald-100 px-2 py-0.5 text-[11px] font-medium text-emerald-800 dark:bg-emerald-950/40 dark:text-emerald-200'",
+ );
+ expect(connectionsTableModelSource).not.toContain(['bg', 'slate', '100'].join('-'));
+ expect(connectionsTableModelSource).not.toContain(['text', 'slate', '700'].join('-'));
+ });
+
+ it('keeps setup-handoff token cleanup from masking install failures', () => {
+ expect(useInfrastructureInstallStateSource).toContain(
+ [
+ '} finally {',
+ ' if (!disposed) {',
+ ' setIsGeneratingToken(false);',
+ " if (source === 'setup_handoff') {",
+ ' setSetupHandoffAutoTokenPending(false);',
+ ' }',
+ ' }',
+ ' }',
+ ].join('\n'),
+ );
+ expect(useInfrastructureInstallStateSource).not.toMatch(
+ /finally \{[\s\S]*?if \(disposed\) \{[\s\S]*?return;/,
+ );
});
it('keeps the detect-first editor and inline credential bodies on the shared editor model', () => {
@@ -1283,7 +1312,9 @@ describe('settings architecture guardrails', () => {
expect(agentIntegrationsPanelSource).toContain('read Pulse context');
expect(agentIntegrationsPanelSource).toContain('request Patrol work');
expect(agentIntegrationsPanelSource).toContain('Patrol mode and scoped tokens control');
- expect(agentIntegrationsPanelSource).not.toContain('Optional connector access for Claude Desktop');
+ expect(agentIntegrationsPanelSource).not.toContain(
+ 'Optional connector access for Claude Desktop',
+ );
expect(agentIntegrationsPanelSource).not.toContain('Patrol remains the operator');
expect(agentIntegrationsPanelSource).not.toContain('Connected tools');
expect(agentIntegrationsPanelSource).toContain('setupOpen');
@@ -1368,7 +1399,9 @@ describe('settings architecture guardrails', () => {
expect(agentIntegrationsPanelSource).toContain('Install the connector');
expect(agentIntegrationsPanelSource).toContain('paste the client config');
expect(agentIntegrationsPanelSource).not.toContain('The installer and');
- expect(agentIntegrationsPanelSource).not.toContain('on the machine that runs the external tool');
+ expect(agentIntegrationsPanelSource).not.toContain(
+ 'on the machine that runs the external tool',
+ );
expect(agentIntegrationsPanelSource).not.toContain('Install the Pulse MCP bridge');
expect(agentIntegrationsPanelSource).not.toContain(
'Use the OpenCode or Claude-style snippet below',
diff --git a/frontend-modern/src/components/Settings/availabilitySettingsModel.ts b/frontend-modern/src/components/Settings/availabilitySettingsModel.ts
index cee6a9997d..c22d20f0a8 100644
--- a/frontend-modern/src/components/Settings/availabilitySettingsModel.ts
+++ b/frontend-modern/src/components/Settings/availabilitySettingsModel.ts
@@ -109,7 +109,7 @@ export function getAvailabilityTargetStatusLabel(target: AvailabilityTarget): st
}
export function getAvailabilityTargetStatusClass(target: AvailabilityTarget): string {
- if (!target.enabled) return 'bg-slate-100 text-slate-700 dark:bg-slate-900 dark:text-slate-300';
+ if (!target.enabled) return 'bg-surface-alt text-muted';
if (!target.status) return 'bg-sky-100 text-sky-700 dark:bg-sky-900 dark:text-sky-300';
if (target.status.available) {
return 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900 dark:text-emerald-300';
diff --git a/frontend-modern/src/components/Settings/connectionsTableModel.ts b/frontend-modern/src/components/Settings/connectionsTableModel.ts
index f9caa89320..671c9728ab 100644
--- a/frontend-modern/src/components/Settings/connectionsTableModel.ts
+++ b/frontend-modern/src/components/Settings/connectionsTableModel.ts
@@ -202,7 +202,7 @@ const SOURCE_PRESENTATION: Record<InfrastructureSourceKind, InfrastructureSource
api: {
label: 'API',
badgeClassName:
- 'inline-flex items-center rounded-full bg-slate-100 px-2 py-0.5 text-[11px] font-medium text-slate-700 dark:bg-slate-800/60 dark:text-slate-200',
+ 'inline-flex items-center rounded-full bg-surface-alt px-2 py-0.5 text-[11px] font-medium text-base-content',
title: 'Data collected via the platform API',
},
agent: {
diff --git a/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx b/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx
index cb6f6f6ef5..c644071c1a 100644
--- a/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx
+++ b/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx
@@ -79,9 +79,7 @@ const toLookupResponseFromInfrastructureItem = (
},
});
-export const useInfrastructureInstallState = (
- options: InfrastructureInstallStateOptions = {},
-) => {
+export const useInfrastructureInstallState = (options: InfrastructureInstallStateOptions = {}) => {
const location = useLocation();
const navigate = useNavigate();
@@ -298,12 +296,11 @@ Pulse prepares the first-host install token from setup so you can move straight
);
}
} finally {
- if (disposed) {
- return;
- }
- setIsGeneratingToken(false);
- if (source === 'setup_handoff') {
- setSetupHandoffAutoTokenPending(false);
+ if (!disposed) {
+ setIsGeneratingToken(false);
+ if (source === 'setup_handoff') {
+ setSetupHandoffAutoTokenPending(false);
+ }
}
}
};
@@ -361,7 +358,9 @@ Pulse prepares the first-host install token from setup so you can move straight
return;
}
- const activeItems = (state.connectedInfrastructure || []).filter(isActiveInfrastructureItem);
+ const activeItems = (state.connectedInfrastructure || []).filter(
+ isActiveInfrastructureItem,
+ );
if (baselineActiveCount === null) {
baselineActiveCount = activeItems.length;
}
diff --git a/frontend-modern/src/components/shared/HistoryChartTooltip.tsx b/frontend-modern/src/components/shared/HistoryChartTooltip.tsx
index 8f98275b04..a20bf653d2 100644
--- a/frontend-modern/src/components/shared/HistoryChartTooltip.tsx
+++ b/frontend-modern/src/components/shared/HistoryChartTooltip.tsx
@@ -39,12 +39,12 @@ export const HistoryChartTooltip: Component<HistoryChartTooltipProps> = (props)
>
<div
data-history-chart-tooltip="true"
- class="h-full w-full rounded border border-slate-600 bg-slate-900 px-2 py-1 text-xs text-slate-50 shadow-lg"
+ class="h-full w-full rounded border border-border bg-surface px-2 py-1 text-xs text-base-content shadow-lg"
>
<div class="mb-0.5 text-center font-medium">
{new Date(point().timestamp).toLocaleString()}
</div>
- <div class="text-slate-300">
+ <div class="text-muted">
{formatHistoryChartTooltipValue(point().value, props.unit)}
</div>
</div>
diff --git a/frontend-modern/src/components/shared/MetadataBadge.tsx b/frontend-modern/src/components/shared/MetadataBadge.tsx
index 76a79d01ec..a6ac91a78d 100644
--- a/frontend-modern/src/components/shared/MetadataBadge.tsx
+++ b/frontend-modern/src/components/shared/MetadataBadge.tsx
@@ -45,7 +45,7 @@ const METADATA_BADGE_TONE_CLASSES: Record<
> = {
filled: {
neutral: 'bg-surface-alt text-base-content',
- muted: 'bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200',
+ muted: 'bg-surface-alt text-muted',
info: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200',
success: 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900 dark:text-emerald-200',
warning: 'bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200',
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index b8953263b9..48746a5b2a 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -940,6 +940,12 @@ describe('shared primitive guardrails', () => {
expect(tooltipPortalSource).toContain('text-base-content');
expect(tooltipPortalSource).toContain('border-border');
expect(tooltipPortalSource).not.toContain("'background-color': 'rgb(15, 23, 42)'");
+ expect(historyChartTooltipSource).toContain('border border-border bg-surface');
+ expect(historyChartTooltipSource).toContain('text-base-content');
+ expect(historyChartTooltipSource).toContain('text-muted');
+ expect(historyChartTooltipSource).not.toContain('border-slate-600');
+ expect(historyChartTooltipSource).not.toContain('bg-slate-900');
+ expect(historyChartTooltipSource).not.toContain(['text', 'slate', '50'].join('-'));
});
it('keeps shared table card chrome on one canonical header owner', () => {
@@ -2461,6 +2467,9 @@ describe('shared primitive guardrails', () => {
expect(metadataBadgeSource).toContain('METADATA_BADGE_TONE_CLASSES');
expect(metadataBadgeSource).toContain('MetadataBadgeAppearance');
expect(metadataBadgeSource).toContain('getMetadataBadgeClass');
+ expect(metadataBadgeSource).toContain("muted: 'bg-surface-alt text-muted'");
+ expect(metadataBadgeSource).toContain("warning: 'bg-amber-100 text-amber-800");
+ expect(metadataBadgeSource).not.toContain(["muted: 'bg", 'slate', '100'].join('-'));
expect(organizationBadgesSource).toContain('MetadataBadge');
expect(organizationBadgesSource).toContain('getOrganizationRoleBadgeTone');
expect(organizationBadgesSource).toContain('getOrganizationShareStatusBadgeTone');
@@ -4014,9 +4023,7 @@ describe('shared primitive guardrails', () => {
expect(guard?.allowedPaths ?? []).toHaveLength(0);
expect(guard?.ignoredPaths).toEqual(['src/components/shared/Button.test.tsx']);
}
- expect(aiChatMessageCopyValueGuard?.scopes).toEqual([
- 'src/components/AI/Chat/MessageItem.tsx',
- ]);
+ expect(aiChatMessageCopyValueGuard?.scopes).toEqual(['src/components/AI/Chat/MessageItem.tsx']);
expect(aiChatMessageCopyValueGuard?.allPatterns).toEqual([
'inline-flex h-7 w-7',
'border border-border-subtle bg-surface text-muted opacity-0 shadow-sm transition-opacity hover:text-base-content',
@@ -4166,7 +4173,7 @@ describe('shared primitive guardrails', () => {
expect(messageItemSource).toContain('@/components/shared/Button');
expect(messageItemSource).toContain('ActionIconButton');
expect(messageItemSource).toContain('CopyValueButton');
- expect(messageItemSource).not.toContain("lucide-solid/icons/copy");
+ expect(messageItemSource).not.toContain('lucide-solid/icons/copy');
expect(messageItemSource).not.toContain("lucide-solid/icons/check';");
expect(messageItemSource).not.toContain(
'mt-1 inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-subtle bg-surface text-muted opacity-0 shadow-sm transition-opacity hover:text-base-content',
@@ -4179,7 +4186,7 @@ describe('shared primitive guardrails', () => {
);
expect(toolExecutionBlockSource).toContain('@/components/shared/Button');
expect(toolExecutionBlockSource).toContain('CopyValueButton');
- expect(toolExecutionBlockSource).not.toContain("lucide-solid/icons/copy");
+ expect(toolExecutionBlockSource).not.toContain('lucide-solid/icons/copy');
expect(toolExecutionBlockSource).not.toContain("lucide-solid/icons/check';");
expect(toolExecutionBlockSource).not.toContain(
'inline-flex h-6 w-6 shrink-0 items-center justify-center rounded border border-border-subtle bg-surface text-muted transition-colors hover:bg-surface-hover hover:text-base-content focus:outline-none focus:ring-2 focus:ring-blue-500/30',
diff --git a/frontend-modern/src/i18n/__tests__/i18n.test.ts b/frontend-modern/src/i18n/__tests__/i18n.test.ts
index 0663d6dc57..da6dd386e9 100644
--- a/frontend-modern/src/i18n/__tests__/i18n.test.ts
+++ b/frontend-modern/src/i18n/__tests__/i18n.test.ts
@@ -2,12 +2,15 @@ import { afterEach, describe, expect, it } from 'vitest';
import {
ALERTS_OVERVIEW_ALLOWED_IDENTICAL_TRANSLATIONS,
ALERTS_OVERVIEW_NON_TRANSLATABLE_TOKENS,
+ COMMERCIAL_PRICING_HANDOFF_ALLOWED_IDENTICAL_TRANSLATIONS,
+ COMMERCIAL_PRICING_HANDOFF_NON_TRANSLATABLE_TOKENS,
DEFAULT_LOCALE,
FIRST_SESSION_MONITORING_ALLOWED_IDENTICAL_TRANSLATIONS,
FIRST_SESSION_MONITORING_NON_TRANSLATABLE_TOKENS,
FIRST_LOCALIZATION_LOCALES,
LOCALIZATION_FOUNDATION,
LOCALIZED_ALERTS_OVERVIEW_JOURNEY_KEYS,
+ LOCALIZED_COMMERCIAL_PRICING_HANDOFF_KEYS,
LOCALIZED_FIRST_SESSION_MONITORING_JOURNEY_KEYS,
LOCALIZED_SETTINGS_GENERAL_JOURNEY_KEYS,
NEVER_TRANSLATE_COPY_RULES,
@@ -168,6 +171,9 @@ describe('i18n foundation', () => {
'systemctl',
]),
);
+ expect(COMMERCIAL_PRICING_HANDOFF_NON_TRANSLATABLE_TOKENS).toEqual(
+ expect.arrayContaining(['Pulse', 'Pulse Account']),
+ );
});
it('requires explicit first-wave translations for the migrated settings general journey', () => {
@@ -304,4 +310,28 @@ describe('i18n foundation', () => {
).toContain('cpu');
}
});
+
+ it('requires explicit first-wave translations for the migrated commercial pricing handoff', () => {
+ for (const locale of FIRST_LOCALIZATION_LOCALES) {
+ const allowedIdenticalKeys: ReadonlySet<I18nMessageKey> = new Set([
+ ...((COMMERCIAL_PRICING_HANDOFF_ALLOWED_IDENTICAL_TRANSLATIONS[locale] ??
+ []) as readonly I18nMessageKey[]),
+ ]);
+ for (const key of LOCALIZED_COMMERCIAL_PRICING_HANDOFF_KEYS) {
+ expect(I18N_MESSAGES[locale][key], `${locale}:${key}`).toBeTruthy();
+ if (!allowedIdenticalKeys.has(key)) {
+ expect(I18N_MESSAGES[locale][key], `${locale}:${key}`).not.toBe(I18N_MESSAGES.en[key]);
+ }
+ }
+ }
+ });
+
+ it('keeps Pulse Account untranslated in commercial pricing handoff copy', () => {
+ for (const locale of FIRST_LOCALIZATION_LOCALES) {
+ expect(I18N_MESSAGES[locale]['pricing.handoff.title.pulseAccount']).toContain(
+ 'Pulse Account',
+ );
+ expect(I18N_MESSAGES[locale]['pricing.handoff.link.pulseAccount']).toContain('Pulse Account');
+ }
+ });
});
diff --git a/frontend-modern/src/i18n/index.ts b/frontend-modern/src/i18n/index.ts
index 4332d27266..17fca2d699 100644
--- a/frontend-modern/src/i18n/index.ts
+++ b/frontend-modern/src/i18n/index.ts
@@ -203,10 +203,13 @@ export {
export {
ALERTS_OVERVIEW_ALLOWED_IDENTICAL_TRANSLATIONS,
ALERTS_OVERVIEW_NON_TRANSLATABLE_TOKENS,
+ COMMERCIAL_PRICING_HANDOFF_ALLOWED_IDENTICAL_TRANSLATIONS,
+ COMMERCIAL_PRICING_HANDOFF_NON_TRANSLATABLE_TOKENS,
FIRST_SESSION_MONITORING_ALLOWED_IDENTICAL_TRANSLATIONS,
FIRST_SESSION_MONITORING_NON_TRANSLATABLE_TOKENS,
LOCALIZATION_FOUNDATION,
LOCALIZED_ALERTS_OVERVIEW_JOURNEY_KEYS,
+ LOCALIZED_COMMERCIAL_PRICING_HANDOFF_KEYS,
LOCALIZED_FIRST_SESSION_MONITORING_JOURNEY_KEYS,
LOCALIZED_SETTINGS_GENERAL_JOURNEY_KEYS,
NEVER_TRANSLATE_COPY_RULES,
diff --git a/frontend-modern/src/i18n/messages.de.ts b/frontend-modern/src/i18n/messages.de.ts
index 139265c03f..d0fda42543 100644
--- a/frontend-modern/src/i18n/messages.de.ts
+++ b/frontend-modern/src/i18n/messages.de.ts
@@ -1,6 +1,12 @@
import type { I18nCatalog } from './messages';
export const DE_MESSAGE_OVERRIDES = {
+ 'pricing.handoff.description.afterLink': '.',
+ 'pricing.handoff.description.beforeLink': 'Wenn die Weiterleitung nicht automatisch startet,',
+ 'pricing.handoff.link.publicPricing': 'weiter zur oeffentlichen Preisseite',
+ 'pricing.handoff.link.pulseAccount': 'weiter zu Pulse Account',
+ 'pricing.handoff.title.publicPricing': 'Weiterleitung zu den Preisen',
+ 'pricing.handoff.title.pulseAccount': 'Weiterleitung zu Pulse Account',
'alerts.activation.label.enabled': 'Warnmeldungen aktiviert',
'alerts.activation.label.disabled': 'Warnmeldungen deaktiviert',
'alerts.activation.toast.activated':
@@ -40,7 +46,8 @@ export const DE_MESSAGE_OVERRIDES = {
'alerts.assistant.explain.menuHint': 'Diese Warnmeldung als reinen Kontext verwenden',
'alerts.assistant.patrol.chevron': 'Weitere Aktionen fuer diese Warnmeldung',
'alerts.assistant.patrol.menuLabel': 'Patrol ermitteln lassen',
- 'alerts.assistant.patrol.menuHint': 'Eine gezielte Patrol-Pruefung fuer diese Ressource ausfuehren',
+ 'alerts.assistant.patrol.menuHint':
+ 'Eine gezielte Patrol-Pruefung fuer diese Ressource ausfuehren',
'alerts.assistant.patrol.title': 'Patrol diese Warnmeldung untersuchen lassen',
'alerts.assistant.patrol.triggered': 'Patrol untersucht {resourceName}',
'alerts.assistant.patrol.noResource': 'Diese Warnmeldung hat keine zu untersuchende Ressource',
@@ -394,8 +401,7 @@ export const DE_MESSAGE_OVERRIDES = {
'settings.header.systemAiPatrol.description':
'Legen Sie fest, wann Patrol laeuft, was Patrol startet und welches Modell verwendet wird.',
'settings.header.systemAiPatrol.title': 'Patrol',
- 'settings.header.systemBilling.description':
- 'Plan, Lizenz und Patrol-Modus fuer diese Instanz.',
+ 'settings.header.systemBilling.description': 'Plan, Lizenz und Patrol-Modus fuer diese Instanz.',
'settings.header.systemBilling.title': 'Plaene & Abrechnung',
'settings.header.systemGeneral.description':
'Verwalten Sie Darstellung, Layout und Standard-Monitoring-Takt.',
diff --git a/frontend-modern/src/i18n/messages.es.ts b/frontend-modern/src/i18n/messages.es.ts
index 97b357a054..3caa1e300d 100644
--- a/frontend-modern/src/i18n/messages.es.ts
+++ b/frontend-modern/src/i18n/messages.es.ts
@@ -1,6 +1,12 @@
import type { I18nCatalog } from './messages';
export const ES_MESSAGE_OVERRIDES = {
+ 'pricing.handoff.description.afterLink': '.',
+ 'pricing.handoff.description.beforeLink': 'Si la redireccion no comienza automaticamente,',
+ 'pricing.handoff.link.publicPricing': 'continua al sitio publico de precios',
+ 'pricing.handoff.link.pulseAccount': 'continua a Pulse Account',
+ 'pricing.handoff.title.publicPricing': 'Redirigiendo a precios',
+ 'pricing.handoff.title.pulseAccount': 'Redirigiendo a Pulse Account',
'alerts.activation.label.enabled': 'Alertas activadas',
'alerts.activation.label.disabled': 'Alertas desactivadas',
'alerts.activation.toast.activated':
@@ -39,7 +45,8 @@ export const ES_MESSAGE_OVERRIDES = {
'alerts.assistant.explain.menuHint': 'Usar esta alerta como contexto de solo lectura',
'alerts.assistant.patrol.chevron': 'Mas acciones para esta alerta',
'alerts.assistant.patrol.menuLabel': 'Pedir a Patrol que investigue',
- 'alerts.assistant.patrol.menuHint': 'Ejecutar una verificacion dirigida de Patrol en este recurso',
+ 'alerts.assistant.patrol.menuHint':
+ 'Ejecutar una verificacion dirigida de Patrol en este recurso',
'alerts.assistant.patrol.title': 'Pedir a Patrol que investigue esta alerta',
'alerts.assistant.patrol.triggered': 'Patrol esta investigando {resourceName}',
'alerts.assistant.patrol.noResource': 'Esta alerta no tiene un recurso para investigar',
diff --git a/frontend-modern/src/i18n/messages.ts b/frontend-modern/src/i18n/messages.ts
index 3390fde242..e991694438 100644
--- a/frontend-modern/src/i18n/messages.ts
+++ b/frontend-modern/src/i18n/messages.ts
@@ -2,6 +2,12 @@ import type { SupportedLocale } from './locales';
export const EN_MESSAGES = {
'runtimeHome.openingWorkspace': 'Opening workspace...',
+ 'pricing.handoff.description.afterLink': '.',
+ 'pricing.handoff.description.beforeLink': 'If the handoff does not start automatically,',
+ 'pricing.handoff.link.publicPricing': 'continue to the public pricing site',
+ 'pricing.handoff.link.pulseAccount': 'continue to Pulse Account',
+ 'pricing.handoff.title.publicPricing': 'Redirecting to pricing',
+ 'pricing.handoff.title.pulseAccount': 'Redirecting to Pulse Account',
'setup.completion.action.addInfrastructure': 'Add infrastructure',
'setup.completion.action.downloadCredentials': 'Download credentials',
'setup.completion.action.installAgent': 'Install Pulse Agent',
@@ -514,6 +520,15 @@ export const SETTINGS_GENERAL_MIGRATED_MESSAGE_KEYS = [
'settings.general.theme.title',
] as const satisfies readonly I18nMessageKey[];
+export const COMMERCIAL_PRICING_HANDOFF_MIGRATED_MESSAGE_KEYS = [
+ 'pricing.handoff.description.afterLink',
+ 'pricing.handoff.description.beforeLink',
+ 'pricing.handoff.link.publicPricing',
+ 'pricing.handoff.link.pulseAccount',
+ 'pricing.handoff.title.publicPricing',
+ 'pricing.handoff.title.pulseAccount',
+] as const satisfies readonly I18nMessageKey[];
+
export const FIRST_SESSION_MONITORING_MIGRATED_MESSAGE_KEYS = [
'runtimeHome.openingWorkspace',
'setup.completion.action.addInfrastructure',
diff --git a/frontend-modern/src/i18n/policy.ts b/frontend-modern/src/i18n/policy.ts
index 0b84dc7a7b..b9eafd26fe 100644
--- a/frontend-modern/src/i18n/policy.ts
+++ b/frontend-modern/src/i18n/policy.ts
@@ -6,6 +6,7 @@ import {
} from './locales';
import {
ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS,
+ COMMERCIAL_PRICING_HANDOFF_MIGRATED_MESSAGE_KEYS,
FIRST_SESSION_MONITORING_MIGRATED_MESSAGE_KEYS,
SETTINGS_GENERAL_MIGRATED_MESSAGE_KEYS,
type I18nMessageKey,
@@ -78,6 +79,11 @@ export const ALERTS_OVERVIEW_NON_TRANSLATABLE_TOKENS = [
'systemctl',
] as const;
+export const COMMERCIAL_PRICING_HANDOFF_NON_TRANSLATABLE_TOKENS = [
+ 'Pulse',
+ 'Pulse Account',
+] as const;
+
export const LOCALIZED_SETTINGS_GENERAL_JOURNEY_KEYS =
SETTINGS_GENERAL_MIGRATED_MESSAGE_KEYS satisfies readonly I18nMessageKey[];
@@ -87,6 +93,9 @@ export const LOCALIZED_FIRST_SESSION_MONITORING_JOURNEY_KEYS =
export const LOCALIZED_ALERTS_OVERVIEW_JOURNEY_KEYS =
ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS satisfies readonly I18nMessageKey[];
+export const LOCALIZED_COMMERCIAL_PRICING_HANDOFF_KEYS =
+ COMMERCIAL_PRICING_HANDOFF_MIGRATED_MESSAGE_KEYS satisfies readonly I18nMessageKey[];
+
export const SETTINGS_GENERAL_ALLOWED_IDENTICAL_TRANSLATIONS = {
de: ['settings.nav.group.system', 'settings.general.theme.option.system'],
es: ['settings.header.systemGeneral.title', 'settings.nav.item.general'],
@@ -119,3 +128,8 @@ export const ALERTS_OVERVIEW_ALLOWED_IDENTICAL_TRANSLATIONS = {
'alerts.timeline.event.runbook',
],
} as const satisfies Partial<Record<SupportedLocale, readonly I18nMessageKey[]>>;
+
+export const COMMERCIAL_PRICING_HANDOFF_ALLOWED_IDENTICAL_TRANSLATIONS = {
+ de: ['pricing.handoff.description.afterLink'],
+ es: ['pricing.handoff.description.afterLink'],
+} as const satisfies Partial<Record<SupportedLocale, readonly I18nMessageKey[]>>;
diff --git a/frontend-modern/src/pages/PricingHandoff.tsx b/frontend-modern/src/pages/PricingHandoff.tsx
index 59efdf01a6..a2ab03af1f 100644
--- a/frontend-modern/src/pages/PricingHandoff.tsx
+++ b/frontend-modern/src/pages/PricingHandoff.tsx
@@ -7,6 +7,7 @@ import {
isExternalPricingDestination,
isSelfHostedPurchaseStartDestination,
} from '@/utils/pricingHandoff';
+import { t } from '@/i18n';
export default function PricingHandoff() {
const location = useLocation();
@@ -16,11 +17,15 @@ export default function PricingHandoff() {
isSelfHostedPurchaseStartDestination(destination()),
);
const pulseAccountDestination = createMemo(() => selfHostedPurchaseStartDestination());
- const handoffLabel = createMemo(() =>
- pulseAccountDestination() ? 'Pulse Account' : 'pricing',
+ const handoffTitle = createMemo(() =>
+ pulseAccountDestination()
+ ? t('pricing.handoff.title.pulseAccount')
+ : t('pricing.handoff.title.publicPricing'),
);
const handoffLinkLabel = createMemo(() =>
- pulseAccountDestination() ? 'continue to Pulse Account' : 'continue to the public pricing site',
+ pulseAccountDestination()
+ ? t('pricing.handoff.link.pulseAccount')
+ : t('pricing.handoff.link.publicPricing'),
);
onMount(() => {
@@ -37,14 +42,14 @@ export default function PricingHandoff() {
<div class="flex min-h-[50vh] items-center justify-center">
<div class="max-w-xl space-y-2 text-center">
<PageHeader
- title={<>Redirecting to {handoffLabel()}</>}
+ title={handoffTitle()}
description={
<>
- If the handoff does not start automatically,{' '}
+ {t('pricing.handoff.description.beforeLink')}{' '}
<a href={destination()} class="text-blue-600 hover:underline dark:text-blue-400">
{handoffLinkLabel()}
</a>
- .
+ {t('pricing.handoff.description.afterLink')}
</>
}
descriptionVisibility="always"
diff --git a/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx
index a726628a23..620b18a212 100644
--- a/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx
+++ b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx
@@ -3,6 +3,7 @@ import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';
import { Route, Router } from '@solidjs/router';
import PricingHandoff from '@/pages/PricingHandoff';
import pricingHandoffSource from '@/pages/PricingHandoff.tsx?raw';
+import { DEFAULT_LOCALE, loadLocaleCatalog, setActiveLocale } from '@/i18n';
import {
getSelfHostedPurchaseStartUrl,
SELF_HOSTED_PRO_BILLING_PLAN_ROUTE,
@@ -22,11 +23,13 @@ vi.mock('@/utils/pricingHandoff', async () => {
describe('PricingHandoff', () => {
beforeEach(() => {
handoffToExternalPricingMock.mockReset();
+ setActiveLocale(DEFAULT_LOCALE);
window.scrollTo = vi.fn();
});
afterEach(() => {
cleanup();
+ setActiveLocale(DEFAULT_LOCALE);
window.history.replaceState({}, '', '/');
});
@@ -56,6 +59,30 @@ describe('PricingHandoff', () => {
);
});
+ it('localizes the Pulse Account handoff without translating the destination name', async () => {
+ await loadLocaleCatalog('de');
+ setActiveLocale('de');
+ window.history.replaceState({}, '', '/pricing?feature=unknown_pro_feature');
+ const expectedDestination = getSelfHostedPurchaseStartUrl(
+ 'unknown_pro_feature',
+ new URLSearchParams('feature=unknown_pro_feature'),
+ );
+
+ render(() => (
+ <Router>
+ <Route path="/pricing" component={PricingHandoff} />
+ </Router>
+ ));
+
+ expect(
+ await screen.findByRole('heading', { name: 'Weiterleitung zu Pulse Account' }),
+ ).toBeInTheDocument();
+ expect(screen.getByRole('link', { name: 'weiter zu Pulse Account' })).toHaveAttribute(
+ 'href',
+ expectedDestination,
+ );
+ });
+
it('uses PageHeader without hiding the manual-redirect link on mobile', () => {
expect(pricingHandoffSource).toContain(
"import { PageHeader } from '@/components/shared/PageHeader';",