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.

Keep reader-owned reporting feedback visible after long forms

pulse-triage[bot]d81c2cb615dc
diff --git a/frontend-modern/src/components/Settings/ReportingPanel.tsx b/frontend-modern/src/components/Settings/ReportingPanel.tsx
index 75a4e5befd..fd7dfdcaab 100644
--- a/frontend-modern/src/components/Settings/ReportingPanel.tsx
+++ b/frontend-modern/src/components/Settings/ReportingPanel.tsx
@@ -2,6 +2,8 @@ import { For, Show, Suspense, createMemo, createSignal, lazy, onCleanup } from '
import { getOrgID } from '@/utils/apiClient';
import { eventBus } from '@/stores/events';
import { hasFeature, runtimeCapabilitiesLoaded } from '@/stores/license';
+import { Portal } from 'solid-js/web';
+import { InlineNotice } from '@/components/shared/InlineNotice';
import FileText from 'lucide-solid/icons/file-text';
import Download from 'lucide-solid/icons/download';
import BarChart from 'lucide-solid/icons/bar-chart';
@@ -99,6 +101,7 @@ function ReportingWorkspace(props: { isCurrentReader: () => boolean }) {
const {
actionError,
successNotice,
+ clearFeedback,
canEditSchedules,
deleteReportSchedule,
deletingScheduleID,
@@ -180,15 +183,21 @@ function ReportingWorkspace(props: { isCurrentReader: () => boolean }) {
return (
<div class="space-y-6">
- <Show when={actionError()}>
- <p role="alert" class="text-sm text-warning">
- {actionError()}
- </p>
- </Show>
- <Show when={successNotice()}>
- <p role="status" class="text-sm text-success">
- {successNotice()}
- </p>
+ <Show when={actionError() || successNotice()}>
+ <Portal>
+ <div class="fixed inset-x-3 top-28 z-50 sm:left-auto sm:right-4 sm:w-96">
+ <InlineNotice
+ role={actionError() ? 'alert' : 'status'}
+ aria-live={actionError() ? 'assertive' : 'polite'}
+ tone={actionError() ? 'warning' : 'success'}
+ class="shadow-lg"
+ onDismiss={clearFeedback}
+ dismissLabel="Dismiss reporting feedback"
+ >
+ {actionError() || successNotice()}
+ </InlineNotice>
+ </div>
+ </Portal>
</Show>
<Show when={reportingCatalogLoading() && !catalogReady()}>
<OperationsPanel title="Reporting" description="Loading reporting surfaces...">
diff --git a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.reader.test.tsx b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.reader.test.tsx
index d23c2ce1e4..a3ad345e30 100644
--- a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.reader.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.reader.test.tsx
@@ -146,6 +146,9 @@ describe('Reporting reader lifetime', () => {
await screen.findByRole('alert');
expect(screen.getByRole('textbox', { name: 'Schedule name' })).toHaveValue('Private draft');
expect(api.mock.calls.filter(([, init]) => init?.method === 'POST')).toHaveLength(1);
+ await fireEvent.click(screen.getByRole('button', { name: 'Dismiss reporting feedback' }));
+ expect(screen.queryByRole('alert')).not.toBeInTheDocument();
+ expect(screen.getByRole('textbox', { name: 'Schedule name' })).toHaveValue('Private draft');
await fireEvent.click(screen.getByRole('button', { name: 'Save schedule' }));
await waitFor(() =>
expect(api.mock.calls.filter(([, init]) => init?.method === 'POST')).toHaveLength(2),
diff --git a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx
index 1c907165c8..045c86d5e1 100644
--- a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx
@@ -74,6 +74,7 @@ const baseCatalog = {
function buildState(overrides: Record<string, unknown> = {}) {
return {
+ clearFeedback: vi.fn(),
actionError: () => '',
successNotice: () => '',
canEditSchedules: () => true,
diff --git a/frontend-modern/src/components/Settings/useReportingPanelState.ts b/frontend-modern/src/components/Settings/useReportingPanelState.ts
index 1b5b588b35..ac6ac61f5a 100644
--- a/frontend-modern/src/components/Settings/useReportingPanelState.ts
+++ b/frontend-modern/src/components/Settings/useReportingPanelState.ts
@@ -596,6 +596,7 @@ export const useReportingPanelState = (isCurrentReader: () => boolean = () => tr
return {
actionError,
successNotice,
+ clearFeedback,
canEditSchedules,
closeScheduleForm,
deleteReportSchedule,