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.

fix(settings): prevent credential autofill in provider controls

rcourtmanb9811cdf5382
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 3cc12e2db1..732900fac0 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -1704,6 +1704,15 @@ Agent`), with the plain-language source phrase available through accessible
summary when those fields are present. The settings shell may compose that
safe backend diagnostic for display, but it must not infer provider
remediation by parsing raw upstream error strings in the browser. Provider
+ model identifiers, custom provider URLs, and API-key controls must compose
+ the shared semantic form surface in both themes and must not be classified
+ as website login credentials. The Provider & Models form and manual model
+ identifiers opt out of credential autofill, provider secrets use the
+ `new-password` autocomplete purpose, and the global form CSS preserves the
+ active semantic surface and text tokens when a browser legitimately
+ autofills another control. Dark mode must not expose the browser's pale
+ credential fill or inject an admin username into a model identifier.
+ Provider
setup cards must describe provider families through the current
backend-owned provider contract; DeepSeek setup copy is the V4 family and
must not regress to old V3 or compatibility-alias wording. First-class
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index 9e88cde4ec..ee15006fe1 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,21 +1,27 @@
{
"version": 1,
- "base_sha": "37e3c81b03bc6f59b4c393762daf10020a245b36",
- "verified_at": "2026-08-09T09:29:29Z",
+ "base_sha": "c94ed3906e1290eefe2332e5b9807d5fb012a0dc",
+ "verified_at": "2026-08-09T09:26:15Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/features/platformPage/agentVersion.ts"
+ "frontend-modern/src/components/Settings/AIModelSelectionSection.tsx",
+ "frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx",
+ "frontend-modern/src/components/Settings/AISettings.tsx",
+ "frontend-modern/src/index.css"
],
"content_sha256": {
- "frontend-modern/src/features/platformPage/agentVersion.ts": "db80e0021579408af18677a9ce34ae13aadf018d76ace3357df19058175d1bff"
+ "frontend-modern/src/components/Settings/AIModelSelectionSection.tsx": "8591b74410989224fc62460ac0db612d922bc4d5288c2728a4f19a9eb0c77877",
+ "frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx": "177ac200d4f3b4dcb64b792f746bd17cc1259d1dafb66c5900bad5eb17936f14",
+ "frontend-modern/src/components/Settings/AISettings.tsx": "2e8bab6f7bbca5c4a7dbd772f3325fd89763b1c384ee30c2d0b0ea3b97266a6e",
+ "frontend-modern/src/index.css": "87f4ab4ec40b8042cf33eb407ca849acd285dbe9ce650c0014596aa39752852b"
},
"routes": [
- "/proxmox/overview"
+ "/settings/pulse-intelligence/provider"
],
"viewports": [
{
"width": 1440,
- "height": 900
+ "height": 1000
},
{
"width": 390,
@@ -23,11 +29,15 @@
}
],
"states": [
- "A provider-backed Proxmox node with a retained stale agent facet did not render the outdated-agent notice at desktop or narrow widths.",
- "The Proxmox overview remained usable at 390 pixels with document width equal to viewport width and no console errors."
+ "Dark-mode shared model and Anthropic API-key controls rendered on the semantic slate surface with light text at desktop and narrow widths, including empty, filled, focused, open-provider, and closed-provider states.",
+ "After reloading the persisted Provider & Models route, both controls remained empty instead of receiving the local admin credential, retained autocomplete=off and autocomplete=new-password respectively, and kept the dark semantic surface.",
+ "The 390x844 layout kept both controls within the viewport with document scrollWidth equal to innerWidth, and the focused API-key control remained visible above the mobile navigation without clipping.",
+ "The verified route produced no browser console errors."
],
"interactions": [
- "Opened the current-build Proxmox overview at 1440x900 and confirmed no outdated-agent notice was rendered for non-reporting retained agent metadata.",
- "Repeated the notice and horizontal-overflow checks at 390x844, inspected browser console errors, and reset the temporary viewport."
+ "Signed in to the managed local development runtime, opened Settings > Provider & Models, and expanded the Anthropic provider configuration.",
+ "Focused and edited the shared model and API-key controls without saving, verified their computed background, text, border, autocomplete, and password-type properties, then cleared both temporary values.",
+ "Collapsed and reopened the Anthropic provider, reloaded the Provider & Models route, and confirmed browser credential autofill did not repopulate either field.",
+ "Repeated the visual and focus checks at 1440x1000 and 390x844, including horizontal-overflow and console-error inspection."
]
}
diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.ts
index 3676ad7a3e..56649d1c93 100644
--- a/frontend-modern/src/__tests__/App.architecture.test.ts
+++ b/frontend-modern/src/__tests__/App.architecture.test.ts
@@ -160,6 +160,16 @@ describe('App architecture', () => {
);
});
+ it('keeps native form and browser autofill paint on semantic theme tokens', () => {
+ expect(appStylesSource).toContain('color-scheme: light');
+ expect(appStylesSource).toContain('color-scheme: dark');
+ expect(appStylesSource).toContain('input:-webkit-autofill');
+ expect(appStylesSource).toContain(
+ '-webkit-box-shadow: 0 0 0 1000px var(--color-bg-surface) inset;',
+ );
+ expect(appStylesSource).toContain('-webkit-text-fill-color: var(--color-text-base);');
+ });
+
it('keeps infrastructure platforms marked as dense data surfaces', () => {
platformSurfaceSources.forEach((source) => {
expect(source).toMatch(/data-testid="[^"]+-page" class="pulse-wide-data-surface /);
diff --git a/frontend-modern/src/components/Settings/AIModelSelectionSection.tsx b/frontend-modern/src/components/Settings/AIModelSelectionSection.tsx
index 32cc9c140a..f3aedecff8 100644
--- a/frontend-modern/src/components/Settings/AIModelSelectionSection.tsx
+++ b/frontend-modern/src/components/Settings/AIModelSelectionSection.tsx
@@ -426,6 +426,7 @@ export const AIModelOverrideField: Component<{
onInput={(e) => setSelectedModel(e.currentTarget.value)}
placeholder="Use shared default model"
aria-label={config().ariaLabel}
+ autocomplete="off"
class={controlClass()}
disabled={state.saving()}
/>
@@ -535,6 +536,7 @@ export const AIModelSelectionSection: Component<AIModelSelectionSectionProps> =
onInput={(e) => state.setForm('model', e.currentTarget.value)}
placeholder="Configure a provider below to see available models"
aria-label="Default model identifier"
+ autocomplete="off"
class={controlClass()}
disabled={state.saving()}
/>
diff --git a/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx b/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx
index 6e0bca287c..d6284c1f11 100644
--- a/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx
+++ b/frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx
@@ -220,6 +220,7 @@ export const AIProviderConfigurationSection: Component<AIProviderConfigurationSe
aria-label={`${getAIProviderDisplayName(config.provider)} ${
config.inputType === 'url' ? 'server URL' : 'API key'
}`}
+ autocomplete={config.inputType === 'password' ? 'new-password' : 'off'}
class={controlClass()}
disabled={props.saving()}
/>
@@ -260,6 +261,7 @@ export const AIProviderConfigurationSection: Component<AIProviderConfigurationSe
}
placeholder={extraField.placeholder}
aria-label={`${getAIProviderDisplayName(config.provider)} ${extraField.label}`}
+ autocomplete="off"
class={controlClass()}
disabled={props.saving()}
/>
diff --git a/frontend-modern/src/components/Settings/AISettings.tsx b/frontend-modern/src/components/Settings/AISettings.tsx
index d95f948bcd..328053f417 100644
--- a/frontend-modern/src/components/Settings/AISettings.tsx
+++ b/frontend-modern/src/components/Settings/AISettings.tsx
@@ -411,7 +411,7 @@ export const AISettings: Component<{ page?: AISettingsPage }> = (props) => {
}
noPadding
>
- <form class="divide-y divide-border" onSubmit={state.handleSave}>
+ <form class="divide-y divide-border" autocomplete="off" onSubmit={state.handleSave}>
<Show when={state.loading()}>
<div class="flex items-center gap-3 text-sm text-muted p-4 sm:p-6">
<LoadingSpinner size="md" tone="current" />
diff --git a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx
index 52c6d8d6bc..33ca9345ab 100644
--- a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx
@@ -278,6 +278,19 @@ describe('AISettings model loading error states', () => {
expect(screen.queryByText(/Set how much Patrol can do/i)).not.toBeInTheDocument();
});
+ it('keeps model identifiers and provider secrets out of login credential autofill', async () => {
+ renderComponent();
+
+ const modelInput = await screen.findByLabelText('Default model identifier');
+ expect(modelInput).toHaveAttribute('autocomplete', 'off');
+ expect(modelInput.closest('form')).toHaveAttribute('autocomplete', 'off');
+
+ expect(await screen.findByLabelText('Anthropic API key')).toHaveAttribute(
+ 'autocomplete',
+ 'new-password',
+ );
+ });
+
it('shows Patrol scheduling and readiness without rendering the operator loop', async () => {
getSettingsMock.mockResolvedValue({
...baseSettings(),
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index be86bdde17..ad1bfacf89 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -1293,6 +1293,17 @@ describe('settings architecture guardrails', () => {
);
});
+ it('keeps provider configuration fields out of login credential autofill', () => {
+ expect(aiSettingsSource).toContain('<form class="divide-y divide-border" autocomplete="off"');
+ expect(aiModelSelectionSectionSource).toContain('autocomplete="off"');
+ expect(aiProviderConfigurationSectionSource).toContain(
+ "autocomplete={config.inputType === 'password' ? 'new-password' : 'off'}",
+ );
+ expect(aiProviderConfigurationSectionSource).toContain(
+ 'aria-label={`${getAIProviderDisplayName(config.provider)} ${extraField.label}`}\n autocomplete="off"',
+ );
+ });
+
it('keeps system AI save feedback tied to provider and Patrol readiness context', () => {
expect(aiSettingsSource).toContain('Choose a Patrol mode on the Patrol page.');
expect(aiSettingsSource).toContain('Open Patrol');
diff --git a/frontend-modern/src/index.css b/frontend-modern/src/index.css
index 965b6c2ed8..6cf4370367 100644
--- a/frontend-modern/src/index.css
+++ b/frontend-modern/src/index.css
@@ -59,6 +59,8 @@
/* Custom styles */
@layer base {
:root {
+ color-scheme: light;
+
/*
Layout tokens.
Goal: keep top-level navigation spatially stable while giving dense operational views room to breathe.
@@ -92,6 +94,8 @@
}
.dark {
+ color-scheme: dark;
+
/* Semantic Colors - Dark Mode */
--color-bg-base: theme('colors.slate.900');
--color-bg-surface: theme('colors.slate.800');
@@ -132,6 +136,32 @@
color: var(--color-text-base);
}
+ /* Browser autofill paints its own pale credential background unless the
+ theme surface is restored explicitly. Keep legitimate autofill readable
+ without letting it break the active color scheme. */
+ input:-webkit-autofill,
+ input:-webkit-autofill:hover,
+ input:-webkit-autofill:focus,
+ textarea:-webkit-autofill,
+ textarea:-webkit-autofill:hover,
+ textarea:-webkit-autofill:focus,
+ select:-webkit-autofill,
+ select:-webkit-autofill:hover,
+ select:-webkit-autofill:focus {
+ -webkit-text-fill-color: var(--color-text-base);
+ caret-color: var(--color-text-base);
+ -webkit-box-shadow: 0 0 0 1000px var(--color-bg-surface) inset;
+ box-shadow: 0 0 0 1000px var(--color-bg-surface) inset;
+ }
+
+ input:autofill,
+ textarea:autofill,
+ select:autofill {
+ color: var(--color-text-base);
+ caret-color: var(--color-text-base);
+ box-shadow: 0 0 0 1000px var(--color-bg-surface) inset;
+ }
+
/* The document root never scrolls: the app shell is h-screen with
overflow hidden and .app-scroll-shell owns vertical scrolling.
Forcing a root scrollbar here would reserve a dead gutter at the