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(ui): restore focus after inline detail closes

rcourtman662bb4f19466
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index a8ea1f1717..10a4e43351 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,27 +1,38 @@
{
"version": 1,
- "base_sha": "c42399e2c389ff29652e95a5bb672fc09b545173",
- "verified_at": "2026-08-05T23:17:45Z",
+ "base_sha": "1b8bb4e91c905de19931634ab79e9e95960f811a",
+ "verified_at": "2026-08-05T23:31:48Z",
"result": "passed",
- "changed_paths": ["frontend-modern/src/AppLayout.tsx"],
+ "changed_paths": ["frontend-modern/src/components/shared/InlineDetailTableRow.tsx"],
"content_sha256": {
- "frontend-modern/src/AppLayout.tsx": "1c439db068a2c751e3302019e8234b8fad9235b3938520eb27b5de596de9851f"
+ "frontend-modern/src/components/shared/InlineDetailTableRow.tsx": "aeb0e3d0d5946d5dc5929d2d5ce9ae1a39d1c48fc8cc35db2332059d577d5c9e"
},
- "routes": ["/vmware/overview"],
+ "routes": [
+ "/standalone/machines",
+ "/proxmox/backups?view=coverage",
+ "/proxmox/ceph",
+ "/proxmox/mail"
+ ],
"viewports": [
- { "width": 1920, "height": 900 },
+ { "width": 1920, "height": 1080 },
+ { "width": 1280, "height": 820 },
+ { "width": 768, "height": 820 },
+ { "width": 390, "height": 820 },
{ "width": 320, "height": 820 }
],
"states": [
- "vSphere hosts and workloads tables with the Assistant launcher visible",
- "phone launcher rendered as a 32 by 44 pixel right-edge tab",
- "phone Assistant overlay open over the vSphere overview",
- "desktop Assistant launcher and overlay"
+ "collapsed and expanded Agent machine resource details",
+ "collapsed and expanded Proxmox backup coverage evidence",
+ "auto-opened and closed single-cluster Ceph details",
+ "collapsed, expanded, and closed Mail Gateway details",
+ "desktop, tablet, narrow-phone, and minimum-width responsive table columns"
],
"interactions": [
- "opened Pulse Assistant from the vSphere overview at phone and desktop widths",
- "closed Pulse Assistant with its header control at phone and desktop widths",
- "confirmed each close returned keyboard focus to the vSphere Assistant launcher",
- "measured both visible tables and confirmed they exactly matched their containers with zero document overflow"
+ "opened and closed the Agent machine resource drawer and confirmed focus returned to its disclosure",
+ "expanded and collapsed backup coverage evidence and confirmed focus remained on its disclosure",
+ "closed the auto-opened Ceph cluster drawer and confirmed focus returned to its disclosure",
+ "opened and closed the Mail Gateway drawer and confirmed focus returned to its disclosure",
+ "measured every visible table at all five viewports and confirmed table width matched its container with zero document overflow",
+ "visually inspected the final Mail Gateway table at 1920 and 320 pixels"
]
}
diff --git a/frontend-modern/src/components/shared/InlineDetailTableRow.tsx b/frontend-modern/src/components/shared/InlineDetailTableRow.tsx
index 4286999223..74cb591f65 100644
--- a/frontend-modern/src/components/shared/InlineDetailTableRow.tsx
+++ b/frontend-modern/src/components/shared/InlineDetailTableRow.tsx
@@ -39,6 +39,22 @@ export function InlineDetailTableRow(props: InlineDetailTableRowProps) {
const [effectiveColspan, setEffectiveColspan] = createSignal(requestedColspan());
let detailRow: HTMLTableRowElement | undefined;
+ onCleanup(() => {
+ const activeElement = document.activeElement;
+ const cellId = local.cellId;
+ if (!cellId || !activeElement || !detailRow?.contains(activeElement)) return;
+
+ // A drawer close commonly disposes the button that currently owns focus.
+ // Restore it to the disclosure controlling this detail row once Solid has
+ // removed the row, so keyboard users stay anchored to the same resource.
+ queueMicrotask(() => {
+ const disclosure = Array.from(
+ document.querySelectorAll<HTMLButtonElement>('button[aria-controls]'),
+ ).find((button) => button.getAttribute('aria-controls') === cellId);
+ disclosure?.focus();
+ });
+ });
+
const syncColspanToVisibleSummaryCells = () => {
const summaryRow = detailRow?.previousElementSibling;
if (!(summaryRow instanceof HTMLTableRowElement)) {
diff --git a/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx b/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx
index 61b8865541..b443952c34 100644
--- a/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx
+++ b/frontend-modern/src/components/shared/__tests__/InlineDetailTableRow.test.tsx
@@ -1,4 +1,5 @@
-import { render, screen, waitFor } from '@solidjs/testing-library';
+import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
+import { Show, createSignal } from 'solid-js';
import { describe, expect, it, vi } from 'vitest';
import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';
@@ -82,4 +83,38 @@ describe('InlineDetailTableRow', () => {
);
});
});
+
+ it('restores focus to the controlling disclosure when focused detail content closes', async () => {
+ const Fixture = () => {
+ const [open, setOpen] = createSignal(true);
+ return (
+ <Table>
+ <TableBody>
+ <tr>
+ <td>
+ <button type="button" aria-controls="detail-row-focus">
+ Resource details
+ </button>
+ </td>
+ </tr>
+ <Show when={open()}>
+ <InlineDetailTableRow cellId="detail-row-focus" colspan={1}>
+ <button type="button" onClick={() => setOpen(false)}>
+ Close details
+ </button>
+ </InlineDetailTableRow>
+ </Show>
+ </TableBody>
+ </Table>
+ );
+ };
+
+ render(() => <Fixture />);
+ const disclosure = screen.getByRole('button', { name: 'Resource details' });
+ const close = screen.getByRole('button', { name: 'Close details' });
+ close.focus();
+ await fireEvent.click(close);
+
+ await waitFor(() => expect(disclosure).toHaveFocus());
+ });
});
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCephTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCephTable.test.tsx
new file mode 100644
index 0000000000..3c5f2603e7
--- /dev/null
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCephTable.test.tsx
@@ -0,0 +1,72 @@
+import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
+import { afterEach, describe, expect, it } from 'vitest';
+
+import type { Resource } from '@/types/resource';
+import { ProxmoxCephTable } from '../ProxmoxCephTable';
+
+const makeCluster = (id: string): Resource => ({
+ id,
+ type: 'ceph',
+ name: id,
+ displayName: id,
+ platformId: 'homelab',
+ platformType: 'proxmox-pve',
+ sourceType: 'api',
+ status: 'online',
+ lastSeen: 1_700_000_000_000,
+ disk: { total: 10_000, used: 4_000, free: 6_000, current: 40 },
+ ceph: {
+ healthStatus: 'HEALTH_OK',
+ numMons: 3,
+ numMgrs: 2,
+ numOsds: 4,
+ numOsdsUp: 4,
+ numOsdsIn: 4,
+ numPGs: 128,
+ pools: [],
+ services: [],
+ },
+});
+
+afterEach(cleanup);
+
+describe('ProxmoxCephTable', () => {
+ it('returns focus to the cluster disclosure after closing an auto-opened detail', async () => {
+ render(() => (
+ <ProxmoxCephTable
+ resources={[makeCluster('ceph-main')]}
+ emptyIcon={<span />}
+ emptyTitle="No Ceph clusters"
+ emptyDescription="No clusters"
+ />
+ ));
+
+ const disclosure = screen.getByRole('button', { name: 'Collapse details for ceph-main' });
+ const close = screen.getByRole('button', { name: 'Close ceph cluster drawer' });
+ close.focus();
+ await fireEvent.click(close);
+
+ await waitFor(() => expect(disclosure).toHaveFocus());
+ expect(disclosure).toHaveAccessibleName('Expand details for ceph-main');
+ });
+
+ it('returns focus to the disclosure for a cluster opened by the user', async () => {
+ render(() => (
+ <ProxmoxCephTable
+ resources={[makeCluster('ceph-main'), makeCluster('ceph-lab')]}
+ emptyIcon={<span />}
+ emptyTitle="No Ceph clusters"
+ emptyDescription="No clusters"
+ />
+ ));
+
+ const disclosure = screen.getByRole('button', { name: 'Expand details for ceph-lab' });
+ await fireEvent.click(disclosure);
+ const close = screen.getByRole('button', { name: 'Close ceph cluster drawer' });
+ close.focus();
+ await fireEvent.click(close);
+
+ await waitFor(() => expect(disclosure).toHaveFocus());
+ expect(disclosure).toHaveAccessibleName('Expand details for ceph-lab');
+ });
+});