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.

Bind History browser proof and cover accessible selection loading

pulse-triage[bot]93531c9cd3bf
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index 24e4d168db..ded7b81d04 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,7 +1,7 @@
{
"version": 1,
- "base_sha": "46d2727828d20680cdc6d3a1ff1b419c3ec2bca4",
- "verified_at": "2026-10-02T14:15:24.462877+00:00",
+ "base_sha": "9dc6bd0ffe4de520bf9afc43ad10fb169026325d",
+ "verified_at": "2026-10-02T14:15:24.462877Z",
"result": "passed",
"changed_paths": [
"frontend-modern/src/components/shared/useHistoryChartState.ts"
diff --git a/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx b/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx
index 204f2cc86f..e8f2f7c271 100644
--- a/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx
+++ b/frontend-modern/src/components/shared/__tests__/HistoryChart.test.tsx
@@ -1,5 +1,7 @@
import { describe, expect, it, vi } from 'vitest';
-import { fireEvent, render, screen } from '@solidjs/testing-library';
+import { createSignal } from 'solid-js';
+import { ChartsAPI } from '@/api/charts';
+import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
import historyChartHeaderSource from '@/components/shared/HistoryChartHeader.tsx?raw';
import historyChartHoverGroupSource from '@/components/shared/HistoryChartHoverGroup.tsx?raw';
import historyChartOverlaySource from '@/components/shared/HistoryChartOverlay.tsx?raw';
@@ -160,6 +162,24 @@ describe('HistoryChart', () => {
expect(description).toHaveTextContent('Minimum 8.0%. Maximum 35.0%.');
});
+ it('removes previous-target values from the accessible chart while the next target loads', async () => {
+ const request = vi.mocked(ChartsAPI.getMetricsHistory);
+ request.mockResolvedValueOnce({
+ points: [{ timestamp: 1000, value: 10, min: 10, max: 10 }],
+ source: 'store',
+ } as never);
+ const [target, setTarget] = createSignal('a');
+ render(() => <HistoryChart resourceType="agent" resourceId={target()} metric="cpu" unit="%" />);
+ const chart = screen.getByRole('img', { name: 'History chart' });
+ const description = document.getElementById(chart.getAttribute('aria-describedby')!)!;
+ await waitFor(() => expect(description).toHaveTextContent('10.0%'));
+ request.mockImplementationOnce(() => new Promise(() => {}));
+ setTarget('b');
+ expect(description).toHaveTextContent('Loading');
+ expect(description).not.toHaveTextContent('10.0%');
+ expect(screen.queryByText('Min')).not.toBeInTheDocument();
+ });
+
it('synchronizes the hovered timestamp across charts in the same group', () => {
const rectSpy = vi.spyOn(HTMLCanvasElement.prototype, 'getBoundingClientRect').mockReturnValue({
x: 0,