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 the cleared history hint box so hovered guests stay put

rcourtman23fdfbc493eb
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
index 87517e7399..6b5a240faf 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -1931,6 +1931,15 @@ mode, row-hover mode, history range, and first-use hint on the same state owner
for the generic surface and the Proxmox and vSphere platform compositions;
provider pages must not recreate a partial metric prop list that can enable
prefetching without exposing the matching control or discovery state.
+That first-use hint clears while the pointer is over a guest row, because the
+first populated preview marks it seen. Clearing it must not unmount it or
+change the toolbar height: wherever the hint wraps the action row onto its own
+line, removing it moved the table up under the pointer and the history lens
+retargeted the next guest. `WorkloadsFilter.tsx` therefore keeps the cleared
+hint mounted but `invisible` wherever the desktop History controls render,
+for as long as row hover stays in bars + history mode. Leaving that mode or
+remounting the filter releases the box. `WorkloadsFilter.test.tsx` pins the
+retained node and its release on a switch to Trends.
The alert-bridge patrol-trigger callback wired in `internal/api/router.go` now
short-circuits before queuing a scoped patrol when a firing alert does not meet
diff --git a/frontend-modern/browser-verification/758bbf731f948f33.json b/frontend-modern/browser-verification/758bbf731f948f33.json
new file mode 100644
index 0000000000..0aa4ba26b4
--- /dev/null
+++ b/frontend-modern/browser-verification/758bbf731f948f33.json
@@ -0,0 +1,56 @@
+{
+ "version": 1,
+ "base_sha": "0fb5ccb62b2c8b07637c09547cc7e397e82925a7",
+ "verified_at": "2026-10-06T21:51:39Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Workloads/WorkloadsFilter.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Workloads/WorkloadsFilter.tsx": "382e16198535227445f6cf823a1390502bcb24409ed2f12e19e028fa325793bf"
+ },
+ "routes": [
+ "/proxmox",
+ "/vmware"
+ ],
+ "viewports": [
+ {
+ "width": 1440,
+ "height": 1000
+ },
+ {
+ "width": 1280,
+ "height": 1000
+ },
+ {
+ "width": 1600,
+ "height": 1000
+ },
+ {
+ "width": 768,
+ "height": 1000
+ },
+ {
+ "width": 390,
+ "height": 844
+ }
+ ],
+ "states": [
+ "Private mock stack (backend + Vite on 7797/5307) built from main 0fb5ccb62b (including the Net and Disk I/O row history lens) plus this change, re-run after rebasing from 3ac5664d95, compared with the same stack on unchanged main; large mock estate (50 nodes, 10 VMs + 8 LXCs each) so the guest list matches the reported repro",
+ "Fresh browser context so the first-use 'Hover a guest to preview history' hint is unseen; bars display mode with history row hover (the defaults)",
+ "Before, /proxmox at 1440 and 1280 with the page unscrolled: the hint wraps the filter action row onto its own line (filter bar 138px); after hovering artifact-cache-310 (675) the hint unmounted, the bar shrank to 102px, the row moved up 36px, pointer events went enter 675, leave 675, enter 679, and the history lens ended on auth-service-314 (679)",
+ "Before, /proxmox at 1600: hint inline on one row, bar 102px both ways, no shift",
+ "After, /proxmox at 1024, 1280, 1366, 1440, 1600 and 1920, both unscrolled and with a mid-list row scrolled to the centre: row y shift 0, filter bar height unchanged (138 or 102), a single pointerenter on the hovered row, and data-history-lens-active only on the hovered guest; the hint is still mounted with visibility hidden",
+ "After, /vmware at 1024 (wrapped, 138px) and 1440 (inline): row shift 0 and the lens stays on the hovered VM",
+ "After, 768: the hint span is display none so it has no box either way; bar 174px unchanged and the lens stays on the hovered row. 390: the mobile toolbar never renders the hint (54px before and after reload)",
+ "After the first preview, a reload shows no hint and the compact one-line toolbar (102px at 1440)",
+ "After the first preview, switching View > Metrics to Trends removes the hidden span instead of leaving a gap, and switching back to Bars does not bring it back"
+ ],
+ "interactions": [
+ "Moved the real mouse onto a guest row's name cell (clear of the expand chevron) and waited for the populated history preview, recording the row bounding box, filter bar height, scroll position, pointerenter/pointerleave events and [data-history-lens-active] rows before and after",
+ "Repeated the hover with the page unscrolled and with the target row scrolled to the viewport centre",
+ "Reloaded the page after the first preview to check the next-visit toolbar",
+ "Opened View and switched Metrics between Trends and Bars after the hint had cleared",
+ "Captured screenshots of the toolbar and first rows before and after hover on main and on this change"
+ ]
+}
diff --git a/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx b/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx
index 75814e225a..34d226b784 100644
--- a/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx
+++ b/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx
@@ -294,6 +294,20 @@ export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {
buildWorkloadSearchSuggestions(props.searchSuggestionWorkloads?.() ?? []),
);
+ // The history hint clears on the first populated row preview, while the
+ // pointer is over the table. Once shown, it keeps its box for as long as row
+ // hover previews history: removing it could unwrap the action row and slide
+ // the hovered guest out from under the pointer, retargeting the lens to the
+ // next row. Leaving bars + history hover, or remounting, releases the box.
+ const historyHintSlotReserved = createMemo<boolean>(
+ (reserved) =>
+ props.metricHistoryHintVisible?.() === true ||
+ (reserved &&
+ props.metricDisplayMode?.() === 'bars' &&
+ (props.metricHoverMode?.() ?? 'history') === 'history'),
+ false,
+ );
+
return (
<FilterBar
role="group"
@@ -456,9 +470,11 @@ export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {
}
>
<div class="flex items-center gap-2">
- <Show when={props.metricHistoryHintVisible?.()}>
+ <Show when={historyHintSlotReserved()}>
<span
- class="hidden whitespace-nowrap text-[11px] lg:inline"
+ class={`hidden whitespace-nowrap text-[11px] lg:inline ${
+ props.metricHistoryHintVisible?.() ? '' : 'invisible'
+ }`.trim()}
data-testid="workload-history-hover-hint"
>
Hover a guest to preview history
diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx
index a17d016c95..d74fcddb71 100644
--- a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx
@@ -1,5 +1,6 @@
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { render, screen, cleanup, fireEvent, within } from '@solidjs/testing-library';
+import { createSignal } from 'solid-js';
import { WorkloadsFilter } from '../WorkloadsFilter';
import workloadsFilterSource from '../WorkloadsFilter.tsx?raw';
import {
@@ -330,6 +331,39 @@ describe('WorkloadsFilter', () => {
expect(screen.queryByTestId('workload-history-hover-hint')).not.toBeInTheDocument();
});
+ it('keeps the cleared history hint box so the guest table does not move under the pointer', () => {
+ const [hintVisible, setHintVisible] = createSignal(true);
+ const [displayMode, setDisplayMode] = createSignal<'bars' | 'sparklines'>('bars');
+ const { unmount } = render(() => (
+ <WorkloadsFilter
+ {...makeProps({
+ metricDisplayMode: displayMode,
+ metricHoverMode: () => 'history',
+ metricHistoryRange: () => '1h',
+ setMetricHistoryRange: vi.fn(),
+ metricHistoryHintVisible: hintVisible,
+ })}
+ />
+ ));
+
+ const hint = screen.getByTestId('workload-history-hover-hint');
+ expect(hint).not.toHaveClass('invisible');
+
+ // The first populated row preview marks the hint seen while the pointer
+ // is still over a guest row.
+ setHintVisible(false);
+ expect(screen.getByTestId('workload-history-hover-hint')).toBe(hint);
+ expect(hint).toHaveClass('invisible');
+ expect(hint).toHaveTextContent('Hover a guest to preview history');
+
+ // Leaving history hover releases the box instead of leaving a gap.
+ setDisplayMode('sparklines');
+ expect(screen.queryByTestId('workload-history-hover-hint')).not.toBeInTheDocument();
+ setDisplayMode('bars');
+ expect(screen.queryByTestId('workload-history-hover-hint')).not.toBeInTheDocument();
+ unmount();
+ });
+
it('restores detailed bar hover and hides the inactive history range', () => {
const setMetricHoverMode = vi.fn();
render(() => (