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.

Explain log-control scope before operators pause or export

pulse-triage[bot]669842f040df
diff --git a/frontend-modern/browser-verification/f062a8c76bc1d847.json b/frontend-modern/browser-verification/f062a8c76bc1d847.json
new file mode 100644
index 0000000000..7f1298671d
--- /dev/null
+++ b/frontend-modern/browser-verification/f062a8c76bc1d847.json
@@ -0,0 +1,45 @@
+{
+ "version": 1,
+ "base_sha": "b5edec67b7b8636221684454dd29fec0f5e5747a",
+ "verified_at": "2026-10-09T09:36:55Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Settings/SystemLogsPanel.tsx",
+ "frontend-modern/src/utils/systemLogsPresentation.ts"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Settings/SystemLogsPanel.tsx": "b92a73f4382aaaf734044194be1e5659e85b10cc4fa8305323b80de4259001bc",
+ "frontend-modern/src/utils/systemLogsPresentation.ts": "759e3dde79d1ddf550f362c5cc13763d67fb60858fd6560bd6150dad508104eb"
+ },
+ "routes": [
+ "/settings/support \u2014 production SystemLogsPanel, hook, presentation, shared controls and CSS in a synthetic component fixture, not the authenticated Settings shell"
+ ],
+ "viewports": [
+ {
+ "width": 1440,
+ "height": 1000
+ },
+ {
+ "width": 390,
+ "height": 844
+ }
+ ],
+ "states": [
+ "Info on mount with server-wide/private-data description",
+ "Streaming, display paused and cleared with monitoring/export-scope warning still visible",
+ "Synthetic archive download and mock Warn change; no Debug or live server action"
+ ],
+ "interactions": [
+ "Inspect visible 14 px descriptions and accessible control names/description associations",
+ "Keyboard pause, clear, download and resume; verify paused arrivals omitted on one open stream",
+ "Mock Info to Warn; verify only its expected level POST and one synthetic download GET",
+ "Unmount closes stream once; late synthetic arrivals cannot restore the view"
+ ],
+ "proof_scope": "Actual panel, state hook, presentation, shared controls and CSS with synthetic SSE and API/download responses. No actual bundle, Debug, monitoring, backup, guest probe, native recovery or installed acceptance.",
+ "browser_versions": {
+ "chromium": "141.0.7390.37",
+ "webkit": "26.0"
+ },
+ "playwright_version": "1.56.1",
+ "known_existing_limit": "The unchanged light-theme Support Bundle button still has the low-contrast styling addressed by held 6a66493824. This disclosure receipt is not that rendering repair or native recovery."
+}
diff --git a/frontend-modern/src/components/Settings/SystemLogsPanel.tsx b/frontend-modern/src/components/Settings/SystemLogsPanel.tsx
index 24cb89bcd4..cdad04bef7 100644
--- a/frontend-modern/src/components/Settings/SystemLogsPanel.tsx
+++ b/frontend-modern/src/components/Settings/SystemLogsPanel.tsx
@@ -1,4 +1,4 @@
-import { Component, For } from 'solid-js';
+import { Component, For, createUniqueId } from 'solid-js';
import OperationsPanel from '@/components/Settings/OperationsPanel';
import {
getSystemLogBufferSummary,
@@ -17,6 +17,9 @@ import { useSystemLogsPanelState } from './useSystemLogsPanelState';
export const SystemLogsPanel: Component = () => {
const state = useSystemLogsPanelState();
+ const levelHelpId = createUniqueId();
+ const displayHelpId = createUniqueId();
+ const bundleHelpId = createUniqueId();
const streamPresentation = () => getSystemLogStreamPresentation(state.isPaused());
@@ -24,16 +27,17 @@ export const SystemLogsPanel: Component = () => {
<div class="space-y-6">
<OperationsPanel title={SYSTEM_LOGS_PANEL_COPY.title}>
{/* Controls */}
- <div class="p-4 sm:p-6">
+ <div class="p-4 sm:p-6 space-y-3">
<div class="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
<FormSelect
- id="system-log-level-select"
+ id={`system-log-level-${levelHelpId}`}
label={SYSTEM_LOGS_PANEL_COPY.levelLabel}
+ aria-describedby={levelHelpId}
value={state.level()}
onChange={(e) => void state.handleLevelChange(e.currentTarget.value)}
fieldBaseClass="flex"
fieldClass="items-center space-x-3"
- labelClass="text-sm font-medium text-base-content"
+ labelClass="text-sm font-medium text-base-content whitespace-nowrap"
selectBaseClass="form-select min-h-11 sm:min-h-9 text-sm py-2.5 px-3 rounded-md border-border bg-surface text-muted focus:ring-primary-500 focus:border-primary-500"
>
<For each={SYSTEM_LOG_LEVEL_OPTIONS}>
@@ -43,31 +47,49 @@ export const SystemLogsPanel: Component = () => {
<div class="flex items-center space-x-2">
<button
+ type="button"
onClick={state.togglePaused}
+ aria-label={streamPresentation().toggleTitle}
+ aria-describedby={displayHelpId}
+ aria-pressed={state.isPaused()}
class={`min-h-11 sm:min-h-9 min-w-11 sm:min-w-9 p-2.5 rounded transition-colors ${
streamPresentation().pauseButtonClass
}`}
title={streamPresentation().toggleTitle}
>
- {state.isPaused() ? <Play size={18} /> : <Pause size={18} />}
+ {state.isPaused() ? (
+ <Play size={18} aria-hidden="true" />
+ ) : (
+ <Pause size={18} aria-hidden="true" />
+ )}
</button>
<button
+ type="button"
onClick={state.clearLogs}
+ aria-label={SYSTEM_LOGS_PANEL_COPY.clearTitle}
+ aria-describedby={displayHelpId}
class="min-h-11 sm:min-h-9 min-w-11 sm:min-w-9 p-2.5 rounded-sm hover:bg-surface-hover text-muted transition-colors"
title={SYSTEM_LOGS_PANEL_COPY.clearTitle}
>
- <Trash2 size={18} />
+ <Trash2 size={18} aria-hidden="true" />
</button>
<div class="h-6 w-px bg-surface-hover mx-2"></div>
<button
+ type="button"
onClick={state.handleDownload}
+ aria-describedby={bundleHelpId}
class="min-h-11 sm:min-h-9 flex items-center space-x-2 px-3 py-2.5 bg-primary-600 text-white rounded-md hover:bg-primary-700 text-sm font-medium transition-colors"
>
- <Download size={16} />
+ <Download size={16} aria-hidden="true" />
<span>{SYSTEM_LOGS_PANEL_COPY.downloadLabel}</span>
</button>
</div>
</div>
+ <div class="space-y-2 text-sm text-muted">
+ <p id={levelHelpId}>{SYSTEM_LOGS_PANEL_COPY.levelHelp}</p>
+ <p id={displayHelpId}>{SYSTEM_LOGS_PANEL_COPY.displayHelp}</p>
+ <p id={bundleHelpId}>{SYSTEM_LOGS_PANEL_COPY.bundleHelp}</p>
+ </div>
</div>
{/* Terminal View */}
diff --git a/frontend-modern/src/components/Settings/__tests__/SystemLogsPanel.safety.test.tsx b/frontend-modern/src/components/Settings/__tests__/SystemLogsPanel.safety.test.tsx
new file mode 100644
index 0000000000..e5a52f38a1
--- /dev/null
+++ b/frontend-modern/src/components/Settings/__tests__/SystemLogsPanel.safety.test.tsx
@@ -0,0 +1,154 @@
+import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import { SystemLogsPanel } from '../SystemLogsPanel';
+
+const apiFetchJSON = vi.hoisted(() => vi.fn());
+vi.mock('@/utils/apiClient', () => ({ apiFetchJSON }));
+vi.mock('@/utils/logger', () => ({ logger: { debug: vi.fn(), error: vi.fn() } }));
+vi.mock('@/stores/notifications', () => ({
+ notificationStore: { success: vi.fn(), error: vi.fn() },
+}));
+
+class DisplayStream {
+ static instances: DisplayStream[] = [];
+ onmessage: ((event: { data: string }) => void) | null = null;
+ onerror: (() => void) | null = null;
+ close = vi.fn();
+
+ constructor(public readonly url: string) {
+ DisplayStream.instances.push(this);
+ }
+
+ receive(data: string) {
+ this.onmessage?.({ data });
+ }
+}
+
+async function mountPanel() {
+ const view = render(() => <SystemLogsPanel />);
+ await waitFor(() => expect(DisplayStream.instances).toHaveLength(1));
+ return { ...view, stream: DisplayStream.instances[0] };
+}
+
+describe('SystemLogsPanel control safety', () => {
+ beforeEach(() => {
+ DisplayStream.instances = [];
+ vi.stubGlobal('EventSource', DisplayStream);
+ apiFetchJSON.mockReset();
+ apiFetchJSON.mockResolvedValue({ level: 'info' });
+ });
+
+ afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+ });
+
+ it('describes the server-wide threshold at the level control without changing it on mount', async () => {
+ await mountPanel();
+ const select = screen.getByRole('combobox', { name: 'Server Log Level:' });
+ expect(select).toHaveValue('info');
+ expect(select).toHaveAccessibleDescription(/whole Pulse server/);
+ expect(select).toHaveAccessibleDescription(/Debug can include private guest names and paths/);
+ const help = document.getElementById(select.getAttribute('aria-describedby')!);
+ expect(help).toBeVisible();
+ expect(apiFetchJSON.mock.calls).toEqual([['/api/logs/level']]);
+ });
+
+ it('describes display-only pause and still receives later messages on the same stream', async () => {
+ const { stream } = await mountPanel();
+ const pause = screen.getByRole('button', { name: 'Pause Stream' });
+ expect(pause).toHaveAccessibleDescription(/Monitoring and server logging continue/);
+ expect(pause).toHaveAttribute('aria-pressed', 'false');
+ stream.receive('INFO before display pause');
+ expect(screen.getByText('INFO before display pause')).toBeVisible();
+ fireEvent.click(pause);
+ const resume = screen.getByRole('button', { name: 'Resume Stream' });
+ expect(resume).toHaveAttribute('aria-pressed', 'true');
+ expect(resume).toHaveAccessibleDescription(/Messages received while paused are not added/);
+ stream.receive('INFO received while paused');
+ expect(screen.queryByText('INFO received while paused')).toBeNull();
+ expect(stream.close).not.toHaveBeenCalled();
+ fireEvent.click(resume);
+ stream.receive('INFO after display resume');
+ expect(screen.getByText('INFO after display resume')).toBeVisible();
+ expect(DisplayStream.instances).toHaveLength(1);
+ expect(stream.url).toBe('/api/logs/stream');
+ expect(apiFetchJSON.mock.calls).toEqual([['/api/logs/level']]);
+ });
+
+ it('describes view-only clear without changing the level or closing the stream', async () => {
+ const { stream } = await mountPanel();
+ stream.receive('INFO displayed before clear');
+ const clear = screen.getByRole('button', { name: 'Clear Log Output' });
+ expect(clear).toHaveAccessibleDescription(/Pause and Clear affect this display only/);
+ fireEvent.click(clear);
+ expect(screen.queryByText('INFO displayed before clear')).toBeNull();
+ expect(screen.getByText('Waiting for log output.')).toBeVisible();
+ stream.receive('INFO displayed after clear');
+ expect(screen.getByText('INFO displayed after clear')).toBeVisible();
+ expect(stream.close).not.toHaveBeenCalled();
+ expect(screen.getByRole('combobox', { name: 'Server Log Level:' })).toHaveValue('info');
+ expect(apiFetchJSON.mock.calls).toEqual([['/api/logs/level']]);
+ });
+
+ it('keeps the full archive privacy warning visible and attached after pause and clear', async () => {
+ await mountPanel();
+ const bundle = screen.getByRole('button', { name: 'Support Bundle' });
+ expect(bundle).toHaveAccessibleDescription(
+ /server logs, configuration and environment details/,
+ );
+ expect(bundle).toHaveAccessibleDescription(/not just the lines shown here/);
+ expect(bundle).toHaveAccessibleDescription(
+ /Pausing or clearing this display does not remove them/,
+ );
+ expect(bundle).toHaveAccessibleDescription(/Keep the archive private/);
+ expect(bundle).toHaveAccessibleDescription(/manually reviewed, redacted excerpts/);
+ const warning = document.getElementById(bundle.getAttribute('aria-describedby')!);
+ expect(warning).toBeVisible();
+ fireEvent.click(screen.getByRole('button', { name: 'Pause Stream' }));
+ fireEvent.click(screen.getByRole('button', { name: 'Clear Log Output' }));
+ expect(warning).toBeVisible();
+ expect(bundle).toHaveAccessibleDescription(/Keep the archive private/);
+ expect(bundle).not.toHaveAccessibleDescription(/safe to (publish|share)/);
+ expect(apiFetchJSON.mock.calls).toEqual([['/api/logs/level']]);
+ });
+
+ it('does not turn display actions into submission of a surrounding settings form', async () => {
+ const submit = vi.fn((event: SubmitEvent) => event.preventDefault());
+ render(() => (
+ <form onSubmit={submit}>
+ <SystemLogsPanel />
+ </form>
+ ));
+ await waitFor(() => expect(DisplayStream.instances).toHaveLength(1));
+ for (const name of ['Pause Stream', 'Clear Log Output', 'Support Bundle']) {
+ expect(screen.getByRole('button', { name })).toHaveAttribute('type', 'button');
+ }
+ fireEvent.click(screen.getByRole('button', { name: 'Pause Stream' }));
+ fireEvent.click(screen.getByRole('button', { name: 'Clear Log Output' }));
+ expect(submit).not.toHaveBeenCalled();
+ });
+
+ it('keeps descriptions instance-local when more than one panel is mounted', async () => {
+ render(() => (
+ <>
+ <SystemLogsPanel />
+ <SystemLogsPanel />
+ </>
+ ));
+ await waitFor(() => expect(DisplayStream.instances).toHaveLength(2));
+ const selects = screen.getAllByRole('combobox', { name: 'Server Log Level:' });
+ expect(new Set(selects.map((select) => select.id)).size).toBe(2);
+ for (const select of selects) {
+ expect(select).toHaveAccessibleDescription(/whole Pulse server/);
+ }
+ for (const name of ['Pause Stream', 'Clear Log Output', 'Support Bundle']) {
+ const descriptions = screen
+ .getAllByRole('button', { name })
+ .map((button) => button.getAttribute('aria-describedby'));
+ expect(descriptions.every(Boolean)).toBe(true);
+ expect(new Set(descriptions).size).toBe(2);
+ for (const id of descriptions) expect(document.getElementById(id!)).toBeVisible();
+ }
+ });
+});
diff --git a/frontend-modern/src/utils/__tests__/systemLogsPresentation.test.ts b/frontend-modern/src/utils/__tests__/systemLogsPresentation.test.ts
index f769098ca2..200b2357b9 100644
--- a/frontend-modern/src/utils/__tests__/systemLogsPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/systemLogsPresentation.test.ts
@@ -12,7 +12,13 @@ describe('systemLogsPresentation', () => {
expect(SYSTEM_LOGS_PANEL_COPY).toEqual({
title: 'System Logs',
description: 'Stream live system logs and download support bundles.',
- levelLabel: 'Log Level:',
+ levelLabel: 'Server Log Level:',
+ levelHelp:
+ 'Changes logging for the whole Pulse server. Debug can include private guest names and paths. Keep the current level unless needed.',
+ displayHelp:
+ 'Pause and Clear affect this display only. Monitoring and server logging continue. This is not a backup safety pause. Messages received while paused are not added to the display.',
+ bundleHelp:
+ 'Support bundles include server logs, configuration and environment details, not just the lines shown here. Pausing or clearing this display does not remove them. Keep the archive private. Share only manually reviewed, redacted excerpts.',
clearTitle: 'Clear Log Output',
downloadLabel: 'Support Bundle',
emptyState: 'Waiting for log output.',
diff --git a/frontend-modern/src/utils/systemLogsPresentation.ts b/frontend-modern/src/utils/systemLogsPresentation.ts
index dbdd47bc2a..2351b2525a 100644
--- a/frontend-modern/src/utils/systemLogsPresentation.ts
+++ b/frontend-modern/src/utils/systemLogsPresentation.ts
@@ -13,7 +13,13 @@ export type SystemLogLevelOption = {
export const SYSTEM_LOGS_PANEL_COPY = {
title: 'System Logs',
description: 'Stream live system logs and download support bundles.',
- levelLabel: 'Log Level:',
+ levelLabel: 'Server Log Level:',
+ levelHelp:
+ 'Changes logging for the whole Pulse server. Debug can include private guest names and paths. Keep the current level unless needed.',
+ displayHelp:
+ 'Pause and Clear affect this display only. Monitoring and server logging continue. This is not a backup safety pause. Messages received while paused are not added to the display.',
+ bundleHelp:
+ 'Support bundles include server logs, configuration and environment details, not just the lines shown here. Pausing or clearing this display does not remove them. Keep the archive private. Share only manually reviewed, redacted excerpts.',
clearTitle: 'Clear Log Output',
downloadLabel: 'Support Bundle',
emptyState: 'Waiting for log output.',