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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Build every record drawer on the shared record panel
[email protected]750292e21dcc
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex d9ce114795..2140384fe0 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -10154,3 +10154,14 @@ opaque period markers add no agent identity, enrollment, command or remediationpath. Failure to retain a tally cannot stop delivery. The real scheduler retry,handler recreation and unreadable-tally cases in `reporting_activity_test.go`verify that measurement remains subordinate to the existing report lifecycle.++Agent Doctor's inline target rows are record drawers like every other inline+detail: one target open at a time (a lone target still opens by itself), the+row's disclosure names its detail cell through `aria-controls` so focus+returns to it on close, and the detail is an `InlineDetailPanel` headed by the+target name with the same status the row badge shows and a one-line verdict.+Reasons, repair and re-enrol guidance, uninstall and safe-profile guidance and+the credential reveal render as shared `InlineNotice`s; agent and security+facts as a `DetailSectionTable`; the connection id and identity evidence sit+in a closed Details disclosure. No diagnosis, repair or credential flow+changes: this is presentation only.diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex e0c6f237c3..d779595e2a 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -10019,3 +10019,16 @@ than a pool-local `FormSelect`. The guest drawer's embedded disk detail keepsits `FormSelect`. Guardrails that pinned the retired pool card classes now pinthe drawer pieces the pool Overview composes (attention section, Worthchecking, drawer history, closed Details of `DetailSectionTable` sections).++`features/platformPage/RecordOwnerLink.tsx` is the one owner link for record+drawers: an `InlineDetailPanel` `actions` button, styled as a drawer header+action, that opens the object a record is about through+`buildResourcePagePath`. It renders only when that path carries a parameter+the target page reads to open or filter to the object (`buildRecordOwnerPath`),+so a record never offers a link that lands on a whole tab. Platform record+drawers compose it instead of hand-built anchors, and every record drawer is+an `InlineDetailPanel` inside `InlineDetailTableRow`: the Docker Swarm tables+share one panel in `DockerNativeTableShared.tsx`, Kubernetes records share+`KubernetesRecordDetail.tsx`, and hand-written `dl`/grid detail rows are+retired from Docker networks and storage usage, Proxmox replication, coverage+and recoverable points, and Agent Doctor.diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 99c9fbebeb..8b4ba53e13 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -7114,3 +7114,13 @@ pool chart, the disk drawer's own History and Live I/O sections and thepool-local range picker are retired; no field was dropped. The guest drawer'sembedded physical-disk detail (`GuestPhysicalDisks` -> `DiskDetail`) keeps itsexisting layout for now.++The Backups record drawers follow the shared record panel. Replication jobs+lead with a failure, then Job, Route and Schedule, keyed by job id and linking+to the guest. Coverage opens one workload at a time across the live and+unmatched tables, leads with restore evidence (location and details wrap),+keeps provider evidence as a section and links to a matched guest.+Recoverable restore points, which had no drawer and lost their location on+phones, now open a record drawer with source, location, created, size, state,+verification and protection. Coverage posture, restore evidence and recovery+rules are unchanged.diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex c1b82c3f0c..c6afe568e0 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -8614,3 +8614,18 @@ facts line. Docker image and volume drawers describe the image or volume (updatecheck, consumers, size, tags, digests; driver, scope, mountpoint, labels), withan available or failed update check lifted. Copyable identifiers wrap. Thischanges presentation only: no status, alert or ownership rule moves.++Platform record drawers (alerts, events, tasks, services, configs, secrets,+networks, replication jobs, storage usage, vSphere activity) are+`InlineDetailPanel`s headed by their subject with the row's own status, a+plain one-line summary, wrapping sections and, where the app has a route that+focuses the owning object, an "Open <name>" link (`RecordOwnerLink`, built on+`buildResourcePagePath`; it is omitted rather than shown when the target page+cannot focus that object). The five Swarm tables share one record panel in+`DockerNativeTableShared.tsx` (human dates, every label, the reporting host).+Kubernetes Events, ConfigMaps, Secrets and RBAC objects open record drawers+instead of the full object drawer, so an event shows its message, reason,+count and involved object and no longer offers maintenance windows; a+Secret's key names and values are never shown. Namespaces keep the object+drawer because they carry alerts. No resource identity, status or alert rule+changes.diff --git a/frontend-modern/browser-verification/09384ee730ce67fa.json b/frontend-modern/browser-verification/09384ee730ce67fa.jsonnew file mode 100644index 0000000000..d896f2fe1a--- /dev/null+++ b/frontend-modern/browser-verification/09384ee730ce67fa.json@@ -0,0 +1,105 @@+{+ "version": 1,+ "base_sha": "a98b5a69dd576b55fe67795fedaf17ae0460dc19",+ "verified_at": "2026-10-22T14:10:26Z",+ "result": "passed",+ "changed_paths": [+ "frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx",+ "frontend-modern/src/features/docker/DockerAlertsTable.tsx",+ "frontend-modern/src/features/docker/DockerConfigsTable.tsx",+ "frontend-modern/src/features/docker/DockerNativeTableShared.tsx",+ "frontend-modern/src/features/docker/DockerNetworksTable.tsx",+ "frontend-modern/src/features/docker/DockerSecretsTable.tsx",+ "frontend-modern/src/features/docker/DockerServicesTable.tsx",+ "frontend-modern/src/features/docker/DockerStorageUsageTable.tsx",+ "frontend-modern/src/features/docker/DockerSwarmNodesTable.tsx",+ "frontend-modern/src/features/docker/DockerTasksTable.tsx",+ "frontend-modern/src/features/kubernetes/KubernetesAlertsTable.tsx",+ "frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsx",+ "frontend-modern/src/features/kubernetes/KubernetesEventsTable.tsx",+ "frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsx",+ "frontend-modern/src/features/kubernetes/KubernetesRecordDetail.tsx",+ "frontend-modern/src/features/platformPage/RecordOwnerLink.tsx",+ "frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx",+ "frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx",+ "frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx",+ "frontend-modern/src/features/proxmox/proxmoxBackupWorkloadSubject.ts",+ "frontend-modern/src/features/standalone/AvailabilityFleetView.tsx",+ "frontend-modern/src/features/vmware/VsphereActivityTable.tsx",+ "frontend-modern/src/features/vmware/VsphereAlertsTable.tsx"+ ],+ "content_sha256": {+ "frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx": "a78469a312a454f6433d6e040793fa307cab2e6b6c75cd7a37e893b18ea269cf",+ "frontend-modern/src/features/docker/DockerAlertsTable.tsx": "e80b17ba49a95be1a9af0b6282814a7bed74b47201816e61bf6e39b6a73fad20",+ "frontend-modern/src/features/docker/DockerConfigsTable.tsx": "9c6a1c2022ec012c34aba05be576afece10b7e9f14d944226e80c8521acfa589",+ "frontend-modern/src/features/docker/DockerNativeTableShared.tsx": "0104a773fb5d9d374205576cdbe8c4fe12dc1f68cfe7d6ce3dd385c43a9f0de8",+ "frontend-modern/src/features/docker/DockerNetworksTable.tsx": "01d491360509d40f0df14604d55ad98fc1857c2834c2ef82a39cc31dcea3829b",+ "frontend-modern/src/features/docker/DockerSecretsTable.tsx": "4ba608118ea27c520890d1cae8c813b5960e040a7b581b5af450b247c172d4e9",+ "frontend-modern/src/features/docker/DockerServicesTable.tsx": "5db02e6af7a84eeb99a63d9f13c74e3f2511be8e6dff74532d455902d8cd4715",+ "frontend-modern/src/features/docker/DockerStorageUsageTable.tsx": "7061d17be66251c0870d1f714b158151ad4f353cac5281a3bdcbd112894b9aa6",+ "frontend-modern/src/features/docker/DockerSwarmNodesTable.tsx": "28ba2c1703d85fccc7837180895599e67e0d024bb8a39e253b5bcc03fd1322c7",+ "frontend-modern/src/features/docker/DockerTasksTable.tsx": "3e0b1dbd12a68e388bf2f31a11bef66d8117995aeccdaeffd31aa053f0583fda",+ "frontend-modern/src/features/kubernetes/KubernetesAlertsTable.tsx": "3954d1b0e8a65b19c9a92160f7bad919b741c326542fab6b08ea11b4abfd7155",+ "frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsx": "d852dd0d6eb8819fb9cab16514e31bd005143fc00748f3f6aa6af186afe3a8a0",+ "frontend-modern/src/features/kubernetes/KubernetesEventsTable.tsx": "4ce65ce2eaa0eab2d92658e96015b81607fcb6fe61fd86b4db3bb566c01ec6fe",+ "frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsx": "9597edd60807b423a51c6c65f050ba0861492f2d4cb8f877310f609c050fe69b",+ "frontend-modern/src/features/kubernetes/KubernetesRecordDetail.tsx": "44182046fb5f1bb4ac363d80bbf320972721a7a8e59c8feb7ec41d402efa94c5",+ "frontend-modern/src/features/platformPage/RecordOwnerLink.tsx": "41ef5b4ec32697d1994ca1ae49b89fd277fd8fb05cafc9ed2ba72cfecad51e0a",+ "frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx": "f11aaeda23858b6d77493ad43751ca1a7f1208965933c881e22416b3f9c9851d",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx": "34c3db2d81da3a34b1e6bd2f63c17b5ad9bd16dcfbf41c225c92965be68b5da9",+ "frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx": "ea2d3585b35fc02b0eb6da566c4eb9380f4a292209aa1a3ba068d55b93dffd4b",+ "frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx": "156c5713eccd3014725f5fac0eea098c7b12b51d9735677bf0d1b998020f2334",+ "frontend-modern/src/features/proxmox/proxmoxBackupWorkloadSubject.ts": "0799fcbda6713bfce94934f6c23b131e7caab2b22e92815a678354cdf69f7f4d",+ "frontend-modern/src/features/standalone/AvailabilityFleetView.tsx": "9a4c27a4011e6af8d7cb2b0e1c4205adb639fcfd0e7f9692ef99ce43c16addb0",+ "frontend-modern/src/features/vmware/VsphereActivityTable.tsx": "7193fa08b5d98bfe8dab2c365e4b8e98ada19bb456edbefab6a3e4979c913396",+ "frontend-modern/src/features/vmware/VsphereAlertsTable.tsx": "91a55096512cf3ae6ac744ca397707a3cbe721aacc51e0186bc94adee23aa38e"+ },+ "routes": [+ "/docker/networks",+ "/docker/storage",+ "/docker/swarm",+ "/kubernetes/configuration",+ "/kubernetes/events",+ "/proxmox/replication",+ "/proxmox/backups/coverage",+ "/proxmox/backups/date",+ "/truenas/overview",+ "/truenas/services",+ "/truenas/protection",+ "/vmware/overview",+ "/vmware/health",+ "/vmware/activity",+ "/standalone/availability"+ ],+ "viewports": [+ {+ "width": 1440,+ "height": 900+ },+ {+ "width": 390,+ "height": 844+ }+ ],+ "states": [+ "Embedded production build of this commit on the full mock estate, signed in through the real login; first drawer of every expandable table on each route opened and compared with the same probe on origin/main",+ "Docker Swarm services, tasks, nodes, secrets and configs, Docker networks and storage usage, and Proxmox replication and coverage drawers (no header before) now open as record drawers headed by their subject with the row's own status dot and a collapse header",+ "Proxmox recoverable restore points, which had no drawer, open one with source, location, created, size, state and verification",+ "Kubernetes events open a record drawer headed by the involved object with the event message as summary; ConfigMaps and RBAC objects open record drawers without a Manage tab",+ "TrueNAS and vSphere alert, activity, service and protection drawers: clipped values 2-3 -> 0 at both widths",+ "Drawer dot equals row dot on every drawer probed; phone drawer content equals the table scroll shell (362/362)",+ "No console or page errors on any route at either width"+ ],+ "interactions": [+ "Disclosure button and whole-row click open each drawer; opening a second row closes the first, including Coverage, which previously kept two open",+ "Header click collapses each record drawer",+ "Availability fleet tiles act as disclosures for the shared drawer"+ ],+ "browser": {+ "client": "playwright 1.62.1",+ "engine": "Chromium",+ "version": "chromium-1234 headless"+ },+ "scope": "Full authenticated application on a mock estate; mock data, not live provider connections. Agent Doctor rows covered by component tests, not this browser pass."+}diff --git a/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx b/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsxindex b5a7b37bc2..f85eb09027 100644--- a/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx@@ -1,5 +1,5 @@import { For, Show, createEffect, createMemo, createSignal, type Component } from 'solid-js';-import { ChevronDown, ChevronLeft, ChevronRight, RefreshCw } from 'lucide-solid';+import { ChevronLeft, RefreshCw } from 'lucide-solid';import { Button, CommandCopyButton } from '@/components/shared/Button';import { FormSelect } from '@/components/shared/FormSelect';import {@@ -11,6 +11,18 @@ import {TableRow,} from '@/components/shared/Table';import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';+import {+ DetailSectionTable,+ InlineDetailPanel,+ compactDetailRows,+ compactDetailSections,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { InlineNotice } from '@/components/shared/InlineNotice';+import { SummaryRowActionButton } from '@/components/shared/SummaryRowActionButton';+import { TechnicalDetailsDisclosure } from '@/components/shared/TechnicalDetailsDisclosure';+import type { StatusIndicatorVariant } from '@/utils/status';import { copyToClipboard } from '@/utils/clipboard';import { formatRelativeTime } from '@/utils/format';import { useRelativeTimeNow } from '@/utils/relativeTimeClock';@@ -42,36 +54,63 @@ interface InfrastructureAgentDoctorPageProps {onRetryDiagnostics?: () => void;}+// The row badge and the drawer's status dot read from this one table.const STATUS_PRESENTATION: Record<InfrastructureAgentDoctorStatus,- { label: string; badgeClass: string }+ { label: string; badgeClass: string; variant: StatusIndicatorVariant }> = {healthy: {label: 'Healthy',+ variant: 'success',badgeClass: 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900/25 dark:text-emerald-200',},waiting: {+ variant: 'info',label: 'Waiting for updater',badgeClass: 'bg-blue-100 text-blue-800 dark:bg-blue-900/25 dark:text-blue-200',},warning: {+ variant: 'warning',label: 'Needs attention',badgeClass: 'bg-amber-100 text-amber-800 dark:bg-amber-900/25 dark:text-amber-200',},critical: {+ variant: 'danger',label: 'Critical',badgeClass: 'bg-rose-100 text-rose-800 dark:bg-rose-900/25 dark:text-rose-200',},removed: {+ variant: 'muted',label: 'Removed',badgeClass: 'bg-surface-alt text-muted',},unknown: {+ variant: 'muted',label: 'Unknown',badgeClass: 'bg-surface-alt text-base-content',},};+const doctorDetailRowId = (target: InfrastructureAgentDoctorTarget): string =>+ `agent-doctor-detail-${target.key.replace(/[^A-Za-z0-9_-]/g, '-')}`;++// The drawer's one-line verdict; the reasons themselves follow as notices.+const doctorTargetSummary = (target: InfrastructureAgentDoctorTarget): string => {+ const count = target.reasons.length;+ if (count > 0) return `${count} ${count === 1 ? 'issue' : 'issues'} to look at`;+ return target.status === 'healthy'+ ? 'No fleet-health issues detected.'+ : 'Pulse has not received a structured diagnostic for this agent yet. This usually clears after its next report.';+};++// Evidence reads "Hostname: host-1"; the label goes in the label column.+const evidenceDetailRow = (item: string) => {+ const separator = item.indexOf(': ');+ return separator > 0+ ? makeDetailRow(item.slice(0, separator), item.slice(separator + 2), { wrap: true })+ : makeDetailRow('Evidence', item, { wrap: true });+};+const formatLastSeen = (value?: number | string | null): string | undefined => {if (!value) return undefined;const timestamp = typeof value === 'number' ? value : Date.parse(value);@@ -192,12 +231,11 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorPreturn props.targets.filter((target) => target.status === filter);});- // A lone target (the common case when a platform page deep-links one stale- // agent) starts expanded so its diagnosis and update command are immediately- // visible; larger fleets start collapsed and expand per row.- const [expansionOverrides, setExpansionOverrides] = createSignal<ReadonlyMap<string, boolean>>(- new Map(),- );+ // One target open at a time, like every other drawer table. A lone target+ // (the common case when a platform page deep-links one stale agent) starts+ // open so its diagnosis and update command are immediately visible; larger+ // fleets start collapsed. `undefined` is that default, `null` is closed.+ const [openTargetId, setOpenTargetId] = createSignal<string | null | undefined>(undefined);const [reenrollPendingId, setReenrollPendingId] = createSignal('');const [runnerCredentialPendingKey, setRunnerCredentialPendingKey] = createSignal('');const [issuedRunnerCredentialKeys, setIssuedRunnerCredentialKeys] = createSignal<@@ -285,14 +323,14 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorPsetReenrollPendingId('');}};- const isExpanded = (target: InfrastructureAgentDoctorTarget) =>- expansionOverrides().get(target.connectionId) ?? props.targets.length === 1;- const toggleExpanded = (target: InfrastructureAgentDoctorTarget) => {- setExpansionOverrides((previous) => {- const next = new Map(previous);- next.set(target.connectionId, !isExpanded(target));- return next;- });+ const isExpanded = (target: InfrastructureAgentDoctorTarget) => {+ const open = openTargetId();+ return open === undefined ? props.targets.length === 1 : open === target.connectionId;+ };+ const toggleExpanded = (target: InfrastructureAgentDoctorTarget) =>+ setOpenTargetId(isExpanded(target) ? null : target.connectionId);+ const closeTarget = (target: InfrastructureAgentDoctorTarget) => {+ if (isExpanded(target)) setOpenTargetId(null);};return (@@ -542,29 +580,83 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorPconst uninstallHandoff = () =>getInfrastructureAgentDoctorUninstallHandoff(target);const expanded = () => isExpanded(target);+ const detailRowId = () => doctorDetailRowId(target);+ const factSections = (): DetailSection[] =>+ compactDetailSections([+ {+ label: 'Agent',+ rows: compactDetailRows([+ makeDetailRow('System', target.contextLabel, { wrap: true }),+ makeDetailRow('Version', target.currentVersion),+ makeDetailRow('Target version', target.expectedVersion),+ makeDetailRow(+ 'Last seen',+ lastSeen() ? `${lastSeen()} (${lastSeenRelative()})` : undefined,+ { wrap: true },+ ),+ makeDetailRow('Updater', target.updaterLabel, { wrap: true }),+ makeDetailRow(+ 'Profile',+ target.profileLabel+ ? [target.profileLabel, target.profileVersionLabel]+ .filter(Boolean)+ .join(' ')+ : undefined,+ { wrap: true },+ ),+ ]),+ },+ {+ label: 'Security',+ rows: compactDetailRows([+ makeDetailRow('Privilege', target.privilegeLabel, { wrap: true }),+ target.status !== 'removed'+ ? makeDetailRow(+ 'Safe collector',+ target.safeCollector ? 'Confirmed' : 'Not confirmed',+ { tone: target.safeCollector ? 'success' : 'warning' },+ )+ : null,+ makeDetailRow('Action runner', target.actionRunnerPosture.join(' · '), {+ wrap: true,+ }),+ makeDetailRow(+ 'Runner credential',+ target.actionRunnerCredentialEligible+ ? undefined+ : target.actionRunnerCredentialBlockReason,+ { wrap: true },+ ),+ ]),+ },+ ]);+ const evidenceSections = (): DetailSection[] =>+ compactDetailSections([+ {+ label: 'Connection',+ rows: compactDetailRows([+ makeDetailRow('Connection ID', target.connectionId, { wrap: true }),+ ]),+ },+ {+ label: 'Identity evidence',+ rows: compactDetailRows(target.evidence.map(evidenceDetailRow)),+ },+ ]);return (<><TableRow class="cursor-pointer" onClick={() => toggleExpanded(target)}><TableCell class="py-1.5 pl-3 pr-3"><div class="flex items-center gap-1.5">- <button- type="button"- class="inline-flex items-center rounded-sm p-0.5 text-muted transition-colors hover:bg-surface-alt hover:text-base-content"- aria-expanded={expanded()}- aria-label={`${expanded() ? 'Hide' : 'Show'} details for ${target.displayName}`}- onClick={(event) => {- event.stopPropagation();- toggleExpanded(target);- }}- >- <Show- when={expanded()}- fallback={<ChevronRight class="h-3.5 w-3.5" />}- >- <ChevronDown class="h-3.5 w-3.5" />- </Show>- </button>+ <SummaryRowActionButton+ kind="disclosure"+ expanded={expanded()}+ subjectLabel={`details for ${target.displayName}`}+ controlsId={detailRowId()}+ hideWhenRowTappableOnMobile={false}+ onAction={() => toggleExpanded(target)}+ /><span class="truncate text-sm font-medium text-base-content">{target.displayName}</span>@@ -596,319 +688,52 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorP</TableRow><Show when={expanded()}>- <InlineDetailTableRow colspan={6}>- <div class="space-y-3 whitespace-normal">- <p class="text-xs text-muted">- {target.connectionId}- <Show when={target.updaterLabel}>- {' '}- · Updater: {target.updaterLabel}- </Show>- <Show when={target.privilegeLabel}>- {' '}- · Privilege: {target.privilegeLabel}- </Show>- <Show when={target.profileLabel}>- {' '}- · Profile: {target.profileLabel}- <Show when={target.profileVersionLabel}>- {' '}- ({target.profileVersionLabel})- </Show>- </Show>- </p>-- <div class="space-y-2 rounded-md border border-border bg-surface px-3 py-3 text-xs">- <div class="flex flex-wrap items-center gap-2">- <span class="font-medium text-base-content">Security posture</span>- <Show when={target.safeCollector}>- <span class="rounded-full bg-emerald-100 px-2 py-0.5 font-medium text-emerald-800 dark:bg-emerald-900/25 dark:text-emerald-200">- Safe collector confirmed- </span>- </Show>- </div>- <Show when={target.safeProfileGuidance}>- <p class="leading-5 text-muted">{target.safeProfileGuidance}</p>- </Show>- <Show- when={- !target.safeCollector &&- target.status !== 'removed' &&- target.commandPlatform === 'linux' &&- target.actionRunnerAgentId &&- target.actionRunnerHostname- }- >- <div class="space-y-2">- <div>- <div class="mb-1 font-medium text-base-content">- Inspect current service profile- </div>- <div class="relative">- <CommandCopyButton- onClick={() =>- void copyCommand(- buildSafeCollectorInspectCommand({- pulseUrl: operations.selectedAgentUrl(),- insecure: operations.insecureMode(),- customCaPath: operations.customCaPath(),- }),- )- }- label="Copy safe-profile inspection command"- />- <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">- <code>- {buildSafeCollectorInspectCommand({- pulseUrl: operations.selectedAgentUrl(),- insecure: operations.insecureMode(),- customCaPath: operations.customCaPath(),- })}- </code>- </pre>- </div>- </div>- <div>- <div class="mb-1 font-medium text-base-content">- Apply reviewed safe collector profile- </div>- <div class="relative">- <CommandCopyButton- onClick={() =>- void copyCommand(- buildSafeCollectorApplyCommand({- pulseUrl: operations.selectedAgentUrl(),- insecure: operations.insecureMode(),- customCaPath: operations.customCaPath(),- }),- )- }- label="Copy safe-profile apply command"- />- <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">- <code>- {buildSafeCollectorApplyCommand({- pulseUrl: operations.selectedAgentUrl(),- insecure: operations.insecureMode(),- customCaPath: operations.customCaPath(),- })}- </code>- </pre>- </div>- </div>- </div>- </Show>- <Show when={target.actionRunnerPosture.length > 0}>- <ul class="list-disc space-y-1 pl-5 text-muted">- <For each={target.actionRunnerPosture}>- {(fact) => <li>{fact}</li>}- </For>- </ul>- </Show>- <Show- when={target.actionRunnerCredentialEligible}- fallback={- <Show when={target.actionRunnerCredentialBlockReason}>- <p class="text-muted">- Action runner: {target.actionRunnerCredentialBlockReason}- </p>- </Show>- }- >- <Button- type="button"- variant="outline"- size="sm"- isLoading={runnerCredentialPendingKey() === target.key}- disabled={- Boolean(runnerCredentialReveal()) ||- issuedRunnerCredentialKeys().has(target.key)- }- onClick={() => void issueActionRunnerCredential(target)}+ <InlineDetailTableRow+ cellId={detailRowId()}+ colspan={6}+ data-agent-doctor-detail-for={target.connectionId}+ >+ <InlineDetailPanel+ testId="agent-doctor-detail"+ detailFor={target.key}+ title={target.displayName}+ status={{ variant: status().variant, label: status().label }}+ summary={doctorTargetSummary(target)}+ sections={[]}+ onClose={() => closeTarget(target)}+ >+ <For each={target.reasons}>+ {(reason) => (+ <InlineNotice+ tone={target.status === 'critical' ? 'danger' : 'warning'}>- {issuedRunnerCredentialKeys().has(target.key)- ? 'Credential issued for this page session'- : target.actionRunnerCredentialAction === 'rotate'- ? 'Rotate action-runner credential'- : 'Issue one-time action-runner credential'}- </Button>- </Show>- </div>-- <Show- when={- runnerCredentialReveal()?.targetKey === target.key- ? runnerCredentialReveal()- : null- }- >- {(reveal) => {- const tokenFileCommand = () => buildActionRunnerTokenFileCommand();- const installCommand = () =>- buildActionRunnerInstallCommand({- pulseUrl: operations.selectedAgentUrl(),- agentId: target.actionRunnerAgentId!,- hostname: target.actionRunnerHostname!,- insecure: operations.insecureMode(),- customCaPath: operations.customCaPath(),- });- return (- <section class="space-y-3 rounded-md border border-amber-300 bg-amber-50 px-3 py-3 text-xs text-amber-800 dark:border-amber-700 dark:bg-amber-950/30 dark:text-amber-100">- <div class="font-semibold">Save this credential now</div>- <p class="leading-5">- This secret is held only in this page's memory and cannot be- recovered after you clear or leave it. It is never placed in a- URL, diagnostic report, installer command, or process- argument.+ <p class="font-medium">{reason.message}</p>+ <Show when={reason.evidence?.length}>+ <p class="mt-1 text-xs opacity-80 wrap-anywhere">+ {(reason.evidence ?? []).join(' · ')}</p>- <div>- <div class="mb-1 font-medium">- 1. Start a private token prompt- </div>- <div class="relative">- <CommandCopyButton- onClick={() => void copyCommand(tokenFileCommand())}- label="Copy private token-file command"- />- <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">- <code>{tokenFileCommand()}</code>- </pre>- </div>- </div>- <div>- <div class="mb-1 font-medium">- 2. Copy this credential and paste it at the prompt- </div>- <div class="relative">- <CommandCopyButton- onClick={() => void copyCommand(reveal().token)}- title="Copy one-time action-runner credential"- label={`Copy action-runner credential for ${target.displayName}`}- />- <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">- <code>{reveal().token}</code>- </pre>- </div>- </div>- <div>- <div class="mb-1 font-medium">- 3. Install the separate runner- </div>- <div class="relative">- <CommandCopyButton- onClick={() => void copyCommand(installCommand())}- label="Copy action-runner installer command"- />- <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">- <code>{installCommand()}</code>- </pre>- </div>- </div>- <Button- type="button"- variant="outline"- size="sm"- onClick={() => setRunnerCredentialReveal(null)}- >- Clear credential from this page- </Button>- </section>- );- }}- </Show>-- <Show- when={target.reasons.length > 0}- fallback={- <p class="text-xs text-muted">- {target.status === 'healthy'- ? 'No fleet-health issues detected.'- : 'Pulse has not received a structured diagnostic for this agent yet. This usually clears after its next report.'}- </p>- }- >- <ul class="space-y-2">- <For each={target.reasons}>- {(reason) => (- <li class="rounded-md border border-border-subtle bg-surface px-3 py-2">- <div class="text-xs font-medium text-base-content">- {reason.message}- </div>- <Show when={reason.evidence?.length}>- <div class="mt-1 text-[11px] leading-4 text-muted">- {(reason.evidence ?? []).join(' · ')}- </div>- </Show>- </li>- )}- </For>- </ul>- </Show>-- <Show when={target.evidence.length > 0}>- <details class="text-xs text-muted">- <summary class="cursor-pointer font-medium text-base-content">- Identity evidence- </summary>- <ul class="mt-2 list-disc space-y-1 pl-5">- <For each={target.evidence}>{(item) => <li>{item}</li>}</For>- </ul>- </details>- </Show>-- <For each={otherRepairs()}>- {(repair) => (- <div class="rounded-md border border-border bg-surface px-3 py-2 text-xs">- <div class="font-medium text-base-content">{repair.label}</div>- <div class="mt-0.5 text-muted">{repair.description}</div>- <Show when={repair.scope}>- <div class="mt-1 text-[11px] text-muted">- Required scope: {repair.scope}- </div></Show>- </div>+ </InlineNotice>)}</For>- <Show when={canAllowReenroll()}>- <div class="rounded-md border border-border bg-surface px-3 py-2 text-xs">- <div class="font-medium text-base-content">Allow re-enrol</div>- <div class="mt-0.5 text-muted">- Clear the removal block so this agent can reconnect on its next- report.- </div>- <Button- type="button"- variant="outline"- size="sm"- class="mt-2"- disabled={reenrollPendingId() === target.connectionId}- onClick={() => void allowReenroll(target)}- >- {reenrollPendingId() === target.connectionId- ? 'Allowing…'- : 'Allow re-enrol'}- </Button>- </div>- </Show>-<Show when={target.needsUpdate || target.needsCredentialRepair}><Showwhen={!target.commandBlockedReason}fallback={- <div class="rounded-md border border-border bg-surface px-3 py-3 text-xs text-muted">+ <InlineNotice tone="info">{target.commandBlockedReason}- </div>+ </InlineNotice>}><Showwhen={commandReadyForTarget(target)}fallback={- <div class="rounded-md border border-border bg-surface px-3 py-3 text-xs text-muted">+ <InlineNotice tone="info">{commandRequiresToken(target) && tokenGatedTargetCount() > 1? 'Select this installation above and generate a separate credential to unlock its host-local repair command.': 'Generate a token to unlock this host-local repair command.'}- </div>+ </InlineNotice>}><div class="relative">@@ -937,20 +762,54 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorP</Show></Show>+ <Show when={canAllowReenroll()}>+ <InlineNotice tone="info">+ <p class="font-medium">Allow re-enrol</p>+ <p class="mt-0.5">+ Clear the removal block so this agent can reconnect on its next+ report.+ </p>+ <Button+ type="button"+ variant="outline"+ size="sm"+ class="mt-2"+ disabled={reenrollPendingId() === target.connectionId}+ onClick={() => void allowReenroll(target)}+ >+ {reenrollPendingId() === target.connectionId+ ? 'Allowing…'+ : 'Allow re-enrol'}+ </Button>+ </InlineNotice>+ </Show>++ <For each={otherRepairs()}>+ {(repair) => (+ <InlineNotice tone="info">+ <p class="font-medium">{repair.label}</p>+ <p class="mt-0.5">{repair.description}</p>+ <Show when={repair.scope}>+ <p class="mt-1 text-xs">Required scope: {repair.scope}</p>+ </Show>+ </InlineNotice>+ )}+ </For>+<Show when={uninstallHandoff()}>{(handoff) => (<div class="space-y-2">- <p class="text-xs text-muted">+ <InlineNotice tone="info">This agent was removed from Pulse, but the agent software maystill be installed on its host. Finish detaching it by runningthe uninstall command on the affected host itself. Pulse doesnot run commands remotely. Removal uses the host's savedconnection and credentials. Do not generate a new token.- </p>+ </InlineNotice><For each={handoff().commands}>{(entry) => (<div>- <div class="mb-1 text-[11px] font-medium uppercase tracking-wide text-muted">+ <div class="mb-1 text-xs font-medium text-base-content">{entry.label}</div><div class="relative">@@ -982,6 +841,195 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorP)}</Show>+ <DetailSectionTable+ sections={factSections()}+ dataTestId="agent-doctor-facts"+ wrapValues+ />++ <Show when={target.safeProfileGuidance}>+ {(guidance) => <InlineNotice tone="info">{guidance()}</InlineNotice>}+ </Show>+ <Show+ when={+ !target.safeCollector &&+ target.status !== 'removed' &&+ target.commandPlatform === 'linux' &&+ target.actionRunnerAgentId &&+ target.actionRunnerHostname+ }+ >+ <div class="space-y-2 text-xs">+ <div>+ <div class="mb-1 font-medium text-base-content">+ Inspect current service profile+ </div>+ <div class="relative">+ <CommandCopyButton+ onClick={() =>+ void copyCommand(+ buildSafeCollectorInspectCommand({+ pulseUrl: operations.selectedAgentUrl(),+ insecure: operations.insecureMode(),+ customCaPath: operations.customCaPath(),+ }),+ )+ }+ label="Copy safe-profile inspection command"+ />+ <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">+ <code>+ {buildSafeCollectorInspectCommand({+ pulseUrl: operations.selectedAgentUrl(),+ insecure: operations.insecureMode(),+ customCaPath: operations.customCaPath(),+ })}+ </code>+ </pre>+ </div>+ </div>+ <div>+ <div class="mb-1 font-medium text-base-content">+ Apply reviewed safe collector profile+ </div>+ <div class="relative">+ <CommandCopyButton+ onClick={() =>+ void copyCommand(+ buildSafeCollectorApplyCommand({+ pulseUrl: operations.selectedAgentUrl(),+ insecure: operations.insecureMode(),+ customCaPath: operations.customCaPath(),+ }),+ )+ }+ label="Copy safe-profile apply command"+ />+ <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">+ <code>+ {buildSafeCollectorApplyCommand({+ pulseUrl: operations.selectedAgentUrl(),+ insecure: operations.insecureMode(),+ customCaPath: operations.customCaPath(),+ })}+ </code>+ </pre>+ </div>+ </div>+ </div>+ </Show>++ <Show when={target.actionRunnerCredentialEligible}>+ <Button+ type="button"+ variant="outline"+ size="sm"+ isLoading={runnerCredentialPendingKey() === target.key}+ disabled={+ Boolean(runnerCredentialReveal()) ||+ issuedRunnerCredentialKeys().has(target.key)+ }+ onClick={() => void issueActionRunnerCredential(target)}+ >+ {issuedRunnerCredentialKeys().has(target.key)+ ? 'Credential issued for this page session'+ : target.actionRunnerCredentialAction === 'rotate'+ ? 'Rotate action-runner credential'+ : 'Issue one-time action-runner credential'}+ </Button>+ </Show>++ <Show+ when={+ runnerCredentialReveal()?.targetKey === target.key+ ? runnerCredentialReveal()+ : null+ }+ >+ {(reveal) => {+ const tokenFileCommand = () => buildActionRunnerTokenFileCommand();+ const installCommand = () =>+ buildActionRunnerInstallCommand({+ pulseUrl: operations.selectedAgentUrl(),+ agentId: target.actionRunnerAgentId!,+ hostname: target.actionRunnerHostname!,+ insecure: operations.insecureMode(),+ customCaPath: operations.customCaPath(),+ });+ return (+ <InlineNotice tone="warning">+ <div class="space-y-3 text-xs">+ <p class="text-sm font-semibold">Save this credential now</p>+ <p class="leading-5">+ This secret is held only in this page's memory and cannot be+ recovered after you clear or leave it. It is never placed in+ a URL, diagnostic report, installer command, or process+ argument.+ </p>+ <div>+ <div class="mb-1 font-medium">+ 1. Start a private token prompt+ </div>+ <div class="relative">+ <CommandCopyButton+ onClick={() => void copyCommand(tokenFileCommand())}+ label="Copy private token-file command"+ />+ <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">+ <code>{tokenFileCommand()}</code>+ </pre>+ </div>+ </div>+ <div>+ <div class="mb-1 font-medium">+ 2. Copy this credential and paste it at the prompt+ </div>+ <div class="relative">+ <CommandCopyButton+ onClick={() => void copyCommand(reveal().token)}+ title="Copy one-time action-runner credential"+ label={`Copy action-runner credential for ${target.displayName}`}+ />+ <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">+ <code>{reveal().token}</code>+ </pre>+ </div>+ </div>+ <div>+ <div class="mb-1 font-medium">+ 3. Install the separate runner+ </div>+ <div class="relative">+ <CommandCopyButton+ onClick={() => void copyCommand(installCommand())}+ label="Copy action-runner installer command"+ />+ <pre class="overflow-x-auto rounded-md bg-page p-3 pr-12 text-xs text-base-content">+ <code>{installCommand()}</code>+ </pre>+ </div>+ </div>+ <Button+ type="button"+ variant="outline"+ size="sm"+ onClick={() => setRunnerCredentialReveal(null)}+ >+ Clear credential from this page+ </Button>+ </div>+ </InlineNotice>+ );+ }}+ </Show>++ <TechnicalDetailsDisclosure+ title="Details"+ subtitle="Connection and identity evidence"+ dataTestId="agent-doctor-evidence"+ sections={evidenceSections()}+ />+<Buttontype="button"variant="outline"@@ -990,7 +1038,7 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorP>Copy diagnostic report for {target.displayName}</Button>- </div>+ </InlineDetailPanel></InlineDetailTableRow></Show></>diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureAgentDoctorPage.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureAgentDoctorPage.test.tsxindex 42c47595a4..9a4520a63a 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureAgentDoctorPage.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureAgentDoctorPage.test.tsx@@ -1,4 +1,4 @@-import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';+import { fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { InfrastructureAgentDoctorPage } from '../InfrastructureAgentDoctorPage';import type { InfrastructureAgentDoctorTarget } from '../infrastructureAgentUpdateCommandsModel';@@ -71,7 +71,9 @@ describe('InfrastructureAgentDoctorPage action-runner enrollment', () => {it('reveals the host-bound secret once and keeps it out of both commands', async () => {render(() => <InfrastructureAgentDoctorPage targets={[targetFixture()]} />);- expect(screen.getByText('Safe collector confirmed')).toBeInTheDocument();+ const facts = within(screen.getByTestId('agent-doctor-facts'));+ expect(facts.getByText('Safe collector')).toBeInTheDocument();+ expect(facts.getByText('Confirmed')).toBeInTheDocument();fireEvent.click(screen.getByRole('button', { name: 'Issue one-time action-runner credential' }),);@@ -191,15 +193,70 @@ describe('InfrastructureAgentDoctorPage action-runner enrollment', () => {expect(screen.getByText('just now')).toBeInTheDocument();expect(screen.getByText(/commands are host-local/)).toBeInTheDocument();- fireEvent.click(screen.getByRole('button', { name: 'Hide details for host-1' }));- expect(screen.getByRole('button', { name: 'Show details for host-1' })).toHaveAttribute(+ fireEvent.click(screen.getByRole('button', { name: 'Collapse details for host-1' }));+ expect(screen.getByRole('button', { name: 'Expand details for host-1' })).toHaveAttribute('aria-expanded','false',);- fireEvent.click(screen.getByRole('button', { name: 'Show details for host-1' }));- expect(screen.getByRole('button', { name: 'Hide details for host-1' })).toHaveAttribute(+ fireEvent.click(screen.getByRole('button', { name: 'Expand details for host-1' }));+ expect(screen.getByRole('button', { name: 'Collapse details for host-1' })).toHaveAttribute('aria-expanded','true',);});+ it('opens one target at a time under a header that names it and closes it', () => {+ render(() => (+ <InfrastructureAgentDoctorPage+ targets={[+ targetFixture({+ status: 'warning',+ reasons: [+ {+ code: 'agent_outdated',+ severity: 'warning',+ message: 'Agent is older than the server.',+ evidence: ['Reported 6.3.0'],+ },+ ],+ evidence: ['Hostname: host-1.local', 'Machine identity: abc123'],+ }),+ targetFixture({+ key: 'agent:host-2',+ connectionId: 'agent:host-2',+ displayName: 'host-2',+ actionRunnerAgentId: 'host-2',+ actionRunnerHostname: 'host-2.local',+ }),+ ]}+ />+ ));++ // Several targets start collapsed.+ expect(screen.queryByTestId('agent-doctor-detail')).toBeNull();++ const first = screen.getByRole('button', { name: 'Expand details for host-1' });+ fireEvent.click(first);+ const controlled = first.getAttribute('aria-controls')!;+ expect(controlled).toBeTruthy();+ const panel = screen.getByTestId('agent-doctor-detail');+ expect(document.getElementById(controlled)).toContainElement(panel);+ const detail = within(panel);+ expect(detail.getByRole('heading', { name: 'host-1' })).toBeInTheDocument();+ expect(detail.getByLabelText('Needs attention')).toBeInTheDocument();+ expect(detail.getByText('1 issue to look at')).toBeInTheDocument();+ expect(detail.getByText('Agent is older than the server.')).toBeInTheDocument();+ // The connection ID and identity evidence wait behind Details.+ expect(detail.getByText('Details')).toBeInTheDocument();+ expect(detail.queryByText('agent:host-1')).toBeNull();++ // Opening a second target closes the first.+ fireEvent.click(screen.getByRole('button', { name: 'Expand details for host-2' }));+ expect(screen.getAllByTestId('agent-doctor-detail')).toHaveLength(1);+ expect(+ within(screen.getByTestId('agent-doctor-detail')).getByRole('heading', { name: 'host-2' }),+ ).toBeInTheDocument();++ fireEvent.click(screen.getByRole('button', { name: 'Collapse host-2 details' }));+ expect(screen.queryByTestId('agent-doctor-detail')).toBeNull();+ });});diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsxindex 5a7bd7a070..7a52713c0c 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx@@ -454,10 +454,11 @@ describe('InfrastructureWorkspace', () => {renderWorkspace();await waitFor(() => expect(screen.getByText('Agent Doctor')).toBeInTheDocument());- expect(screen.getByText('zeus')).toBeInTheDocument();+ // The lone target opens on its own, headed by its name.+ expect(screen.getByRole('heading', { name: 'zeus' })).toBeInTheDocument();expect(screen.queryByText('other')).not.toBeInTheDocument();- expect(screen.getByText('5.1.34')).toBeInTheDocument();- expect(screen.getByText('6.0.0-rc.6')).toBeInTheDocument();+ expect(screen.getAllByText('5.1.34').length).toBeGreaterThan(0);+ expect(screen.getAllByText('6.0.0-rc.6').length).toBeGreaterThan(0);expect(screen.getByText(/upgrade agent:agent-zeus --enable-proxmox --proxmox-type pve/),).toBeInTheDocument();@@ -605,8 +606,8 @@ describe('InfrastructureWorkspace', () => {renderWorkspace();await waitFor(() => expect(screen.getByText('Agent Doctor')).toBeInTheDocument());- expect(screen.getByText('zeus')).toBeInTheDocument();- expect(screen.getByText('5.1.34')).toBeInTheDocument();+ expect(screen.getByRole('heading', { name: 'zeus' })).toBeInTheDocument();+ expect(screen.getAllByText('5.1.34').length).toBeGreaterThan(0);// With no published target there is no target version or command to guess at.expect(screen.queryByText(/upgrade agent:agent-zeus/)).not.toBeInTheDocument();});diff --git a/frontend-modern/src/features/docker/DockerAlertsTable.tsx b/frontend-modern/src/features/docker/DockerAlertsTable.tsxindex 9532dd21a5..858c0d73c6 100644--- a/frontend-modern/src/features/docker/DockerAlertsTable.tsx+++ b/frontend-modern/src/features/docker/DockerAlertsTable.tsx@@ -24,6 +24,7 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import { getPlatformAlertSeverityFilterOptions } from '@/features/platformPage/platformAlertSeverityFilterOptions';import {formatPlatformAlertCode,@@ -98,6 +99,16 @@ const AlertDetail: Component<{ incident: DockerIncidentRow; onClose: () => voidtitle={props.incident.resourceName || formatPlatformAlertCode(props.incident.code, 'docker')}status={getAlertSeverityIndicator(props.incident.severity, props.incident.severityBucket)}summary={props.incident.summary || props.incident.label}+ actions={+ <RecordOwnerLink+ subject={{+ id: props.incident.resourceId,+ name: props.incident.resourceName,+ type: props.incident.resourceType,+ resource: props.incident.resource,+ }}+ />+ }sections={buildAlertDetailSections(props.incident)}detailAttributes={{ 'data-docker-alert-detail-for': props.incident.id }}onClose={props.onClose}diff --git a/frontend-modern/src/features/docker/DockerConfigsTable.tsx b/frontend-modern/src/features/docker/DockerConfigsTable.tsxindex a3314ced4f..5c193e54fe 100644--- a/frontend-modern/src/features/docker/DockerConfigsTable.tsx+++ b/frontend-modern/src/features/docker/DockerConfigsTable.tsx@@ -22,9 +22,18 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { getSimpleStatusIndicator } from '@/utils/status';import {DockerNativeDetailPanel,DockerResourceNameCell,+ dockerDetailTimestampRow,+ dockerLabelsSection,+ dockerReportedBySection,dockerHostName,dockerLabelsSummary,dockerResourceName,@@ -59,6 +68,26 @@ const getDockerConfigSortValue = (}};+// Pulse reads a config's metadata from the Swarm manager, never its contents.+const CONFIG_SUMMARY = "Pulse sees this config's metadata only, not its contents.";++const buildConfigDetailSections = (+ resource: Resource,+ now: number,+): Array<DetailSection | null> => [+ {+ label: 'Config',+ rows: compactDetailRows([+ makeDetailRow('Template', asTrimmedString(resource.docker?.templatingDriver)),+ makeDetailRow('Config ID', asTrimmedString(resource.docker?.configId), { wrap: true }),+ dockerDetailTimestampRow('Created', resource.docker?.objectCreatedAt, now),+ dockerDetailTimestampRow('Updated', resource.docker?.objectUpdatedAt, now),+ ]),+ },+ dockerReportedBySection(resource),+ dockerLabelsSection('Labels', resource.docker?.labels),+];+export const DockerConfigsTable: Component<DockerNativeTableProps> = (props) => {const tableState = createPlatformTableFilterState({resources: () => props.resources,@@ -225,13 +254,12 @@ export const DockerConfigsTable: Component<DockerNativeTableProps> = (props) =>data-inline-docker-config-detail-for={resource.id}><DockerNativeDetailPanel- title={dockerResourceName(resource)}- fields={[- ['Template', dockerTextValue(resource.docker?.templatingDriver)],- ['Created', dockerTextValue(resource.docker?.objectCreatedAt)],- ['Labels', dockerLabelsSummary(resource.docker?.labels)],- ['Host', dockerHostName(resource)],- ]}+ testId="docker-config-detail"+ resource={resource}+ status={getSimpleStatusIndicator(resource.status)}+ summary={CONFIG_SUMMARY}+ sections={(now) => buildConfigDetailSections(resource, now)}+ onClose={() => drawer.close(resource)}/></InlineDetailTableRow></Show>diff --git a/frontend-modern/src/features/docker/DockerNativeTableShared.tsx b/frontend-modern/src/features/docker/DockerNativeTableShared.tsxindex e2f717cb3d..a2ab6db18b 100644--- a/frontend-modern/src/features/docker/DockerNativeTableShared.tsx+++ b/frontend-modern/src/features/docker/DockerNativeTableShared.tsx@@ -1,4 +1,13 @@-import { For, Show, type Component, type JSX } from 'solid-js';+import { Show, type Component, type JSX } from 'solid-js';+import {+ InlineDetailPanel,+ compactDetailRows,+ compactDetailSections,+ makeDetailRow,+ type DetailRow,+ type DetailSection,+ type DetailValueTone,+} from '@/components/shared/DetailSectionTable';import { StatusDot } from '@/components/shared/StatusDot';import { TableCell } from '@/components/shared/Table';import { ResourceNameWithWebInterfaceLink } from '@/components/shared/WebInterfaceLink';@@ -11,8 +20,12 @@ import { asTrimmedString } from '@/utils/stringUtils';import {PlatformTableNumberValue,formatPlatformTableBytesValue,+ formatPlatformTableDateTimeValue,+ formatPlatformTableRelativeTimeValue,getPlatformTableCellClassForKind,} from '@/features/platformPage/sharedPlatformPage';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';+import { useRelativeTimeNow } from '@/utils/relativeTimeClock';import type { Resource } from '@/types/resource';import { getPlatformStatusTextToneClass } from '@/features/platformPage/platformStatusTone';import type { DockerResourceStatusFilter } from './dockerPageModel';@@ -123,19 +136,105 @@ export const DockerResourceNameCell: Component<{);};+// Swarm objects (services, tasks, nodes, secrets, configs) and networks are+// records a Docker host reports, not machines Pulse monitors: their drawer is+// a record panel headed by the object's name and its row's own status dot,+// with a link to the Docker host whose agent reported it.export const DockerNativeDetailPanel: Component<{- title: string;- fields: readonly (readonly [string, string])[];-}> = (props) => (- <dl class="grid gap-x-4 gap-y-2 text-[11px] sm:grid-cols-2">- <div class="sm:col-span-2 text-xs font-semibold text-base-content">{props.title}</div>- <For each={props.fields}>- {(field) => (- <div class="min-w-0">- <dt class="text-[10px] font-medium uppercase tracking-wide text-muted">{field[0]}</dt>- <dd class="wrap-break-word font-mono text-base-content">{field[1] || '—'}</dd>- </div>- )}- </For>- </dl>-);+ testId: string;+ resource: Resource;+ status: StatusIndicator;+ summary?: JSX.Element;+ /** Built against the shared relative-time clock so ages keep moving while open. */+ sections: (now: number) => Array<DetailSection | null>;+ onClose: () => void;+ /** Content that matters more than the sections, such as a network's containers. */+ children?: JSX.Element;+}> = (props) => {+ const now = useRelativeTimeNow();+ const hostname = () => asTrimmedString(props.resource.docker?.hostname);+ return (+ <InlineDetailPanel+ testId={props.testId}+ detailFor={props.resource.id}+ title={dockerResourceName(props.resource)}+ status={props.status}+ summary={props.summary}+ actions={+ <Show when={hostname()}>+ {(name) => (+ <RecordOwnerLink+ subject={{+ id: asTrimmedString(props.resource.docker?.hostSourceId) || name(),+ name: name(),+ type: 'docker-host',+ }}+ />+ )}+ </Show>+ }+ sections={compactDetailSections(props.sections(now()))}+ onClose={props.onClose}+ >+ {props.children}+ </InlineDetailPanel>+ );+};++// "Oct 2, 2026, 09:13 PM (1h ago)": the absolute time an operator compares+// with logs, and the age that says whether it matters. Docker reports RFC 3339+// stamps with nanoseconds, which never read at a glance.+export const dockerDetailTimestampRow = (+ label: string,+ timestamp: string | undefined,+ now: number,+): DetailRow | null => {+ const raw = asTrimmedString(timestamp);+ if (!raw) return null;+ const absolute = formatPlatformTableDateTimeValue(raw, {+ emptyText: '',+ // Docker reports an unset time as the zero time (0001-01-01).+ minYear: 2000,+ dateTimeFormat: { year: 'numeric' },+ });+ if (!absolute) return null;+ const relative = formatPlatformTableRelativeTimeValue(raw, { emptyText: '', now });+ return makeDetailRow(label, relative ? `${absolute} (${relative})` : absolute, {+ title: raw,+ wrap: true,+ });+};++// Every label, one row each with its key above its value: keys such as+// com.docker.stack.namespace are too long for the label column, and the+// table's summary keeps only the first few.+export const dockerLabelsSection = (+ label: string,+ labels: Record<string, string> | undefined,+): DetailSection | null => {+ const entries = Object.entries(labels ?? {}).sort(([a], [b]) => a.localeCompare(b));+ if (entries.length === 0) return null;+ return {+ label: `${label} (${entries.length})`,+ rows: compactDetailRows(+ entries.map(([key, value]) =>+ makeDetailRow(key, asTrimmedString(value) || '(empty)', { layout: 'stacked', wrap: true }),+ ),+ ),+ };+};++// A detail value behind the row dot's verdict reads in the dot's colour when+// the verdict needs a look; healthy and idle values stay plain.+export const dockerDetailToneForVariant = (+ variant: StatusIndicatorVariant | null | undefined,+): DetailValueTone | undefined =>+ variant === 'danger' ? 'danger' : variant === 'warning' ? 'warning' : undefined;++export const dockerReportedBySection = (resource: Resource): DetailSection | null => {+ const rows = compactDetailRows([+ makeDetailRow('Reported by', asTrimmedString(resource.docker?.hostname), { wrap: true }),+ makeDetailRow('Swarm', asTrimmedString(resource.docker?.swarm?.clusterName), { wrap: true }),+ ]);+ return rows.length > 0 ? { label: 'Source', rows } : null;+};diff --git a/frontend-modern/src/features/docker/DockerNetworksTable.tsx b/frontend-modern/src/features/docker/DockerNetworksTable.tsxindex d0805f8739..2b4120b601 100644--- a/frontend-modern/src/features/docker/DockerNetworksTable.tsx+++ b/frontend-modern/src/features/docker/DockerNetworksTable.tsx@@ -1,4 +1,11 @@+import { A } from '@solidjs/router';import { For, Show, createMemo, createSignal, type Component } from 'solid-js';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { InlineNotice } from '@/components/shared/InlineNotice';import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';import { StatusDot } from '@/components/shared/StatusDot';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';@@ -18,6 +25,8 @@ import {withPlatformStatusCounts,} from '@/features/platformPage/sharedPlatformPage';import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';+import { buildRecordOwnerPath } from '@/features/platformPage/RecordOwnerLink';+import { asTrimmedString } from '@/utils/stringUtils';import {PlatformResourceDetailToggleButton,createPlatformResourceDetailState,@@ -25,8 +34,11 @@ import {} from '@/features/platformPage/PlatformResourceDetailTableRow';import { getSimpleStatusIndicator, type StatusIndicator } from '@/utils/status';import {+ DockerNativeDetailPanel,DockerResourceNameCell,dockerHostName,+ dockerLabelsSection,+ dockerReportedBySection,dockerJoinValues,dockerResourceName,dockerStateTextToneClass,@@ -225,14 +237,56 @@ const networkRowHealth = (indicator: StatusIndicator): DockerResourceStatusFiltereturn 'unknown';};-const networkDetailRows = (resource: Resource) => [- ['Driver', dockerTextValue(resource.docker?.driver)],- ['Scope', dockerTextValue(resource.docker?.scope)],- ['Addressing', networkAddressing(resource)],- ['Flags', networkFlags(resource)],- ['Subnets', networkSubnets(resource)],- ['Network ID', dockerTextValue(resource.docker?.networkId)],-];+// The network's own configuration, below the containers on it: what an+// operator copies (the ID, subnets, gateways) wraps in full.+const buildNetworkDetailSections = (resource: Resource): Array<DetailSection | null> => {+ const subnets = (resource.docker?.subnets ?? []).filter((subnet) =>+ asTrimmedString(subnet.subnet),+ );+ return [+ {+ label: 'Network',+ rows: compactDetailRows([+ makeDetailRow('Driver', asTrimmedString(resource.docker?.driver)),+ makeDetailRow('Scope', asTrimmedString(resource.docker?.scope)),+ makeDetailRow(+ 'Addressing',+ networkAddressing(resource) === '—' ? null : networkAddressing(resource),+ ),+ makeDetailRow('Flags', networkFlags(resource), { wrap: true }),+ makeDetailRow('Network ID', asTrimmedString(resource.docker?.networkId), { wrap: true }),+ ]),+ },+ subnets.length > 0+ ? {+ label: subnets.length === 1 ? 'Subnet' : `Subnets (${subnets.length})`,+ rows: compactDetailRows(+ subnets.map((subnet) =>+ makeDetailRow(+ asTrimmedString(subnet.subnet) ?? '',+ asTrimmedString(subnet.gateway)+ ? `Gateway ${asTrimmedString(subnet.gateway)}`+ : 'No gateway',+ { wrap: true },+ ),+ ),+ ),+ }+ : null,+ dockerReportedBySection(resource),+ dockerLabelsSection('Options', resource.docker?.options),+ dockerLabelsSection('Labels', resource.docker?.labels),+ ];+};++const networkSummary = (resource: Resource, attachmentCount: number): string =>+ [+ asTrimmedString(resource.docker?.driver),+ asTrimmedString(resource.docker?.scope),+ attachmentCount > 0 ? attachmentCountLabel(attachmentCount) : 'No containers attached',+ ]+ .filter(Boolean)+ .join(' · ');const attachmentGroupKey = (row: DockerNetworkAttachmentRow): AttachmentGroupKey => {if (row.status.variant === 'danger' || row.status.variant === 'warning') return 'attention';@@ -267,33 +321,60 @@ const filterAttachmentRows = (});};-const AttachmentRowCard: Component<{ row: DockerNetworkAttachmentRow }> = (props) => (- <div class="rounded-sm border border-border bg-surface px-3 py-2">- <div class="grid gap-2 text-[11px] md:grid-cols-[minmax(0,1.2fr)_7rem_9rem_minmax(0,1fr)] md:items-center">- <div class="flex min-w-0 items-center gap-2">- <StatusDot size="sm" variant={props.row.status.variant} title={props.row.status.label} />- <span class="truncate font-semibold text-base-content" title={props.row.name}>- {props.row.name}+// Names, addresses, ports and images wrap: a phone has no hover to read the+// rest, and operators compare values that differ at their end. The name+// opens the container on the Docker overview where that page can filter to it.+const AttachmentRowCard: Component<{ row: DockerNetworkAttachmentRow }> = (props) => {+ const containerPath = () =>+ buildRecordOwnerPath({+ id: props.row.resource.id,+ name: props.row.name,+ type: props.row.resource.type,+ resource: props.row.resource,+ });+ return (+ <div class="rounded-sm border border-border bg-surface px-3 py-2">+ <div class="grid gap-x-3 gap-y-1 text-[11px] md:grid-cols-[minmax(0,1.2fr)_7rem_9rem_minmax(0,1fr)] md:items-start">+ <div class="flex min-w-0 items-start gap-2">+ <StatusDot+ size="sm"+ variant={props.row.status.variant}+ title={props.row.status.label}+ class="mt-1"+ />+ <Show+ when={containerPath()}+ fallback={+ <span class="min-w-0 font-semibold text-base-content wrap-anywhere">+ {props.row.name}+ </span>+ }+ >+ {(path) => (+ <A+ href={path()}+ class="min-w-0 font-semibold text-base-content wrap-anywhere hover:underline"+ title={`Open ${props.row.name}`}+ data-docker-attachment-link={props.row.resource.id}+ >+ {props.row.name}+ </A>+ )}+ </Show>+ </div>+ <span+ class={dockerStateTextToneClass(props.row.status.variant) || 'text-base-content'}+ data-docker-attachment-state={props.row.status.variant}+ >+ {props.row.status.label}</span>+ <span class="min-w-0 font-mono text-base-content wrap-anywhere">{props.row.address}</span>+ <span class="min-w-0 font-mono text-muted wrap-anywhere">{props.row.ports}</span></div>- <span- class={dockerStateTextToneClass(props.row.status.variant) || 'text-base-content'}- data-docker-attachment-state={props.row.status.variant}- >- {props.row.status.label}- </span>- <span class="font-mono text-base-content" title={props.row.address}>- {props.row.address}- </span>- <span class="truncate font-mono text-muted" title={props.row.ports}>- {props.row.ports}- </span>+ <div class="mt-1 min-w-0 text-[10px] text-muted wrap-anywhere">{props.row.image}</div></div>- <div class="mt-1 truncate text-[10px] text-muted" title={props.row.image}>- {props.row.image}- </div>- </div>-);+ );+};const AttachmentDetail: Component<{ rows: readonly DockerNetworkAttachmentRow[] }> = (props) => {const [showAll, setShowAll] = createSignal(false);@@ -336,9 +417,9 @@ const AttachmentDetail: Component<{ rows: readonly DockerNetworkAttachmentRow[]<Showwhen={props.rows.length > 0}fallback={- <div class="rounded-sm border border-border bg-surface px-3 py-2 text-[11px] text-muted">- No attached Docker containers reported on this network.- </div>+ <InlineNotice tone="info">+ No Docker containers are attached to this network.+ </InlineNotice>}><div class="mb-3">@@ -367,9 +448,9 @@ const AttachmentDetail: Component<{ rows: readonly DockerNetworkAttachmentRow[]<Showwhen={tableState.filtered().length > 0}fallback={- <div class="rounded-sm border border-border bg-surface px-3 py-2 text-[11px] text-muted">- No attached containers match current filters.- </div>+ <InlineNotice tone="info">+ No attached containers match the current filters.+ </InlineNotice>}><div class="space-y-3">@@ -414,24 +495,6 @@ const AttachmentDetail: Component<{ rows: readonly DockerNetworkAttachmentRow[]);};-const NetworkConfigDetail: Component<{ resource: Resource }> = (props) => (- <section class="min-w-0">- <h3 class="mb-2 text-xs font-semibold text-base-content">Network details</h3>- <div class="rounded-sm border border-border bg-surface px-3 py-2">- <For each={networkDetailRows(props.resource)}>- {([label, value]) => (- <div class="grid grid-cols-[6rem_minmax(0,1fr)] gap-3 py-1 text-[11px]">- <span class="text-muted">{label}</span>- <span class="truncate text-base-content" title={value}>- {value}- </span>- </div>- )}- </For>- </div>- </section>-);-export const DockerNetworksTable: Component<DockerNetworksTableProps> = (props) => {const allResources = () => props.relatedResources ?? props.resources;const attachmentsByNetwork = createMemo(() => {@@ -644,10 +707,16 @@ export const DockerNetworksTable: Component<DockerNetworksTableProps> = (props)colspan={visibleColumnCount()}data-docker-network-detail-row={resource.id}>- <div class="grid gap-4 lg:grid-cols-[minmax(0,1fr)_minmax(16rem,24rem)]">+ <DockerNativeDetailPanel+ testId="docker-network-detail"+ resource={resource}+ status={networkRowIndicator(resource, attention())}+ summary={networkSummary(resource, attachments().length)}+ sections={() => buildNetworkDetailSections(resource)}+ onClose={() => drawer.close(resource)}+ ><AttachmentDetail rows={attachments()} />- <NetworkConfigDetail resource={resource} />- </div>+ </DockerNativeDetailPanel></InlineDetailTableRow></Show></>diff --git a/frontend-modern/src/features/docker/DockerSecretsTable.tsx b/frontend-modern/src/features/docker/DockerSecretsTable.tsxindex 95a433a05e..42997788c8 100644--- a/frontend-modern/src/features/docker/DockerSecretsTable.tsx+++ b/frontend-modern/src/features/docker/DockerSecretsTable.tsx@@ -22,9 +22,18 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { getSimpleStatusIndicator } from '@/utils/status';import {DockerNativeDetailPanel,DockerResourceNameCell,+ dockerDetailTimestampRow,+ dockerLabelsSection,+ dockerReportedBySection,dockerHostName,dockerLabelsSummary,dockerResourceName,@@ -61,6 +70,27 @@ const getDockerSecretSortValue = (}};+// Pulse reads a secret's metadata from the Swarm manager, never its data.+const SECRET_SUMMARY = "Pulse sees this secret's metadata only, never its value.";++const buildSecretDetailSections = (+ resource: Resource,+ now: number,+): Array<DetailSection | null> => [+ {+ label: 'Secret',+ rows: compactDetailRows([+ makeDetailRow('Driver', asTrimmedString(resource.docker?.driver)),+ makeDetailRow('Template', asTrimmedString(resource.docker?.templatingDriver)),+ makeDetailRow('Secret ID', asTrimmedString(resource.docker?.secretId), { wrap: true }),+ dockerDetailTimestampRow('Created', resource.docker?.objectCreatedAt, now),+ dockerDetailTimestampRow('Updated', resource.docker?.objectUpdatedAt, now),+ ]),+ },+ dockerReportedBySection(resource),+ dockerLabelsSection('Labels', resource.docker?.labels),+];+export const DockerSecretsTable: Component<DockerNativeTableProps> = (props) => {const tableState = createPlatformTableFilterState({resources: () => props.resources,@@ -240,14 +270,12 @@ export const DockerSecretsTable: Component<DockerNativeTableProps> = (props) =>data-inline-docker-secret-detail-for={resource.id}><DockerNativeDetailPanel- title={dockerResourceName(resource)}- fields={[- ['Driver', dockerTextValue(resource.docker?.driver)],- ['Template', dockerTextValue(resource.docker?.templatingDriver)],- ['Created', dockerTextValue(resource.docker?.objectCreatedAt)],- ['Labels', dockerLabelsSummary(resource.docker?.labels)],- ['Host', dockerHostName(resource)],- ]}+ testId="docker-secret-detail"+ resource={resource}+ status={getSimpleStatusIndicator(resource.status)}+ summary={SECRET_SUMMARY}+ sections={(now) => buildSecretDetailSections(resource, now)}+ onClose={() => drawer.close(resource)}/></InlineDetailTableRow></Show>diff --git a/frontend-modern/src/features/docker/DockerServicesTable.tsx b/frontend-modern/src/features/docker/DockerServicesTable.tsxindex 4877a56def..15cdb0ec8b 100644--- a/frontend-modern/src/features/docker/DockerServicesTable.tsx+++ b/frontend-modern/src/features/docker/DockerServicesTable.tsx@@ -23,7 +23,19 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';-import { DockerNativeDetailPanel, dockerStateTextToneClass } from './DockerNativeTableShared';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import {+ DockerNativeDetailPanel,+ dockerDetailTimestampRow,+ dockerDetailToneForVariant,+ dockerLabelsSection,+ dockerReportedBySection,+ dockerStateTextToneClass,+} from './DockerNativeTableShared';import type { Resource } from '@/types/resource';import {compareDockerServices,@@ -88,6 +100,67 @@ const formatServiceUpdate = (return { label, title };};+// The drawer says in words what the row's dot and counts say: how many+// replicas run against how many are wanted, and any rollout under way.+const serviceSummary = (service: Resource): string => {+ const desired = service.docker?.desiredTasks ?? 0;+ const running = service.docker?.runningTasks ?? 0;+ const replicas =+ desired <= 0+ ? 'Scaled to 0 replicas'+ : `${running} of ${desired} ${desired === 1 ? 'replica' : 'replicas'} running`;+ const update = formatServiceUpdate(service.docker?.serviceUpdate);+ const message = asTrimmedString(service.docker?.serviceUpdate?.message);+ if (!asTrimmedString(service.docker?.serviceUpdate?.state)) return replicas;+ return [replicas, `update ${update.label.toLowerCase()}`, message].filter(Boolean).join(' · ');+};++const buildServiceDetailSections = (+ service: Resource,+ now: number,+): Array<DetailSection | null> => {+ const update = service.docker?.serviceUpdate;+ const updateState = asTrimmedString(update?.state);+ const ports = formatPorts(service.docker);+ return [+ {+ label: 'Service',+ rows: compactDetailRows([+ makeDetailRow('Stack', dockerServiceStack(service)),+ makeDetailRow('Image', asTrimmedString(service.docker?.image), { wrap: true }),+ makeDetailRow('Mode', asTrimmedString(service.docker?.mode)),+ makeDetailRow('Ports', ports === '—' ? null : ports, { wrap: true }),+ makeDetailRow('Service ID', asTrimmedString(service.docker?.serviceId), { wrap: true }),+ ]),+ },+ {+ label: 'Replicas',+ rows: compactDetailRows([+ makeDetailRow('Desired', String(service.docker?.desiredTasks ?? 0)),+ makeDetailRow('Running', String(service.docker?.runningTasks ?? 0), {+ tone: dockerDetailToneForVariant(dockerServiceReplicaStatus(service).variant),+ }),+ typeof service.docker?.completedTasks === 'number'+ ? makeDetailRow('Completed', String(service.docker.completedTasks))+ : null,+ ]),+ },+ {+ label: 'Update',+ rows: compactDetailRows([+ makeDetailRow('State', formatServiceUpdate(update).label, {+ title: updateState || undefined,+ tone: dockerDetailToneForVariant(dockerServiceUpdateAttention(service)?.variant),+ }),+ makeDetailRow('Message', asTrimmedString(update?.message), { wrap: true }),+ dockerDetailTimestampRow('Completed', update?.completedAt, now),+ ]),+ },+ dockerReportedBySection(service),+ dockerLabelsSection('Labels', service.docker?.labels),+ ];+};+const DOCKER_SERVICE_SORT_KEYS = ['service','stack',@@ -405,17 +478,12 @@ export const DockerServicesTable: Component<{data-inline-docker-service-detail-for={service.id}><DockerNativeDetailPanel- title={name()}- fields={[- ['Stack', stack()],- ['Image', image()],- ['Mode', mode()],- ['Desired', String(service.docker?.desiredTasks ?? 0)],- ['Running', String(service.docker?.runningTasks ?? 0)],- ['Update', update().title || update().label],- ['Ports', formatPorts(service.docker)],- ['Host', host()],- ]}+ testId="docker-service-detail"+ resource={service}+ status={indicator()}+ summary={serviceSummary(service)}+ sections={(now) => buildServiceDetailSections(service, now)}+ onClose={() => drawer.close(service)}/></InlineDetailTableRow></Show>diff --git a/frontend-modern/src/features/docker/DockerStorageUsageTable.tsx b/frontend-modern/src/features/docker/DockerStorageUsageTable.tsxindex b05949b367..808b96f53b 100644--- a/frontend-modern/src/features/docker/DockerStorageUsageTable.tsx+++ b/frontend-modern/src/features/docker/DockerStorageUsageTable.tsx@@ -2,6 +2,14 @@ import { Show, type Component, type JSX } from 'solid-js';import { StatusDot } from '@/components/shared/StatusDot';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';+import {+ InlineDetailPanel,+ compactDetailRows,+ compactDetailSections,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import {PlatformResourceDetailToggleButton,createPlatformResourceDetailState,@@ -29,6 +37,7 @@ import {hasDockerStorageUsageBucket,type DockerResourceStatusFilter,} from './dockerPageModel';+import { dockerResourceName } from './DockerNativeTableShared';const bucketValue = (bucket?: DockerStorageUsageMeta): JSX.Element => {if (!hasDockerStorageUsageBucket(bucket)) return <span class="text-muted">—</span>;@@ -46,9 +55,61 @@ const bucketValue = (bucket?: DockerStorageUsageMeta): JSX.Element => {);};-const bucketDetail = (bucket?: DockerStorageUsageMeta): string => {- if (!hasDockerStorageUsageBucket(bucket)) return '—';- return `${formatPlatformTableBytesValue(bucket?.totalSizeBytes ?? 0, '0 B')} total · ${bucket?.activeCount ?? 0}/${bucket?.totalCount ?? 0} active · ${formatPlatformTableBytesValue(bucket?.reclaimableBytes ?? 0, '0 B')} reclaimable`;+const STORAGE_BUCKETS: ReadonlyArray<{+ label: string;+ bucket: (host: Resource) => DockerStorageUsageMeta | undefined;+}> = [+ { label: 'Images', bucket: (host) => host.docker?.imagesUsage },+ { label: 'Containers', bucket: (host) => host.docker?.containersUsage },+ { label: 'Volumes', bucket: (host) => host.docker?.volumesUsage },+ { label: 'Build cache', bucket: (host) => host.docker?.buildCacheUsage },+];++const bucketSection = (label: string, bucket?: DockerStorageUsageMeta): DetailSection | null => {+ if (!hasDockerStorageUsageBucket(bucket)) return null;+ const reclaimable = bucket?.reclaimableBytes ?? 0;+ return {+ label,+ rows: compactDetailRows([+ makeDetailRow('Size', formatPlatformTableBytesValue(bucket?.totalSizeBytes ?? 0, '0 B')),+ makeDetailRow('In use', `${bucket?.activeCount ?? 0} of ${bucket?.totalCount ?? 0}`),+ makeDetailRow('Reclaimable', formatPlatformTableBytesValue(reclaimable, '0 B'), {+ tone: reclaimable > 0 ? 'accent' : 'muted',+ }),+ ]),+ };+};++// What the operator came for: how much `docker system prune` would give back.+const storageSummary = (host: Resource): string => {+ const reclaimable = STORAGE_BUCKETS.reduce(+ (total, entry) => total + (entry.bucket(host)?.reclaimableBytes ?? 0),+ 0,+ );+ return reclaimable > 0+ ? `${formatPlatformTableBytesValue(reclaimable, '0 B')} reclaimable in total`+ : 'Nothing reclaimable';+};++const StorageUsageDetail: Component<{ host: Resource; onClose: () => void }> = (props) => {+ const hostname = () =>+ asTrimmedString(props.host.docker?.hostname) || dockerResourceName(props.host);+ return (+ <InlineDetailPanel+ testId="docker-storage-detail"+ detailFor={props.host.id}+ title={dockerResourceName(props.host)}+ status={getSimpleStatusIndicator(props.host.status)}+ summary={storageSummary(props.host)}+ actions={+ <RecordOwnerLink subject={{ id: props.host.id, name: hostname(), type: 'docker-host' }} />+ }+ sections={compactDetailSections(+ STORAGE_BUCKETS.map((entry) => bucketSection(entry.label, entry.bucket(props.host))),+ )}+ onClose={props.onClose}+ />+ );};export const DockerStorageUsageTable: Component<{@@ -211,35 +272,7 @@ export const DockerStorageUsageTable: Component<{colspan={5}data-inline-docker-storage-detail-for={host.id}>- <div class="grid gap-x-4 gap-y-2 text-[11px] sm:grid-cols-2">- <div class="sm:col-span-2 text-xs font-semibold text-base-content">- {name()}- </div>- <div>- <span class="text-muted">Images</span>- <div class="wrap-break-word font-mono text-base-content">- {bucketDetail(host.docker?.imagesUsage)}- </div>- </div>- <div>- <span class="text-muted">Containers</span>- <div class="wrap-break-word font-mono text-base-content">- {bucketDetail(host.docker?.containersUsage)}- </div>- </div>- <div>- <span class="text-muted">Volumes</span>- <div class="wrap-break-word font-mono text-base-content">- {bucketDetail(host.docker?.volumesUsage)}- </div>- </div>- <div>- <span class="text-muted">Build cache</span>- <div class="wrap-break-word font-mono text-base-content">- {bucketDetail(host.docker?.buildCacheUsage)}- </div>- </div>- </div>+ <StorageUsageDetail host={host} onClose={() => drawer.close(host)} /></InlineDetailTableRow></Show></>diff --git a/frontend-modern/src/features/docker/DockerSwarmNodesTable.tsx b/frontend-modern/src/features/docker/DockerSwarmNodesTable.tsxindex 5e0e52ff09..b47504f236 100644--- a/frontend-modern/src/features/docker/DockerSwarmNodesTable.tsx+++ b/frontend-modern/src/features/docker/DockerSwarmNodesTable.tsx@@ -21,9 +21,18 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { titleCaseDelimitedLabel } from '@/utils/textPresentation';import {DockerNativeDetailPanel,DockerResourceNameCell,+ dockerDetailToneForVariant,+ dockerLabelsSection,+ dockerReportedBySection,dockerByteValue,dockerCpuValue,dockerResourceName,@@ -89,6 +98,70 @@ const getDockerSwarmNodeSortValue = (}};+const nodeReachability = (resource: Resource): string =>+ asTrimmedString(resource.docker?.leader ? 'leader' : resource.docker?.managerReachability) ?? '';++// A node's role, whether it takes work, and for a manager whether the others+// can reach it: the three things the row dot weighs.+const nodeSummary = (resource: Resource): string =>+ [+ titleCaseDelimitedLabel(resource.docker?.nodeRole, { fallback: '' }),+ resource.docker?.leader ? 'leader' : '',+ asTrimmedString(resource.docker?.availability)+ ? `availability ${asTrimmedString(resource.docker?.availability)}`+ : '',+ !resource.docker?.leader && asTrimmedString(resource.docker?.managerReachability)+ ? `manager ${asTrimmedString(resource.docker?.managerReachability)}`+ : '',+ ]+ .filter(Boolean)+ .join(' · ');++const buildSwarmNodeDetailSections = (resource: Resource): Array<DetailSection | null> => {+ const verdict = mapDockerSwarmNodeStatus(resource);+ const cpus = dockerCpuValue(resource.docker?.nanoCpus);+ const memory = dockerByteValue(resource.docker?.memoryBytes);+ return [+ {+ label: 'Node',+ rows: compactDetailRows([+ makeDetailRow('Role', asTrimmedString(resource.docker?.nodeRole)),+ makeDetailRow('Availability', asTrimmedString(resource.docker?.availability), {+ tone:+ verdict.label === 'Drained' || verdict.label === 'Paused'+ ? dockerDetailToneForVariant(verdict.variant)+ : undefined,+ }),+ makeDetailRow('Reachability', nodeReachability(resource), {+ tone:+ verdict.label === 'Manager unreachable'+ ? dockerDetailToneForVariant(verdict.variant)+ : undefined,+ }),+ makeDetailRow('Address', asTrimmedString(resource.docker?.address), { wrap: true }),+ makeDetailRow('Manager address', asTrimmedString(resource.docker?.managerAddress), {+ wrap: true,+ }),+ makeDetailRow('Node ID', asTrimmedString(resource.docker?.nodeId), { wrap: true }),+ ]),+ },+ {+ label: 'Engine',+ rows: compactDetailRows([+ makeDetailRow(+ 'Version',+ asTrimmedString(resource.docker?.engineVersion || resource.docker?.runtimeVersion),+ ),+ makeDetailRow('CPUs', cpus === '—' ? null : cpus),+ makeDetailRow('Memory', memory === '—' ? null : memory),+ ]),+ },+ dockerReportedBySection(resource),+ dockerLabelsSection('Engine labels', resource.docker?.engineLabels),+ dockerLabelsSection('Node labels', resource.docker?.labels),+ ];+};+export const DockerSwarmNodesTable: Component<DockerNativeTableProps> = (props) => {const tableState = createPlatformTableFilterState({resources: () => props.resources,@@ -223,10 +296,7 @@ export const DockerSwarmNodesTable: Component<DockerNativeTableProps> = (props)<><PlatformWindowedRows items={sortedRows} estimatedRowHeight={32}>{(resource) => {- const managerReachability = () =>- dockerTextValue(- resource.docker?.leader ? 'leader' : resource.docker?.managerReachability,- );+ const managerReachability = () => nodeReachability(resource) || '—';// The cell behind the dot's verdict reads in its colour: an// unreachable manager in Reachability, a drained or paused// node in Availability.@@ -311,27 +381,12 @@ export const DockerSwarmNodesTable: Component<DockerNativeTableProps> = (props)data-inline-docker-swarm-node-detail-for={resource.id}><DockerNativeDetailPanel- title={dockerResourceName(resource)}- fields={[- ['Role', dockerTextValue(resource.docker?.nodeRole)],- ['Availability', dockerTextValue(resource.docker?.availability)],- ['Reachability', managerReachability()],- [- 'Engine',- dockerTextValue(- resource.docker?.engineVersion ||- resource.docker?.runtimeVersion,- ),- ],- ['CPUs', dockerCpuValue(resource.docker?.nanoCpus)],- ['Memory', dockerByteValue(resource.docker?.memoryBytes)],- [- 'Address',- dockerTextValue(- resource.docker?.address || resource.docker?.managerAddress,- ),- ],- ]}+ testId="docker-swarm-node-detail"+ resource={resource}+ status={verdict()}+ summary={nodeSummary(resource)}+ sections={() => buildSwarmNodeDetailSections(resource)}+ onClose={() => drawer.close(resource)}/></InlineDetailTableRow></Show>diff --git a/frontend-modern/src/features/docker/DockerTasksTable.tsx b/frontend-modern/src/features/docker/DockerTasksTable.tsxindex d9d49472a8..fa02a4579a 100644--- a/frontend-modern/src/features/docker/DockerTasksTable.tsx+++ b/frontend-modern/src/features/docker/DockerTasksTable.tsx@@ -23,9 +23,18 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';import {DockerNativeDetailPanel,DockerResourceNameCell,+ dockerDetailTimestampRow,+ dockerDetailToneForVariant,+ dockerLabelsSection,+ dockerReportedBySection,dockerNumberValue,dockerResourceName,dockerStateTextToneClass,@@ -77,15 +86,61 @@ const getDockerTaskSortValue = (}};-// Why a task failed or what Docker last said about it, for a phone that-// cannot hover the Current cell.-const taskReasonFields = (resource: Resource): (readonly [string, string])[] => {- const fields: (readonly [string, string])[] = [];- const error = asTrimmedString(resource.docker?.error);- const message = asTrimmedString(resource.docker?.message);- if (error) fields.push(['Error', error]);- if (message) fields.push(['Message', message]);- return fields;+// The drawer leads with why a task failed or what Docker last said about it,+// for a phone that cannot hover the Current cell; otherwise where it runs.+const taskReason = (resource: Resource): string =>+ asTrimmedString(resource.docker?.error) || asTrimmedString(resource.docker?.message) || '';++const taskSummary = (resource: Resource): string => {+ const reason = taskReason(resource);+ if (reason) return reason;+ const node = asTrimmedString(resource.docker?.nodeName || resource.docker?.nodeId);+ const service = asTrimmedString(resource.docker?.serviceName);+ return [service ? `Task of ${service}` : '', node ? `on ${node}` : ''].filter(Boolean).join(' ');+};++const buildTaskDetailSections = (resource: Resource, now: number): Array<DetailSection | null> => {+ const status = mapDockerTaskStatus(resource);+ return [+ {+ label: 'Task',+ rows: compactDetailRows([+ makeDetailRow('Service', asTrimmedString(resource.docker?.serviceName), { wrap: true }),+ typeof resource.docker?.slot === 'number'+ ? makeDetailRow('Slot', String(resource.docker.slot))+ : null,+ makeDetailRow(+ 'Node',+ asTrimmedString(resource.docker?.nodeName || resource.docker?.nodeId),+ { wrap: true },+ ),+ makeDetailRow('Image', asTrimmedString(resource.docker?.image), { wrap: true }),+ makeDetailRow('Task ID', asTrimmedString(resource.docker?.taskId), { wrap: true }),+ ]),+ },+ {+ label: 'State',+ rows: compactDetailRows([+ makeDetailRow(+ 'Desired',+ titleCaseDelimitedLabel(resource.docker?.desiredState, { fallback: '' }),+ ),+ makeDetailRow('Current', status.label, {+ title: asTrimmedString(resource.docker?.currentState) || undefined,+ tone: dockerDetailToneForVariant(status.variant),+ }),+ // The summary already reads the error, or the message when there is+ // none; the other one, if Docker sent both, stays here.+ asTrimmedString(resource.docker?.error)+ ? makeDetailRow('Message', asTrimmedString(resource.docker?.message), { wrap: true })+ : null,+ dockerDetailTimestampRow('Started', resource.docker?.startedAt, now),+ dockerDetailTimestampRow('Finished', resource.docker?.completedAt, now),+ ]),+ },+ dockerReportedBySection(resource),+ dockerLabelsSection('Labels', resource.docker?.labels),+ ];};export const DockerTasksTable: Component<DockerNativeTableProps> = (props) => {@@ -293,21 +348,12 @@ export const DockerTasksTable: Component<DockerNativeTableProps> = (props) => {data-inline-docker-task-detail-for={resource.id}><DockerNativeDetailPanel- title={dockerResourceName(resource)}- fields={[- ['Service', dockerTextValue(resource.docker?.serviceName)],- ['Slot', String(resource.docker?.slot ?? '—')],- ['Desired', dockerTextValue(resource.docker?.desiredState)],- ['Current', dockerTextValue(resource.docker?.currentState)],- [- 'Node',- dockerTextValue(- resource.docker?.nodeName || resource.docker?.nodeId,- ),- ],- ['Started', dockerTextValue(resource.docker?.startedAt)],- ...taskReasonFields(resource),- ]}+ testId="docker-task-detail"+ resource={resource}+ status={mapDockerTaskStatus(resource)}+ summary={taskSummary(resource)}+ sections={(now) => buildTaskDetailSections(resource, now)}+ onClose={() => drawer.close(resource)}/></InlineDetailTableRow></Show>diff --git a/frontend-modern/src/features/docker/__tests__/DockerAlertsTable.test.tsx b/frontend-modern/src/features/docker/__tests__/DockerAlertsTable.test.tsxindex 672b96bbb1..b096058dbc 100644--- a/frontend-modern/src/features/docker/__tests__/DockerAlertsTable.test.tsx+++ b/frontend-modern/src/features/docker/__tests__/DockerAlertsTable.test.tsx@@ -1,10 +1,20 @@-import { cleanup, render, screen } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';+import { Route, Router } from '@solidjs/router';import { afterEach, describe, expect, it } from 'vitest';import type { Resource } from '@/types/resource';import { DockerAlertsTable } from '../DockerAlertsTable';import { buildDockerIncidentRows } from '../dockerPageModel';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const makeResource = ({id,type = 'agent',@@ -25,9 +35,61 @@ const makeResource = ({afterEach(() => {cleanup();+ window.history.replaceState(null, '', '/');});describe('DockerAlertsTable', () => {+ it('links an alert drawer to its container, and not to a tab that cannot focus it', async () => {+ const incidents = buildDockerIncidentRows([+ makeResource({+ id: 'ctr-payments',+ type: 'app-container',+ name: 'payments-worker',+ displayName: 'payments-worker',+ docker: { hostname: 'edge-01' },+ incidents: [+ { code: 'docker_container_restarting', severity: 'warning', summary: 'Restart loop' },+ ],+ }),+ makeResource({+ id: 'img-stale',+ type: 'docker-image',+ name: 'ghcr.io/pulse-demo/api:2026.04',+ displayName: 'ghcr.io/pulse-demo/api:2026.04',+ incidents: [+ { code: 'docker_image_update', severity: 'info', summary: 'Image update available' },+ ],+ }),+ ]);+ renderInRouter(() => (+ <DockerAlertsTable+ incidents={incidents}+ emptyIcon={<span />}+ emptyTitle="No alerts"+ emptyDescription="No alerts"+ showToolbar={false}+ />+ ));++ await fireEvent.click(+ screen.getByRole('button', { name: 'Expand details for payments-worker' }),+ );+ const link = within(screen.getByTestId('docker-alert-detail')).getByRole('link', {+ name: 'Open payments-worker',+ });+ expect(link).toHaveAttribute('href', '/docker/overview?q=payments-worker');+ // The drawer contains its clicks; the link still navigates in the app.+ await fireEvent.click(link);+ await waitFor(() => expect(window.location.pathname).toBe('/docker/overview'));+ expect(window.location.search).toBe('?q=payments-worker');++ await fireEvent.click(+ screen.getByRole('button', { name: 'Expand details for ghcr.io/pulse-demo/api:2026.04' }),+ );+ expect(screen.getAllByTestId('docker-alert-detail')).toHaveLength(1);+ expect(screen.queryByRole('link')).not.toBeInTheDocument();+ });+it('renders incident rows critical → warning → info with severity-coloured dots', () => {const incidents = buildDockerIncidentRows([makeResource({@@ -62,7 +124,7 @@ describe('DockerAlertsTable', () => {}),]);- render(() => (+ renderInRouter(() => (<DockerAlertsTableincidents={incidents}emptyIcon={<span />}@@ -89,7 +151,7 @@ describe('DockerAlertsTable', () => {});it('renders the empty-state fallback when given no incidents', () => {- render(() => (+ renderInRouter(() => (<DockerAlertsTableincidents={[]}emptyIcon={<span data-testid="empty-icon" />}diff --git a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsxindex 9f5140d975..c83e9dc237 100644--- a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx+++ b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx@@ -1591,7 +1591,7 @@ describe('Docker native tables', () => {},});- render(() => (+ renderInRouter(() => (<DockerNetworksTableresources={[network]}emptyIcon={<span />}@@ -1671,7 +1671,7 @@ describe('Docker native tables', () => {},});- render(() => (+ renderInRouter(() => (<DockerNetworksTableresources={[network]}relatedResources={[network, container]}@@ -1763,7 +1763,7 @@ describe('Docker native tables', () => {...Array.from({ length: 27 }, (_, offset) => makeAttachedContainer(offset + 3)),];- render(() => (+ renderInRouter(() => (<DockerNetworksTableresources={[network]}relatedResources={[network, ...containers]}@@ -2163,10 +2163,14 @@ describe('Docker native tables', () => {const state = screen.getByText('Failed');expect(state).toHaveClass('text-red-600');expect(state).toHaveAttribute('title', 'task: non-zero exit (1)');- // A phone cannot hover: the expansion says why it failed.+ // A phone cannot hover: the drawer leads with why it failed, under the+ // task's name and the row's own dot.fireEvent.click(document.querySelector('[data-docker-task-row="task-2"]')!);- expect(screen.getByText('Error')).toBeInTheDocument();- expect(screen.getByText('task: non-zero exit (1)')).toBeInTheDocument();+ const detail = within(document.querySelector('[data-testid="docker-task-detail"]')!);+ expect(detail.getByRole('heading', { name: 'web.3' })).toBeInTheDocument();+ expect(detail.getByLabelText('Failed')).toBeInTheDocument();+ expect(detail.getByText('task: non-zero exit (1)')).toBeInTheDocument();+ expect(detail.getByText('Shutdown')).toBeInTheDocument();});it('renders Docker Swarm secret API metadata without secret data', () => {@@ -2203,7 +2207,7 @@ describe('Docker native tables', () => {});it('renders Docker Swarm config API metadata', () => {- render(() => (+ renderInRouter(() => (<DockerConfigsTableresources={[makeResource({@@ -2243,4 +2247,166 @@ describe('Docker native tables', () => {document.querySelector('[data-inline-docker-config-detail-for="config-1"]'),).not.toBeNull();});+ it('opens a Swarm service as a record drawer with every label, human dates, and its host', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2026-05-24T15:00:00Z'));+ renderInRouter(() => (+ <DockerServicesTable+ resources={[+ makeResource({+ id: 'service-1',+ type: 'docker-service',+ name: 'checkout-api',+ docker: {+ hostname: 'manager-1',+ serviceId: 'svc-abc123',+ image: 'registry.example.com/checkout-api:2026.05',+ mode: 'replicated',+ desiredTasks: 4,+ runningTasks: 2,+ labels: {+ 'com.docker.stack.namespace': 'shop',+ 'com.example.owner': 'payments',+ 'com.example.tier': 'api',+ 'com.example.zone': 'eu-west',+ },+ serviceUpdate: {+ state: 'rollback_started',+ message: 'Service replicas below desired',+ completedAt: '2026-05-24T13:00:00Z',+ },+ },+ }),+ ]}+ emptyIcon={<span />}+ emptyTitle="No services"+ emptyDescription="No services"+ showToolbar={false}+ />+ ));++ const disclosure = screen.getByRole('button', { name: 'Expand details for checkout-api' });+ fireEvent.click(disclosure);++ const panel = document.querySelector<HTMLElement>('[data-testid="docker-service-detail"]')!;+ const detail = within(panel);+ // Headed by the service and the row's own dot, with its verdict in words.+ expect(detail.getByRole('heading', { name: 'checkout-api' })).toBeInTheDocument();+ expect(detail.getByLabelText('Rolling back')).toBeInTheDocument();+ expect(+ detail.getByText(+ '2 of 4 replicas running · update rollback started · Service replicas below desired',+ ),+ ).toBeInTheDocument();+ // Every label, not the first three the table cell keeps.+ expect(detail.getByText('Labels (4)')).toBeInTheDocument();+ expect(detail.getByText('com.example.zone')).toBeInTheDocument();+ expect(detail.getByText('eu-west')).toBeInTheDocument();+ // A completion stamp reads as a date and an age, the raw stamp on hover.+ expect(detail.getAllByTitle('2026-05-24T13:00:00Z')[0]).toHaveTextContent(/2026.*\(2h ago\)$/);+ // The reporting host is one tap away.+ expect(detail.getByRole('link', { name: 'Open manager-1' })).toHaveAttribute(+ 'href',+ '/docker/overview?q=manager-1',+ );+ // The header closes the drawer and hands focus back to the row's disclosure.+ expect(disclosure).toHaveAttribute('aria-controls', 'docker-service-detail-service-1');+ expect(document.getElementById('docker-service-detail-service-1')).toContainElement(panel);+ fireEvent.click(detail.getByRole('button', { name: 'Collapse checkout-api details' }));+ expect(document.querySelector('[data-testid="docker-service-detail"]')).toBeNull();+ vi.useRealTimers();+ });++ it('shows a Swarm secret record without any secret value', () => {+ renderInRouter(() => (+ <DockerSecretsTable+ resources={[+ makeResource({+ id: 'secret-1',+ type: 'docker-secret',+ name: 'api-token',+ docker: {+ hostname: 'manager-1',+ secretId: 'sec-1',+ driver: 'vault',+ objectCreatedAt: '2026-05-24T13:10:00Z',+ labels: { stack: 'ops' },+ },+ }),+ ]}+ emptyIcon={<span />}+ emptyTitle="No secrets"+ emptyDescription="No secrets"+ showToolbar={false}+ />+ ));++ fireEvent.click(document.querySelector('[data-docker-secret-row="secret-1"]')!);+ const detail = within(+ document.querySelector<HTMLElement>('[data-testid="docker-secret-detail"]')!,+ );+ expect(detail.getByRole('heading', { name: 'api-token' })).toBeInTheDocument();+ expect(+ detail.getByText("Pulse sees this secret's metadata only, never its value."),+ ).toBeInTheDocument();+ expect(detail.getByText('sec-1')).toBeInTheDocument();+ expect(detail.getByText('Labels (1)')).toBeInTheDocument();+ });++ it('links each container on a network to the Docker overview', () => {+ const network = makeResource({+ id: 'network-1',+ type: 'docker-network',+ name: 'frontend',+ docker: { hostname: 'edge-01', networkId: 'net-1', driver: 'bridge', scope: 'local' },+ });+ const container = makeResource({+ id: 'container-1',+ type: 'app-container',+ name: 'edge-web',+ displayName: 'edge-web',+ status: 'running',+ relationships: [+ {+ sourceId: 'container-1',+ targetId: 'network-1',+ type: 'attached_to',+ confidence: 1,+ active: true,+ discoverer: 'docker_adapter',+ observedAt: '2026-06-03T09:00:00Z',+ lastSeenAt: '2026-06-03T09:00:00Z',+ },+ ],+ docker: {+ hostname: 'edge-01',+ image: 'nginx:latest',+ containerState: 'running',+ networks: [{ name: 'frontend', ipv4: '10.88.0.12' }],+ },+ });++ renderInRouter(() => (+ <DockerNetworksTable+ resources={[network]}+ relatedResources={[network, container]}+ emptyIcon={<span />}+ emptyTitle="No networks"+ emptyDescription="No networks"+ showToolbar={false}+ />+ ));++ fireEvent.click(document.querySelector('[data-docker-network-row="network-1"]')!);+ const detail = within(+ document.querySelector<HTMLElement>('[data-testid="docker-network-detail"]')!,+ );+ expect(detail.getByRole('heading', { name: 'frontend' })).toBeInTheDocument();+ expect(detail.getByText('bridge · local · 1 attached container')).toBeInTheDocument();+ expect(detail.getByRole('link', { name: 'edge-web' })).toHaveAttribute(+ 'href',+ '/docker/overview?q=edge-web',+ );+ expect(detail.getByText('Network ID')).toBeInTheDocument();+ });});diff --git a/frontend-modern/src/features/kubernetes/KubernetesAlertsTable.tsx b/frontend-modern/src/features/kubernetes/KubernetesAlertsTable.tsxindex ff123af334..b7a2c285cb 100644--- a/frontend-modern/src/features/kubernetes/KubernetesAlertsTable.tsx+++ b/frontend-modern/src/features/kubernetes/KubernetesAlertsTable.tsx@@ -24,6 +24,7 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import { getPlatformAlertSeverityFilterOptions } from '@/features/platformPage/platformAlertSeverityFilterOptions';import {formatPlatformAlertCode,@@ -104,6 +105,16 @@ const AlertDetail: Component<{ incident: KubernetesIncidentRow; onClose: () => v}status={getAlertSeverityIndicator(props.incident.severity, props.incident.severityBucket)}summary={props.incident.summary || props.incident.label}+ actions={+ <RecordOwnerLink+ subject={{+ id: props.incident.resourceId,+ name: props.incident.resourceName,+ type: props.incident.resourceType,+ resource: props.incident.resource,+ }}+ />+ }sections={buildAlertDetailSections(props.incident)}detailAttributes={{ 'data-kubernetes-alert-detail-for': props.incident.id }}onClose={props.onClose}diff --git a/frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsx b/frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsxindex 3209f45595..eef418295d 100644--- a/frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsx+++ b/frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsx@@ -1,5 +1,11 @@import { Show, createMemo, type Component, type JSX } from 'solid-js';import { StatusDot } from '@/components/shared/StatusDot';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';import { TableCell, TableRow } from '@/components/shared/Table';import { getSimpleStatusIndicator } from '@/utils/status';import { asTrimmedString } from '@/utils/stringUtils';@@ -33,6 +39,11 @@ import {type KubernetesResourceStatusFilter,isSingleKubernetesCluster,} from './kubernetesPageModel';+import {+ KubernetesRecordDetailPanel,+ kubernetesLabelsSection,+ kubernetesObjectSection,+} from './KubernetesRecordDetail';import { KubernetesScopeText } from './KubernetesScopeText';// ConfigMaps and Secrets are intentionally rendered as API metadata. Pulse may@@ -162,6 +173,105 @@ const serviceAccountRefs = (resource: Resource): { label: string; title: stringconst labelSummary = (resource: Resource): { label: string; title: string } =>summarizePlatformTableValues(resource.tags);+const yesNo = (value: boolean | undefined): string | null =>+ typeof value === 'boolean' ? (value ? 'Yes' : 'No') : null;++// What the object holds, without its payload: key counts for Secrets (never+// key names or values), key names for a ConfigMap Pulse read in full, the+// rule and subject counts RBAC objects report.+const configContentSection = (resource: Resource): DetailSection | null => {+ const k = resource.kubernetes;+ const dataKeys = k?.dataKeys ?? [];+ const binaryKeys = k?.binaryDataKeys ?? [];+ switch (resource.type) {+ case 'k8s-configmap':+ case 'k8s-secret': {+ const showNames = resource.type === 'k8s-configmap' && !k?.metadataOnly;+ return {+ label: resource.type === 'k8s-secret' ? 'Secret' : 'ConfigMap',+ rows: compactDetailRows([+ resource.type === 'k8s-secret'+ ? makeDetailRow('Type', asTrimmedString(k?.secretType), { wrap: true })+ : null,+ makeDetailRow('Data', dataShape(resource).label, { wrap: true }),+ showNames && dataKeys.length > 0+ ? makeDetailRow('Data keys', dataKeys.join(', '), { wrap: true })+ : null,+ showNames && binaryKeys.length > 0+ ? makeDetailRow('Binary keys', binaryKeys.join(', '), { wrap: true })+ : null,+ makeDetailRow('Immutable', yesNo(k?.immutable)),+ k?.metadataOnly ? makeDetailRow('Collection', 'Metadata only') : null,+ ]),+ };+ }+ case 'k8s-serviceaccount':+ return {+ label: 'Service account',+ rows: compactDetailRows([+ makeDetailRow('Token', lifecycleOrTrust(resource)),+ typeof k?.secretCount === 'number'+ ? makeDetailRow('Secrets', plural(k.secretCount, 'secret'))+ : null,+ makeDetailRow('Image pull secrets', (k?.imagePullSecrets ?? []).join(', '), {+ wrap: true,+ }),+ ]),+ };+ case 'k8s-role':+ case 'k8s-cluster-role': {+ const aggregation = Object.entries(k?.aggregationLabels ?? {});+ return {+ label: 'Rules',+ rows: compactDetailRows([+ makeDetailRow('Rules', plural(k?.ruleCount ?? 0, 'rule')),+ makeDetailRow(+ 'Aggregates',+ aggregation.map(([key, value]) => (value ? `${key}=${value}` : key)).join(', '),+ { wrap: true },+ ),+ ]),+ };+ }+ case 'k8s-role-binding':+ case 'k8s-cluster-role-binding':+ return {+ label: 'Binding',+ rows: compactDetailRows([+ makeDetailRow(+ 'Role',+ lifecycleOrTrust(resource) === '—' ? null : lifecycleOrTrust(resource),+ {+ wrap: true,+ },+ ),+ makeDetailRow('Subjects', plural(k?.subjectCount ?? 0, 'subject')),+ makeDetailRow('Subject kinds', (k?.subjectKinds ?? []).join(', '), { wrap: true }),+ ]),+ };+ default:+ return null;+ }+};++const configSummary = (resource: Resource): string =>+ [lifecycleOrTrust(resource), dataShape(resource).label, serviceAccountRefs(resource).label]+ .filter((part) => part && part !== '—')+ .join(' · ');++const buildConfigDetailSections = (+ resource: Resource,+ now: number,+): Array<DetailSection | null> => [+ kubernetesObjectSection(resource, configKind(resource), now),+ configContentSection(resource),+ kubernetesLabelsSection(resource),+];++// Namespaces carry alerts of their own, so they keep the full object drawer;+// every other row here is a record about the cluster's configuration.+const hasObjectDrawer = (resource: Resource): boolean => resource.type === 'k8s-namespace';+// Data shape, Token refs, and Labels are composite summaries with no single// scalar to order on, so they stay non-sortable. Lifecycle / trust is a// single categorical string per row, which makes sorting group like rows.@@ -408,15 +518,38 @@ export const KubernetesConfigTable: Component<{</span></TableCell></TableRow>- <PlatformResourceDetailTableRow- resource={resource}- statusIndicator={indicator()}- open={isExpanded()}- detailRowId={detailRowId()}- colSpan={7}- resolveResourceLabel={resolveResourceLabel}- onClose={() => drawer.close(resource)}- />+ <Show+ when={hasObjectDrawer(resource)}+ fallback={+ <Show when={isExpanded()}>+ <InlineDetailTableRow+ cellId={detailRowId()}+ colspan={7}+ data-inline-kubernetes-config-detail-for={resource.id}+ >+ <KubernetesRecordDetailPanel+ testId="kubernetes-config-detail"+ resource={resource}+ title={name()}+ status={indicator()}+ summary={configSummary(resource)}+ sections={(now) => buildConfigDetailSections(resource, now)}+ onClose={() => drawer.close(resource)}+ />+ </InlineDetailTableRow>+ </Show>+ }+ >+ <PlatformResourceDetailTableRow+ resource={resource}+ statusIndicator={indicator()}+ open={isExpanded()}+ detailRowId={detailRowId()}+ colSpan={7}+ resolveResourceLabel={resolveResourceLabel}+ onClose={() => drawer.close(resource)}+ />+ </Show></>);}}diff --git a/frontend-modern/src/features/kubernetes/KubernetesEventsTable.tsx b/frontend-modern/src/features/kubernetes/KubernetesEventsTable.tsxindex e4cca1bff2..b52662306f 100644--- a/frontend-modern/src/features/kubernetes/KubernetesEventsTable.tsx+++ b/frontend-modern/src/features/kubernetes/KubernetesEventsTable.tsx@@ -1,5 +1,6 @@import { Show, createMemo, type Component, type JSX } from 'solid-js';import { StatusDot } from '@/components/shared/StatusDot';+import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';import { asTrimmedString } from '@/utils/stringUtils';import {@@ -19,9 +20,7 @@ import {} from '@/features/platformPage/sharedPlatformPage';import {PlatformResourceDetailToggleButton,- PlatformResourceDetailTableRow,createPlatformResourceDetailState,- createPlatformResourceLabelResolver,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';import type { Resource } from '@/types/resource';@@ -32,17 +31,15 @@ import {type KubernetesResourceStatusFilter,isSingleKubernetesCluster,} from './kubernetesPageModel';+import {+ KubernetesEventDetailPanel,+ kubernetesEventInvolvedObject,+ kubernetesEventName,+} from './KubernetesRecordDetail';import { KubernetesScopeText } from './KubernetesScopeText';-const eventName = (resource: Resource): string =>- asTrimmedString(resource.displayName) || asTrimmedString(resource.name) || resource.id;-const involvedObject = (resource: Resource): string =>- formatPlatformTableTextValue(- [resource.kubernetes?.involvedKind, resource.kubernetes?.involvedName]- .filter(Boolean)- .join('/'),- );+ formatPlatformTableTextValue(kubernetesEventInvolvedObject(resource));const observedTimestamp = (resource: Resource): string =>asTrimmedString(@@ -67,7 +64,6 @@ export const KubernetesEventsTable: Component<{filter: filterKubernetesResources,});const drawer = createPlatformResourceDetailState({ idPrefix: 'kubernetes-event-drawer' });- const resolveResourceLabel = createPlatformResourceLabelResolver(() => props.resources);return (<Show@@ -162,7 +158,7 @@ export const KubernetesEventsTable: Component<{{(resource) => {const indicator = () =>mapKubernetesEventSeverity(resource.kubernetes?.eventType);- const name = () => eventName(resource);+ const name = () => kubernetesEventName(resource);const observed = () => observedTimestamp(resource);const message = () =>formatPlatformTableTextValue(resource.kubernetes?.message);@@ -246,15 +242,19 @@ export const KubernetesEventsTable: Component<{</span></TableCell></TableRow>- <PlatformResourceDetailTableRow- resource={resource}- statusIndicator={indicator()}- open={isExpanded()}- detailRowId={detailRowId()}- colSpan={8}- resolveResourceLabel={resolveResourceLabel}- onClose={() => drawer.close(resource)}- />+ <Show when={isExpanded()}>+ <InlineDetailTableRow+ cellId={detailRowId()}+ colspan={8}+ data-inline-kubernetes-event-detail-for={resource.id}+ >+ <KubernetesEventDetailPanel+ resource={resource}+ status={indicator()}+ onClose={() => drawer.close(resource)}+ />+ </InlineDetailTableRow>+ </Show></>);}}diff --git a/frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsx b/frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsxindex 4e9e9eddf8..d8a7d28f00 100644--- a/frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsx+++ b/frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsx@@ -1,5 +1,11 @@import { createMemo, Show, type Component, type JSX } from 'solid-js';import { StatusDot } from '@/components/shared/StatusDot';+import {+ compactDetailRows,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';import { getSimpleStatusIndicator } from '@/utils/status';import { asTrimmedString } from '@/utils/stringUtils';@@ -20,9 +26,7 @@ import {} from '@/features/platformPage/sharedPlatformPage';import {PlatformResourceDetailToggleButton,- PlatformResourceDetailTableRow,createPlatformResourceDetailState,- createPlatformResourceLabelResolver,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';import type { Resource } from '@/types/resource';@@ -31,6 +35,11 @@ import {type KubernetesResourceStatusFilter,isSingleKubernetesCluster,} from './kubernetesPageModel';+import {+ KubernetesRecordDetailPanel,+ kubernetesLabelsSection,+ kubernetesObjectSection,+} from './KubernetesRecordDetail';import { KubernetesScopeText } from './KubernetesScopeText';// Kubernetes policy resources carry very different API fields. Keep this table@@ -179,6 +188,86 @@ const policyState = (resource: Resource): { label: string; title: string } => {const labelSummary = (resource: Resource): { label: string; title: string } =>summarizePlatformTableValues(resource.tags);+// The policy's own fields in full: the table cells summarise them and cap+// long lists, which a phone cannot hover to read.+const policyContentSection = (resource: Resource): DetailSection | null => {+ const k = resource.kubernetes;+ switch (resource.type) {+ case 'k8s-network-policy':+ return {+ label: 'Network policy',+ rows: compactDetailRows([+ makeDetailRow('Applies to', policyTypes(resource).title || policyTypes(resource).label, {+ wrap: true,+ }),+ typeof k?.ingressRuleCount === 'number'+ ? makeDetailRow('Ingress rules', String(k.ingressRuleCount))+ : null,+ typeof k?.egressRuleCount === 'number'+ ? makeDetailRow('Egress rules', String(k.egressRuleCount))+ : null,+ ]),+ };+ case 'k8s-pod-disruption-budget':+ return {+ label: 'Disruption budget',+ rows: compactDetailRows([+ makeDetailRow('Min available', asTrimmedString(k?.minAvailable)),+ makeDetailRow('Max unavailable', asTrimmedString(k?.maxUnavailable)),+ typeof k?.currentHealthy === 'number' || typeof k?.desiredHealthy === 'number'+ ? makeDetailRow(+ 'Healthy',+ `${k?.currentHealthy ?? 0} of ${k?.desiredHealthy ?? 0} wanted`,+ )+ : null,+ typeof k?.disruptionsAllowed === 'number'+ ? makeDetailRow('Disruptions allowed', String(k.disruptionsAllowed))+ : null,+ typeof k?.expectedPods === 'number'+ ? makeDetailRow('Expected pods', String(k.expectedPods))+ : null,+ ]),+ };+ case 'k8s-resource-quota': {+ const hard = k?.hard ?? {};+ const used = k?.used ?? {};+ return {+ label: 'Quota (used of hard limit)',+ rows: compactDetailRows(+ quotaKeys(resource).map((key) =>+ makeDetailRow(key, `${used[key] ?? '0'} of ${hard[key] ?? 'no limit'}`, {+ wrap: true,+ }),+ ),+ ),+ };+ }+ case 'k8s-limit-range':+ return {+ label: 'Limit range',+ rows: compactDetailRows([+ makeDetailRow('Limits', (k?.limitTypes ?? []).join(', '), { wrap: true }),+ ]),+ };+ default:+ return null;+ }+};++const policySummary = (resource: Resource): string =>+ [policyShape(resource).label, policyState(resource).label]+ .filter((part) => part && part !== '—')+ .join(' · ');++const buildPolicyDetailSections = (+ resource: Resource,+ now: number,+): Array<DetailSection | null> => [+ kubernetesObjectSection(resource, policyKind(resource), now),+ policyContentSection(resource),+ kubernetesLabelsSection(resource),+];+export const KubernetesPolicyTable: Component<{resources: Resource[];emptyIcon: JSX.Element;@@ -198,7 +287,6 @@ export const KubernetesPolicyTable: Component<{externalStatus: props.externalStatus,});const drawer = createPlatformResourceDetailState({ idPrefix: 'kubernetes-policy-drawer' });- const resolveResourceLabel = createPlatformResourceLabelResolver(() => props.resources);return (<Show@@ -372,15 +460,23 @@ export const KubernetesPolicyTable: Component<{</span></TableCell></TableRow>- <PlatformResourceDetailTableRow- resource={resource}- statusIndicator={indicator()}- open={isExpanded()}- detailRowId={detailRowId()}- colSpan={7}- resolveResourceLabel={resolveResourceLabel}- onClose={() => drawer.close(resource)}- />+ <Show when={isExpanded()}>+ <InlineDetailTableRow+ cellId={detailRowId()}+ colspan={7}+ data-inline-kubernetes-policy-detail-for={resource.id}+ >+ <KubernetesRecordDetailPanel+ testId="kubernetes-policy-detail"+ resource={resource}+ title={name()}+ status={indicator()}+ summary={policySummary(resource)}+ sections={(now) => buildPolicyDetailSections(resource, now)}+ onClose={() => drawer.close(resource)}+ />+ </InlineDetailTableRow>+ </Show></>);}}diff --git a/frontend-modern/src/features/kubernetes/KubernetesRecordDetail.tsx b/frontend-modern/src/features/kubernetes/KubernetesRecordDetail.tsxnew file mode 100644index 0000000000..66cf314400--- /dev/null+++ b/frontend-modern/src/features/kubernetes/KubernetesRecordDetail.tsx@@ -0,0 +1,234 @@+import { type Component, type JSX } from 'solid-js';+import {+ InlineDetailPanel,+ compactDetailRows,+ compactDetailSections,+ makeDetailRow,+ type DetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import {+ formatPlatformTableDateTimeValue,+ formatPlatformTableRelativeTimeValue,+} from '@/features/platformPage/sharedPlatformPage';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';+import type { ResourcePageSubject } from '@/features/platformNavigation/resourcePagePath';+import type { Resource } from '@/types/resource';+import { useRelativeTimeNow } from '@/utils/relativeTimeClock';+import type { StatusIndicator } from '@/utils/status';+import { asTrimmedString } from '@/utils/stringUtils';+import { kubernetesClusterLabel, mapKubernetesEventSeverity } from './kubernetesPageModel';++// Events, ConfigMaps, Secrets, RBAC objects and namespace policies are+// records about a cluster, not objects Pulse monitors: they carry no alerts,+// history or maintenance of their own. Their drawer is a record panel headed+// by the object's name and its row's own status dot.+export const KubernetesRecordDetailPanel: Component<{+ testId: string;+ resource: Resource;+ title: string;+ status: StatusIndicator;+ summary?: JSX.Element;+ actions?: JSX.Element;+ /** Built against the shared relative-time clock so ages keep moving while open. */+ sections: (now: number) => Array<DetailSection | null>;+ onClose: () => void;+}> = (props) => {+ const now = useRelativeTimeNow();+ return (+ <InlineDetailPanel+ testId={props.testId}+ detailFor={props.resource.id}+ title={props.title}+ status={props.status}+ summary={props.summary}+ actions={props.actions}+ sections={compactDetailSections(props.sections(now()))}+ onClose={props.onClose}+ />+ );+};++// "Oct 2, 2026, 09:13 PM (1h ago)": the absolute time an operator compares+// with `kubectl` output, and the age that says whether it still matters.+export const kubernetesTimestampRow = (+ label: string,+ timestamp: string | undefined,+ now: number,+): DetailRow | null => {+ const raw = asTrimmedString(timestamp);+ if (!raw) return null;+ const absolute = formatPlatformTableDateTimeValue(raw, {+ emptyText: '',+ dateTimeFormat: { year: 'numeric' },+ });+ if (!absolute) return makeDetailRow(label, raw, { wrap: true });+ const relative = formatPlatformTableRelativeTimeValue(raw, { emptyText: '', now });+ return makeDetailRow(label, relative ? `${absolute} (${relative})` : absolute, {+ title: raw,+ wrap: true,+ });+};++/** Where an object lives: its kind, namespace and cluster, and when it was made. */+export const kubernetesObjectSection = (+ resource: Resource,+ kind: string,+ now: number,+): DetailSection => ({+ label: 'Object',+ rows: compactDetailRows([+ makeDetailRow('Kind', kind),+ makeDetailRow('Namespace', asTrimmedString(resource.kubernetes?.namespace), { wrap: true }),+ makeDetailRow('Cluster', kubernetesClusterLabel(resource), { wrap: true }),+ kubernetesTimestampRow('Created', resource.kubernetes?.createdAt, now),+ ]),+});++// Every label, key above value, because keys such as+// app.kubernetes.io/managed-by are too long for the label column. Resources+// that only carry the registry's tags list them on one wrapped row.+export const kubernetesLabelsSection = (resource: Resource): DetailSection | null => {+ const labels = Object.entries(resource.kubernetes?.labels ?? {}).sort(([a], [b]) =>+ a.localeCompare(b),+ );+ if (labels.length > 0) {+ return {+ label: `Labels (${labels.length})`,+ rows: compactDetailRows(+ labels.map(([key, value]) =>+ makeDetailRow(key, asTrimmedString(value) || '(empty)', {+ layout: 'stacked',+ wrap: true,+ }),+ ),+ ),+ };+ }+ const tags = (resource.tags ?? []).map((tag) => asTrimmedString(tag)).filter(Boolean);+ if (tags.length === 0) return null;+ return {+ label: 'Labels',+ rows: compactDetailRows([makeDetailRow('Tags', tags.join(', '), { wrap: true })]),+ };+};++// The Kubernetes kinds whose objects a Kubernetes page lists and filters by+// name (KUBERNETES_TAB_BY_TYPE in resourcePagePath). An event about any other+// kind gets no link: there is no row to bring into view.+const KUBERNETES_KIND_RESOURCE_TYPES: Record<string, string> = {+ Node: 'k8s-node',+ Pod: 'pod',+ Deployment: 'k8s-deployment',+ StatefulSet: 'k8s-statefulset',+ DaemonSet: 'k8s-daemonset',+ ReplicaSet: 'k8s-replicaset',+ Job: 'k8s-job',+ CronJob: 'k8s-cronjob',+ Service: 'k8s-service',+ Ingress: 'k8s-ingress',+ EndpointSlice: 'k8s-endpoint-slice',+ PersistentVolume: 'k8s-persistent-volume',+ PersistentVolumeClaim: 'k8s-persistent-volume-claim',+ StorageClass: 'k8s-storage-class',+ Namespace: 'k8s-namespace',+ ConfigMap: 'k8s-configmap',+ Secret: 'k8s-secret',+ ServiceAccount: 'k8s-serviceaccount',+ Role: 'k8s-role',+ ClusterRole: 'k8s-cluster-role',+ RoleBinding: 'k8s-role-binding',+ ClusterRoleBinding: 'k8s-cluster-role-binding',+ ResourceQuota: 'k8s-resource-quota',+ NetworkPolicy: 'k8s-network-policy',+ LimitRange: 'k8s-limit-range',+ PodDisruptionBudget: 'k8s-pod-disruption-budget',+};++export const kubernetesEventInvolvedSubject = (resource: Resource): ResourcePageSubject | null => {+ const kind = asTrimmedString(resource.kubernetes?.involvedKind);+ const name = asTrimmedString(resource.kubernetes?.involvedName);+ const type = kind ? KUBERNETES_KIND_RESOURCE_TYPES[kind] : undefined;+ if (!name || !type) return null;+ const namespace = asTrimmedString(resource.kubernetes?.namespace);+ return { id: namespace ? `${namespace}/${name}` : name, name, type };+};++export const kubernetesEventInvolvedObject = (resource: Resource): string =>+ [resource.kubernetes?.involvedKind, resource.kubernetes?.involvedName]+ .map((part) => asTrimmedString(part))+ .filter(Boolean)+ .join('/');++export const kubernetesEventName = (resource: Resource): string =>+ asTrimmedString(resource.displayName) || asTrimmedString(resource.name) || resource.id;++const buildEventDetailSections = (resource: Resource, now: number): DetailSection[] => {+ const k = resource.kubernetes;+ // Kubernetes keeps the first and last time it saw a repeating event;+ // Pulse stores the last one as the event's createdAt. The newer events API+ // reports one eventTime instead.+ const firstSeen = asTrimmedString(k?.firstSeen) || asTrimmedString(k?.eventTime);+ const lastSeen = asTrimmedString(k?.createdAt);+ const count = typeof k?.count === 'number' && k.count > 0 ? k.count : undefined;+ const severity = mapKubernetesEventSeverity(k?.eventType);+ return [+ {+ label: 'Event',+ rows: compactDetailRows([+ makeDetailRow('Reason', asTrimmedString(k?.reason), { wrap: true }),+ makeDetailRow('Type', severity.label, {+ tone: severity.variant === 'warning' ? 'warning' : undefined,+ }),+ count ? makeDetailRow('Count', count === 1 ? 'Once' : `${count} times`) : null,+ kubernetesTimestampRow(+ lastSeen && lastSeen !== firstSeen ? 'First seen' : 'Seen',+ firstSeen,+ now,+ ),+ lastSeen && lastSeen !== firstSeen+ ? kubernetesTimestampRow('Last seen', lastSeen, now)+ : null,+ makeDetailRow('Event name', kubernetesEventName(resource), { wrap: true }),+ ]),+ },+ {+ label: 'Object',+ rows: compactDetailRows([+ makeDetailRow('Kind', asTrimmedString(k?.involvedKind)),+ makeDetailRow('Name', asTrimmedString(k?.involvedName), { wrap: true }),+ makeDetailRow('Namespace', asTrimmedString(k?.namespace), { wrap: true }),+ makeDetailRow('Cluster', kubernetesClusterLabel(resource), { wrap: true }),+ ]),+ },+ ];+};++// An event is about another object: the drawer is headed by that object, says+// what happened in Kubernetes' own words, and links to the object where a+// Kubernetes page can filter to it.+export const KubernetesEventDetailPanel: Component<{+ resource: Resource;+ status: StatusIndicator;+ onClose: () => void;+}> = (props) => (+ <KubernetesRecordDetailPanel+ testId="kubernetes-event-detail"+ resource={props.resource}+ title={kubernetesEventInvolvedObject(props.resource) || kubernetesEventName(props.resource)}+ status={props.status}+ summary={+ asTrimmedString(props.resource.kubernetes?.message) ||+ asTrimmedString(props.resource.kubernetes?.reason) ||+ undefined+ }+ actions={+ <RecordOwnerLink+ subject={kubernetesEventInvolvedSubject(props.resource)}+ name={asTrimmedString(props.resource.kubernetes?.involvedName)}+ />+ }+ sections={(now) => buildEventDetailSections(props.resource, now)}+ onClose={props.onClose}+ />+);diff --git a/frontend-modern/src/features/kubernetes/__tests__/KubernetesAlertsTable.test.tsx b/frontend-modern/src/features/kubernetes/__tests__/KubernetesAlertsTable.test.tsxindex 5e23defdf4..890428a526 100644--- a/frontend-modern/src/features/kubernetes/__tests__/KubernetesAlertsTable.test.tsx+++ b/frontend-modern/src/features/kubernetes/__tests__/KubernetesAlertsTable.test.tsx@@ -1,10 +1,20 @@-import { cleanup, render, screen } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';+import { Route, Router } from '@solidjs/router';import { afterEach, describe, expect, it } from 'vitest';import type { Resource } from '@/types/resource';import { KubernetesAlertsTable } from '../KubernetesAlertsTable';import { buildKubernetesIncidentRows } from '../kubernetesPageModel';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const makeResource = ({id,type = 'pod',@@ -28,6 +38,38 @@ afterEach(() => {});describe('KubernetesAlertsTable', () => {+ it('links an alert drawer to its pod, filtered on the workloads tab', async () => {+ const incidents = buildKubernetesIncidentRows([+ makeResource({+ id: 'pod-payments',+ type: 'pod',+ name: 'payments-worker-abc',+ displayName: 'payments-worker-abc',+ kubernetes: { clusterName: 'prod-eu', namespace: 'services' },+ incidents: [+ { code: 'k8s_pod_crashloop', severity: 'critical', summary: 'CrashLoopBackOff' },+ ],+ }),+ ]);+ renderInRouter(() => (+ <KubernetesAlertsTable+ incidents={incidents}+ emptyIcon={<span />}+ emptyTitle="No alerts"+ emptyDescription="No alerts"+ showToolbar={false}+ />+ ));++ await fireEvent.click(+ screen.getByRole('button', { name: 'Expand details for payments-worker-abc' }),+ );+ expect(screen.getByRole('link', { name: 'Open payments-worker-abc' })).toHaveAttribute(+ 'href',+ '/kubernetes/workloads?q=payments-worker-abc',+ );+ });+it('renders incident rows critical → warning → info with severity-coloured dots', () => {const incidents = buildKubernetesIncidentRows([makeResource({@@ -66,7 +108,7 @@ describe('KubernetesAlertsTable', () => {}),]);- render(() => (+ renderInRouter(() => (<KubernetesAlertsTableincidents={incidents}emptyIcon={<span />}@@ -93,7 +135,7 @@ describe('KubernetesAlertsTable', () => {});it('renders the empty-state fallback when given no incidents', () => {- render(() => (+ renderInRouter(() => (<KubernetesAlertsTableincidents={[]}emptyIcon={<span data-testid="empty-icon" />}diff --git a/frontend-modern/src/features/kubernetes/__tests__/KubernetesConfigTable.test.tsx b/frontend-modern/src/features/kubernetes/__tests__/KubernetesConfigTable.test.tsxindex 4c18fab8cb..b3ee72f535 100644--- a/frontend-modern/src/features/kubernetes/__tests__/KubernetesConfigTable.test.tsx+++ b/frontend-modern/src/features/kubernetes/__tests__/KubernetesConfigTable.test.tsx@@ -1,4 +1,4 @@-import { cleanup, render, screen } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';import { afterEach, describe, expect, it } from 'vitest';import type { Resource } from '@/types/resource';@@ -174,4 +174,78 @@ describe('KubernetesConfigTable', () => {expect(screen.getByText('2 subjects · Group, ServiceAccount')).toBeInTheDocument();expect(screen.getByText('3 subjects · Group, ServiceAccount +1')).toBeInTheDocument();});+ it('opens a Secret as a record that never names its keys', () => {+ render(() => (+ <KubernetesConfigTable+ resources={[+ makeResource({+ id: 'api-secret',+ type: 'k8s-secret',+ kubernetes: {+ clusterName: 'prod',+ namespace: 'apps',+ resourceKind: 'Secret',+ secretType: 'Opaque',+ dataKeys: ['db-password'],+ immutable: true,+ },+ tags: ['team:payments'],+ }),+ ]}+ emptyIcon={<span />}+ emptyTitle="No config"+ emptyDescription="No config"+ showToolbar={false}+ />+ ));++ const disclosure = screen.getByRole('button', { name: 'Expand details for api-secret' });+ fireEvent.click(disclosure);+ const panel = document.querySelector<HTMLElement>('[data-testid="kubernetes-config-detail"]')!;+ const detail = within(panel);+ expect(disclosure).toHaveAttribute('aria-controls', 'kubernetes-config-drawer-api-secret');+ expect(detail.getByRole('heading', { name: 'api-secret' })).toBeInTheDocument();+ expect(detail.getByText('Opaque')).toBeInTheDocument();+ expect(detail.getByText('1 data key')).toBeInTheDocument();+ expect(detail.getByText('prod')).toBeInTheDocument();+ expect(detail.getByText('team:payments')).toBeInTheDocument();+ expect(panel.textContent).not.toContain('db-password');+ // A record, not a monitored object: no Manage tab.+ expect(detail.queryByRole('tab', { name: 'Manage' })).toBeNull();+ });++ it('opens an RBAC binding as a record of the role and subjects it binds', () => {+ render(() => (+ <KubernetesConfigTable+ resources={[+ makeResource({+ id: 'rb-checkout',+ type: 'k8s-role-binding',+ name: 'checkout-api-runtime',+ kubernetes: {+ clusterName: 'prod',+ namespace: 'apps',+ resourceKind: 'RoleBinding',+ roleKind: 'Role',+ roleName: 'checkout-api-runtime',+ subjectCount: 2,+ subjectKinds: ['Group', 'ServiceAccount'],+ },+ }),+ ]}+ emptyIcon={<span />}+ emptyTitle="No RBAC"+ emptyDescription="No RBAC"+ showToolbar={false}+ />+ ));++ fireEvent.click(document.querySelector('[data-kubernetes-config-row="rb-checkout"]')!);+ const detail = within(+ document.querySelector<HTMLElement>('[data-testid="kubernetes-config-detail"]')!,+ );+ expect(detail.getByText('RoleBinding')).toBeInTheDocument();+ expect(detail.getByText('2 subjects')).toBeInTheDocument();+ expect(detail.getByText('Group, ServiceAccount')).toBeInTheDocument();+ });});diff --git a/frontend-modern/src/features/kubernetes/__tests__/KubernetesEventsTable.test.tsx b/frontend-modern/src/features/kubernetes/__tests__/KubernetesEventsTable.test.tsxindex accb322e0a..7a23f61e3e 100644--- a/frontend-modern/src/features/kubernetes/__tests__/KubernetesEventsTable.test.tsx+++ b/frontend-modern/src/features/kubernetes/__tests__/KubernetesEventsTable.test.tsx@@ -1,4 +1,5 @@-import { cleanup, render, screen } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';+import { Route, Router } from '@solidjs/router';import { afterEach, describe, expect, it, vi } from 'vitest';import type { Resource } from '@/types/resource';@@ -100,4 +101,71 @@ describe('KubernetesEventsTable', () => {),).toEqual(['warning-event', 'normal-event']);});+ it('opens an event as a record about its involved object', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2026-05-24T15:00:00Z'));++ render(() => (+ <Router>+ <Route+ path="/"+ component={() => (+ <KubernetesEventsTable+ resources={[+ makeResource({+ id: 'warning-event',+ name: 'checkout-api-123.17f',+ displayName: 'checkout-api-123.17f',+ type: 'k8s-event',+ kubernetes: {+ clusterName: 'prod',+ namespace: 'apps',+ resourceKind: 'Event',+ eventType: 'Warning',+ reason: 'FailedScheduling',+ involvedKind: 'Pod',+ involvedName: 'checkout-api-123',+ count: 3,+ firstSeen: '2026-05-24T12:00:00Z',+ createdAt: '2026-05-24T13:00:00Z',+ message: '0/3 nodes are available',+ },+ }),+ ]}+ emptyIcon={<span />}+ emptyTitle="No events"+ emptyDescription="No events"+ showToolbar={false}+ />+ )}+ />+ </Router>+ ));++ const disclosure = screen.getByRole('button', {+ name: 'Expand details for checkout-api-123.17f',+ });+ fireEvent.click(disclosure);++ const panel = document.querySelector<HTMLElement>('[data-testid="kubernetes-event-detail"]')!;+ const detail = within(panel);+ expect(disclosure).toHaveAttribute('aria-controls', 'kubernetes-event-drawer-warning-event');+ expect(detail.getByRole('heading', { name: 'Pod/checkout-api-123' })).toBeInTheDocument();+ expect(detail.getByLabelText('Warning')).toBeInTheDocument();+ expect(detail.getByText('0/3 nodes are available')).toBeInTheDocument();+ expect(detail.getByText('FailedScheduling')).toBeInTheDocument();+ expect(detail.getByText('3 times')).toBeInTheDocument();+ expect(detail.getByText('First seen')).toBeInTheDocument();+ expect(detail.getAllByTitle('2026-05-24T13:00:00Z')[0]).toHaveTextContent(/\(2h ago\)$/);+ expect(detail.getByRole('link', { name: 'Open checkout-api-123' })).toHaveAttribute(+ 'href',+ '/kubernetes/workloads?q=checkout-api-123',+ );+ // An event is a record, not a monitored object: no Manage tab or+ // maintenance window for something Kubernetes discards within the hour.+ expect(detail.queryByRole('tab', { name: 'Manage' })).toBeNull();++ fireEvent.click(detail.getByRole('button', { name: 'Collapse Pod/checkout-api-123 details' }));+ expect(document.querySelector('[data-testid="kubernetes-event-detail"]')).toBeNull();+ });});diff --git a/frontend-modern/src/features/kubernetes/__tests__/KubernetesPolicyTable.test.tsx b/frontend-modern/src/features/kubernetes/__tests__/KubernetesPolicyTable.test.tsxindex 9805633720..d724aa7280 100644--- a/frontend-modern/src/features/kubernetes/__tests__/KubernetesPolicyTable.test.tsx+++ b/frontend-modern/src/features/kubernetes/__tests__/KubernetesPolicyTable.test.tsx@@ -1,4 +1,4 @@-import { cleanup, render, screen } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';import { afterEach, describe, expect, it } from 'vitest';import type { Resource } from '@/types/resource';@@ -110,4 +110,42 @@ describe('KubernetesPolicyTable', () => {expect(screen.getByText('LimitRange')).toBeInTheDocument();expect(screen.getByText('Container, Pod')).toBeInTheDocument();});+ it('opens a ResourceQuota as a record with every limit in full', () => {+ render(() => (+ <KubernetesPolicyTable+ resources={[+ makeResource({+ id: 'apps-quota',+ type: 'k8s-resource-quota',+ kubernetes: {+ clusterName: 'prod',+ namespace: 'apps',+ resourceKind: 'ResourceQuota',+ hard: { pods: '80', 'requests.cpu': '24', 'requests.memory': '96Gi' },+ used: { pods: '34', 'requests.cpu': '11', 'requests.memory': '42Gi' },+ },+ }),+ ]}+ emptyIcon={<span />}+ emptyTitle="No policy"+ emptyDescription="No policy"+ showToolbar={false}+ />+ ));++ const disclosure = screen.getByRole('button', { name: 'Expand details for apps-quota' });+ fireEvent.click(disclosure);+ const panel = document.querySelector<HTMLElement>('[data-testid="kubernetes-policy-detail"]')!;+ const detail = within(panel);+ expect(disclosure).toHaveAttribute('aria-controls', 'kubernetes-policy-drawer-apps-quota');+ expect(detail.getByRole('heading', { name: 'apps-quota' })).toBeInTheDocument();+ expect(detail.getByText('ResourceQuota')).toBeInTheDocument();+ expect(detail.getByText('34 of 80')).toBeInTheDocument();+ expect(detail.getByText('requests.memory')).toBeInTheDocument();+ expect(detail.getByText('42Gi of 96Gi')).toBeInTheDocument();+ expect(detail.queryByRole('tab', { name: 'Manage' })).toBeNull();++ fireEvent.click(detail.getByRole('button', { name: 'Collapse apps-quota details' }));+ expect(document.querySelector('[data-testid="kubernetes-policy-detail"]')).toBeNull();+ });});diff --git a/frontend-modern/src/features/platformPage/RecordOwnerLink.tsx b/frontend-modern/src/features/platformPage/RecordOwnerLink.tsxnew file mode 100644index 0000000000..4bcde98f9a--- /dev/null+++ b/frontend-modern/src/features/platformPage/RecordOwnerLink.tsx@@ -0,0 +1,71 @@+import { A } from '@solidjs/router';+import ArrowUpRightIcon from 'lucide-solid/icons/arrow-up-right';+import { Show, type Component } from 'solid-js';+import { getDrawerHeaderActionButtonClass } from '@/components/shared/buttonModel';+import {+ buildResourcePagePath,+ type ResourcePageSubject,+} from '@/features/platformNavigation/resourcePagePath';+import {+ DOCKER_QUERY_PARAMS,+ KUBERNETES_QUERY_PARAMS,+ STANDALONE_QUERY_PARAMS,+ STORAGE_QUERY_PARAMS,+ WORKLOADS_QUERY_PARAMS,+} from '@/routing/resourceLinks';++// The parameters with which a platform page opens one resource's drawer or+// filters its table down to that resource.+const RESOURCE_FOCUS_PARAMS: ReadonlySet<string> = new Set([+ WORKLOADS_QUERY_PARAMS.resource,+ STORAGE_QUERY_PARAMS.resource,+ STORAGE_QUERY_PARAMS.query,+ DOCKER_QUERY_PARAMS.query,+ KUBERNETES_QUERY_PARAMS.query,+ STANDALONE_QUERY_PARAMS.query,+]);++/**+ * The page that brings the object a record is about into view, or null. A+ * record drawer (an alert, an activity, a backup) links to its owner only+ * where the owner's page can open or filter to it: a link that lands on a+ * whole tab leaves the user hunting for the row it promised.+ */+export function buildRecordOwnerPath(+ subject: ResourcePageSubject | null | undefined,+): string | null {+ if (!subject?.id?.trim()) return null;+ const path = buildResourcePagePath(subject);+ const queryStart = path?.indexOf('?') ?? -1;+ if (!path || queryStart < 0) return null;+ const params = new URLSearchParams(path.slice(queryStart + 1));+ for (const [key, value] of params) {+ if (RESOURCE_FOCUS_PARAMS.has(key) && value.trim()) return path;+ }+ return null;+}++/** A record drawer's header action that opens the object the record is about. */+export const RecordOwnerLink: Component<{+ subject: ResourcePageSubject | null | undefined;+ /** What the link names; defaults to the subject's name. */+ name?: string;+}> = (props) => {+ const href = () => buildRecordOwnerPath(props.subject);+ const label = () => `Open ${props.name?.trim() || props.subject?.name?.trim() || 'resource'}`;+ return (+ <Show when={href()}>+ {(path) => (+ <A+ href={path()}+ class={getDrawerHeaderActionButtonClass('max-w-48 sm:max-w-64')}+ title={label()}+ data-record-owner-link+ >+ <ArrowUpRightIcon class="h-3.5 w-3.5 shrink-0" aria-hidden="true" />+ <span class="truncate">{label()}</span>+ </A>+ )}+ </Show>+ );+};diff --git a/frontend-modern/src/features/platformPage/__tests__/RecordOwnerLink.test.tsx b/frontend-modern/src/features/platformPage/__tests__/RecordOwnerLink.test.tsxnew file mode 100644index 0000000000..7562e5819e--- /dev/null+++ b/frontend-modern/src/features/platformPage/__tests__/RecordOwnerLink.test.tsx@@ -0,0 +1,77 @@+import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';+import { Route, Router } from '@solidjs/router';+import { afterEach, describe, expect, it } from 'vitest';++import { RecordOwnerLink, buildRecordOwnerPath } from '../RecordOwnerLink';++afterEach(() => {+ cleanup();+ window.history.replaceState(null, '', '/');+});++describe('buildRecordOwnerPath', () => {+ it('links where the owning page opens or filters to the resource', () => {+ expect(buildRecordOwnerPath({ id: 'pve:pve-a:100', name: 'web', type: 'vm' })).toBe(+ '/proxmox/overview?resource=pve%3Apve-a%3A100',+ );+ expect(buildRecordOwnerPath({ id: 'storage-1', name: 'local-zfs', type: 'storage' })).toBe(+ '/proxmox/storage?resource=storage-1',+ );+ expect(buildRecordOwnerPath({ id: 'vm-9', name: 'api', type: 'vmware-vm' })).toBe(+ '/vmware/overview?resource=vm-9',+ );+ expect(buildRecordOwnerPath({ id: 'pod-1', name: 'payments', type: 'pod' })).toBe(+ '/kubernetes/workloads?q=payments',+ );+ expect(buildRecordOwnerPath({ id: 'ctr-1', name: 'redis', type: 'app-container' })).toBe(+ '/docker/overview?q=redis',+ );+ });++ it('omits the link where the owning page can only show a whole tab', () => {+ expect(buildRecordOwnerPath({ id: 'ds-1', name: 'tank/apps', type: 'truenas-dataset' })).toBe(+ null,+ );+ expect(buildRecordOwnerPath({ id: 'host-1', name: 'esxi-01', type: 'vmware-host' })).toBe(null);+ expect(buildRecordOwnerPath({ id: 'img-1', name: 'nginx', type: 'docker-image' })).toBe(null);+ expect(buildRecordOwnerPath({ id: 'pbs-1', name: 'pbs', type: 'pbs' })).toBe(null);+ expect(buildRecordOwnerPath({ id: '', name: 'web', type: 'vm' })).toBe(null);+ expect(buildRecordOwnerPath(null)).toBe(null);+ });+});++describe('RecordOwnerLink', () => {+ it('navigates in the app to the owning resource', async () => {+ render(() => (+ <Router>+ <Route+ path="/*"+ component={() => (+ <RecordOwnerLink subject={{ id: 'pod-1', name: 'payments', type: 'pod' }} />+ )}+ />+ </Router>+ ));++ const link = screen.getByRole('link', { name: 'Open payments' });+ expect(link).toHaveAttribute('data-record-owner-link');+ await fireEvent.click(link);+ await waitFor(() => expect(window.location.pathname).toBe('/kubernetes/workloads'));+ expect(window.location.search).toBe('?q=payments');+ });++ it('renders nothing when the owner cannot be focused', () => {+ render(() => (+ <Router>+ <Route+ path="/*"+ component={() => (+ <RecordOwnerLink subject={{ id: 'ds-1', name: 'tank', type: 'truenas-dataset' }} />+ )}+ />+ </Router>+ ));++ expect(screen.queryByRole('link')).not.toBeInTheDocument();+ });+});diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsxindex 77b8c8a058..b49d40d162 100644--- a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx@@ -254,9 +254,8 @@ export const ProxmoxBackupsTable: Component<{const [coverageSortKey, setCoverageSortKey] = createSignal<CoverageSortKey>('posture');const [coverageSortDirection, setCoverageSortDirection] = createSignal<'asc' | 'desc'>('asc');- const [expandedCoverageRows, setExpandedCoverageRows] = createSignal<ReadonlySet<string>>(- new Set<string>(),- );+ // One workload drawer at a time, across the live and unmatched tables.+ const [expandedCoverageKey, setExpandedCoverageKey] = createSignal<string | null>(null);// Unmatched backups (VM/LXC evidence without an unambiguous live identity)// are collapsed by default so the main table is active backup targets, not a// pile of unassigned artifacts sorted to the top.@@ -288,12 +287,7 @@ export const ProxmoxBackupsTable: Component<{}};const toggleCoverageExpansion = (key: string) =>- setExpandedCoverageRows((current) => {- const next = new Set(current);- if (next.has(key)) next.delete(key);- else next.add(key);- return next;- });+ setExpandedCoverageKey((current) => (current === key ? null : key));const toggleDay = (key: string) => setSelectedDateKey(selectedDateKey() === key ? null : key);// Retain readable observations while a retry is pending, but never treat a@@ -937,7 +931,7 @@ export const ProxmoxBackupsTable: Component<{sortKey={coverageSortKey}sortDirection={coverageSortDirection}onSort={handleCoverageSort}- expandedKeys={expandedCoverageRows()}+ expandedKey={expandedCoverageKey()}onToggleExpand={toggleCoverageExpansion}showTaskColumn={coverageHasTask()}/>@@ -973,7 +967,7 @@ export const ProxmoxBackupsTable: Component<{sortKey={coverageSortKey}sortDirection={coverageSortDirection}onSort={handleCoverageSort}- expandedKeys={expandedCoverageRows()}+ expandedKey={expandedCoverageKey()}onToggleExpand={toggleCoverageExpansion}showTaskColumn={coverageHasTask()}/>diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsxindex 64bc32400c..d424a93ae2 100644--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx@@ -2,7 +2,16 @@ import { For, Show, createEffect, createMemo, type Accessor, type JSX } from 'soimport { createStore, reconcile } from 'solid-js/store';+import {+ InlineDetailPanel,+ compactDetailRows,+ compactDetailSections,+ makeDetailRow,+ type DetailSection,+ type DetailValueTone,+} from '@/components/shared/DetailSectionTable';import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';+import { InlineNotice } from '@/components/shared/InlineNotice';import { StatusDot } from '@/components/shared/StatusDot';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';import {@@ -19,6 +28,7 @@ import {getPlatformResourceDetailRowInteractionProps,PlatformResourceDetailToggleButton,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import type { StatusIndicatorVariant } from '@/utils/status';import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';@@ -26,6 +36,7 @@ import {getWorkloadRecoveryPostureLabel,type WorkloadCoverageRow,} from './proxmoxBackupRecoveryModel';+import { proxmoxBackupWorkloadSubject } from './proxmoxBackupWorkloadSubject';import type { CoverageSortKey } from './proxmoxBackupsTableModel';import {ArtifactSourceBadge,@@ -93,6 +104,12 @@ const statusWordToneClass = (variant: StatusIndicatorVariant): string => {return 'text-base-content';};+const statusDetailTone = (variant: StatusIndicatorVariant): DetailValueTone | undefined => {+ if (variant === 'danger') return 'danger';+ if (variant === 'warning') return 'warning';+ return undefined;+};+const compactPostureLabel = (posture: WorkloadCoverageRow['posture']): string => {switch (posture) {case 'protected':@@ -136,6 +153,50 @@ const postureExplanation = (row: WorkloadCoverageRow): string => {return 'Pulse cannot tell yet whether this guest is backed up.';};+// Provider evidence quality (did the job run, is history complete, can Pulse+// read it) explains a posture; it is detail, not the answer.+const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[] =>+ compactDetailSections([+ {+ label: 'Workload',+ rows: compactDetailRows([+ makeDetailRow('Type', row.workload.typeLabel),+ makeDetailRow(PROXMOX_BACKUP_COLUMN_LABELS.targetId, row.workload.vmid),+ makeDetailRow('Node', row.workload.node),+ makeDetailRow('Latest task', row.latestTask?.label, {+ tone: row.latestTask+ ? statusDetailTone(taskWordVariant(row.latestTask.label))+ : undefined,+ }),+ ]),+ },+ {+ label: 'Provider evidence',+ rows: compactDetailRows(+ (row.protectionPosture?.providerStates ?? []).map((provider) =>+ makeDetailRow(+ providerLabel(provider.provider),+ [+ `Job ${evidenceQualityLabel(provider.jobState)}`,+ `History ${evidenceQualityLabel(provider.historyCompleteness)}`,+ `Access ${evidenceQualityLabel(provider.permissions)}`,+ ].join(' · '),+ {+ layout: 'stacked',+ valueContent: (+ <span class="flex flex-wrap gap-x-3 text-left font-normal leading-snug">+ <span>Job {evidenceQualityLabel(provider.jobState)}</span>+ <span>History {evidenceQualityLabel(provider.historyCompleteness)}</span>+ <span>Access {evidenceQualityLabel(provider.permissions)}</span>+ </span>+ ),+ },+ ),+ ),+ ),+ },+ ]);+// "Workload coverage" table: one row per workload answering "does this have a// backup?" across PBS snapshots / PVE backup files / guest snapshots, each// expanding to its restore evidence. Presentational — the parent owns the@@ -153,7 +214,8 @@ export function ProxmoxCoverageTable(props: {sortKey: Accessor<CoverageSortKey>;sortDirection: Accessor<'asc' | 'desc'>;onSort: (key: CoverageSortKey) => void;- expandedKeys: ReadonlySet<string>;+ /** The one workload whose drawer is open, across the live and unmatched tables. */+ expandedKey: string | null;onToggleExpand: (key: string) => void;// The task column auto-hides when no workload has task history. Per-source// ages (PBS snapshot, PVE file, guest snapshot) live in the row expansion.@@ -295,7 +357,7 @@ export function ProxmoxCoverageTable(props: {</Show><For each={tableWindow.visibleItems()}>{(row) => {- const isExpanded = () => props.expandedKeys.has(row.key);+ const isExpanded = () => props.expandedKey === row.key;const evidence = () => selectCoverageRestoreEvidence(row.artifacts);const detailRowId = () => `proxmox-coverage-evidence-${row.key}`;return (@@ -463,186 +525,173 @@ export function ProxmoxCoverageTable(props: {colspan={columnCount()}data-inline-detail-for={row.key}>- <div class="mb-2 grid grid-cols-2 gap-x-3 gap-y-1 rounded-md border border-border-subtle bg-surface px-2 py-1.5 text-[11px] sm:grid-cols-4">- <span>- <span class="font-medium text-base-content">Type:</span>{' '}- <span class="text-muted">{row.workload.typeLabel}</span>- </span>- <span>- <span class="font-medium text-base-content">Target:</span>{' '}- <span class="font-mono text-muted">{row.workload.vmid || '—'}</span>- </span>- <span>- <span class="font-medium text-base-content">Node:</span>{' '}- <span class="text-muted">{row.workload.node || '—'}</span>- </span>- <span>- <span class="font-medium text-base-content">Workload:</span>{' '}- <span class="text-muted">{row.workload.label}</span>- </span>- </div>- <div class="mb-2 rounded-md border border-border-subtle bg-surface px-2 py-1.5 text-[11px] text-base-content">- <span class="font-medium">- {getWorkloadRecoveryPostureLabel(row.posture)}:- </span>{' '}- {postureExplanation(row)}- </div>- <Show when={(row.protectionPosture?.providerStates.length ?? 0) > 0}>- <div class="mb-2 overflow-hidden rounded-md border border-border-subtle">- <div class="bg-surface-alt px-2 py-1 text-[11px] font-medium text-base-content">- Provider evidence- </div>- <div class="divide-y divide-border-subtle">- <For each={row.protectionPosture?.providerStates ?? []}>- {(provider) => (- <div class="grid grid-cols-2 gap-x-3 gap-y-0.5 px-2 py-1.5 text-[11px] sm:grid-cols-4">- <span class="font-medium text-base-content">- {providerLabel(provider.provider)}- </span>- <span class="text-muted">- Job {evidenceQualityLabel(provider.jobState)}- </span>- <span class="text-muted">- History {evidenceQualityLabel(provider.historyCompleteness)}- </span>- <span class="text-muted">- Access {evidenceQualityLabel(provider.permissions)}- </span>- </div>- )}- </For>- </div>- </div>- </Show>- <Show- when={evidence().length > 0}- fallback={- <div class="text-xs text-muted">- No restore evidence has been discovered for this workload.- </div>+ <InlineDetailPanel+ testId="proxmox-coverage-detail"+ detailFor={row.key}+ title={row.workload.name || row.workload.label}+ status={{+ variant: coveragePostureVariant(row.posture),+ label: getWorkloadRecoveryPostureLabel(row.posture),+ }}+ summary={postureExplanation(row)}+ actions={+ <RecordOwnerLink+ subject={proxmoxBackupWorkloadSubject(row.workload)}+ />}+ sections={buildCoverageDetailSections(row)}+ onClose={() => props.onToggleExpand(row.key)}>- <div class="overflow-hidden">- <div class="mb-1 flex items-center justify-between gap-2 text-[11px]">- <span class="font-medium text-base-content">Restore evidence</span>- <Show when={row.artifacts.length > evidence().length}>- <span class="text-muted">- Showing {evidence().length} of {row.artifacts.length}- </span>- </Show>- </div>- <PlatformDetailTable class="table-fixed text-[11px]">- <PlatformDetailTableHeader>- <TableHead class={getPlatformTableHeadClassForKind('name')}>- Source- </TableHead>- <Show- when={isCoverageEvidenceColumnVisible(layoutMode(), 'location')}- >- <TableHead class={getPlatformTableHeadClassForKind('text')}>- Location- </TableHead>+ <Show+ when={evidence().length > 0}+ fallback={+ <InlineNotice+ tone={+ row.posture === 'unprotected' || row.posture === 'attention'+ ? 'warning'+ : 'info'+ }+ role="status"+ class="text-xs"+ >+ No restore points found for this workload.+ </InlineNotice>+ }+ >+ <div class="overflow-hidden rounded-sm border border-border bg-surface">+ <div class="flex items-center justify-between gap-2 bg-surface-alt px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-muted">+ <span>Restore evidence</span>+ <Show when={row.artifacts.length > evidence().length}>+ <span class="normal-case tracking-normal">+ Showing {evidence().length} of {row.artifacts.length}+ </span></Show>- <TableHead- class={getPlatformTableHeadClassForKind('numeric-value')}- >- {PROXMOX_BACKUP_COLUMN_LABELS.created}- </TableHead>- <Show- when={isCoverageEvidenceColumnVisible(layoutMode(), 'size')}- >+ </div>+ <PlatformDetailTable class="table-fixed text-[11px]">+ <PlatformDetailTableHeader>+ <TableHead class={getPlatformTableHeadClassForKind('name')}>+ Source+ </TableHead>+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'location',+ )}+ >+ <TableHead class={getPlatformTableHeadClassForKind('text')}>+ Location+ </TableHead>+ </Show><TableHeadclass={getPlatformTableHeadClassForKind('numeric-value')}>- Size+ {PROXMOX_BACKUP_COLUMN_LABELS.created}</TableHead>- </Show>- <TableHead class={getPlatformTableHeadClassForKind('badge')}>- State- </TableHead>- <Show- when={isCoverageEvidenceColumnVisible(layoutMode(), 'details')}- >- <TableHead class={getPlatformTableHeadClassForKind('text')}>- {PROXMOX_BACKUP_COLUMN_LABELS.details}+ <Show+ when={isCoverageEvidenceColumnVisible(layoutMode(), 'size')}+ >+ <TableHead+ class={getPlatformTableHeadClassForKind('numeric-value')}+ >+ Size+ </TableHead>+ </Show>+ <TableHead class={getPlatformTableHeadClassForKind('badge')}>+ State</TableHead>- </Show>- </PlatformDetailTableHeader>- <PlatformDetailTableBody class="divide-border-subtle">- <For each={evidence()}>- {(artifact) => (- <TableRow>- <TableCell class={getPlatformTableCellClassForKind('name')}>- <ArtifactSourceBadge artifact={artifact} />- </TableCell>- <Show- when={isCoverageEvidenceColumnVisible(- layoutMode(),- 'location',- )}- >+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'details',+ )}+ >+ <TableHead class={getPlatformTableHeadClassForKind('text')}>+ {PROXMOX_BACKUP_COLUMN_LABELS.details}+ </TableHead>+ </Show>+ </PlatformDetailTableHeader>+ <PlatformDetailTableBody class="divide-border-subtle">+ <For each={evidence()}>+ {(artifact) => (+ <TableRow><TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}+ class={getPlatformTableCellClassForKind('name')}>- <span class="block truncate" title={artifact.location}>- {artifact.location}- </span>+ <ArtifactSourceBadge artifact={artifact} /></TableCell>- </Show>- <TableCell- class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}- >- <ProxmoxBackupAgeText artifact={artifact} />- </TableCell>- <Show- when={isCoverageEvidenceColumnVisible(- layoutMode(),- 'size',- )}- >- <TableCell- class={`${getPlatformTableCellClassForKind('numeric-value')} tabular-nums text-base-content`}+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'location',+ )}>- <Show- when={artifact.size && artifact.size > 0}- fallback={<span class="text-muted">No size</span>}+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} whitespace-normal text-base-content`}>- {formatPlatformTableBytesValue(artifact.size)}- </Show>- </TableCell>- </Show>- <TableCell- class={getPlatformTableCellClassForKind('badge')}- >- <ArtifactStateBadge- artifact={artifact}- label={artifactStateLabel(artifact)}- />- </TableCell>- <Show- when={isCoverageEvidenceColumnVisible(- layoutMode(),- 'details',- )}- >+ <span+ class="block wrap-anywhere"+ data-coverage-evidence-location+ >+ {artifact.location}+ </span>+ </TableCell>+ </Show><TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}+ class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}+ >+ <ProxmoxBackupAgeText artifact={artifact} />+ </TableCell>+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'size',+ )}>- <span- class="block truncate"- title={artifact.detailTitle ?? artifact.detail}+ <TableCell+ class={`${getPlatformTableCellClassForKind('numeric-value')} tabular-nums text-base-content`}>- {artifact.detail || '—'}- </span>+ <Show+ when={artifact.size && artifact.size > 0}+ fallback={<span class="text-muted">No size</span>}+ >+ {formatPlatformTableBytesValue(artifact.size)}+ </Show>+ </TableCell>+ </Show>+ <TableCell+ class={getPlatformTableCellClassForKind('badge')}+ >+ <ArtifactStateBadge+ artifact={artifact}+ label={artifactStateLabel(artifact)}+ /></TableCell>- </Show>- </TableRow>- )}- </For>- </PlatformDetailTableBody>- </PlatformDetailTable>- </div>- </Show>+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'details',+ )}+ >+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} whitespace-normal text-base-content`}+ >+ <span+ class="block wrap-anywhere"+ title={artifact.detailTitle}+ data-coverage-evidence-detail+ >+ {artifact.detail || '—'}+ </span>+ </TableCell>+ </Show>+ </TableRow>+ )}+ </For>+ </PlatformDetailTableBody>+ </PlatformDetailTable>+ </div>+ </Show>+ </InlineDetailPanel></InlineDetailTableRow></Show></>diff --git a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsxindex ff15869e3f..7c80891ddf 100644--- a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx@@ -1,17 +1,33 @@import { For, Show, createMemo, type Accessor, type JSX } from 'solid-js';+import {+ InlineDetailPanel,+ compactDetailRows,+ compactDetailSections,+ makeDetailRow,+ type DetailSection,+} from '@/components/shared/DetailSectionTable';+import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';+import type { StatusIndicator } from '@/utils/status';import {getRecoveryFullDateLabel,recoveryDateKeyFromTimestamp,} from '@/utils/recoveryDatePresentation';import {formatPlatformTableBytesValue,+ formatPlatformTableDateTimeValue,getPlatformTableCellClassForKind,getPlatformTableHeadClassForKind,PlatformTableEmptyState,PlatformTableShell,} from '@/features/platformPage/sharedPlatformPage';+import {+ PlatformResourceDetailToggleButton,+ createPlatformResourceDetailState,+ getPlatformResourceDetailRowInteractionProps,+} from '@/features/platformPage/PlatformResourceDetailTableRow';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';import type { RecoverableArtifact } from './proxmoxBackupRecoveryModel';@@ -33,6 +49,8 @@ import {isCompactBackupIdentityLayout,type RecoverableColumnId,} from './proxmoxBackupsTablePresentation';+import { getProxmoxBackupSourcePresentation } from './proxmoxBackupSourcePresentation';+import { proxmoxBackupWorkloadSubject } from './proxmoxBackupWorkloadSubject';import { useProxmoxBackupTableWindowing } from './useProxmoxBackupTableWindowing';// Flat recoverable-artifact table. Parent state owns filtering, sorting, and@@ -69,6 +87,95 @@ function groupByDay(artifacts: readonly RecoverableArtifact[]): DayGroup[] {return groups;}+// The drawer dot repeats the row's State badge: the same states, the same colours.+const artifactStateIndicator = (artifact: RecoverableArtifact): StatusIndicator => {+ const label = artifactStateLabel(artifact);+ if (artifact.running) return { variant: 'info', label };+ if (artifact.failed) return { variant: 'danger', label };+ if (artifact.sourceKind === 'snapshot') return { variant: 'info', label };+ if (artifact.protected) return { variant: 'warning', label };+ if (artifact.verified === true) return { variant: 'success', label };+ if (artifact.verified === false) return { variant: 'warning', label };+ return { variant: 'muted', label };+};++const artifactVerificationText = (artifact: RecoverableArtifact): string => {+ if (artifact.verified === true) return 'Verified';+ if (artifact.verified === false) return 'Not verified';+ return '';+};++// Phones drop the location, size and details columns, so the drawer is where+// a restore point is always readable in full.+const buildRecoverableDetailSections = (artifact: RecoverableArtifact): DetailSection[] => {+ const source = getProxmoxBackupSourcePresentation(artifact.sourceKind);+ return compactDetailSections([+ {+ label: 'Restore point',+ rows: compactDetailRows([+ makeDetailRow('Source', source.detailFallbackLabel, {+ title: artifact.sourceTitle ?? source.sourceTitle,+ }),+ makeDetailRow('Location', artifact.location, { wrap: true }),+ makeDetailRow(+ PROXMOX_BACKUP_COLUMN_LABELS.created,+ artifact.createdMs === undefined+ ? 'Unknown'+ : formatPlatformTableDateTimeValue(artifact.createdMs),+ { tone: artifact.createdMs === undefined ? 'warning' : undefined },+ ),+ makeDetailRow(+ 'Size',+ artifact.size && artifact.size > 0 ? formatPlatformTableBytesValue(artifact.size) : '',+ ),+ ]),+ },+ {+ label: 'State',+ rows: compactDetailRows([+ makeDetailRow('State', artifactStateLabel(artifact)),+ makeDetailRow('Verification', artifactVerificationText(artifact), {+ tone: artifact.verified === false ? 'warning' : undefined,+ }),+ makeDetailRow('Protected', artifact.protected ? 'Yes, kept when pruning' : ''),+ ]),+ },+ {+ label: 'Workload',+ rows: compactDetailRows([+ makeDetailRow('Type', artifact.workload.typeLabel),+ makeDetailRow(PROXMOX_BACKUP_COLUMN_LABELS.targetId, artifact.workload.vmid),+ makeDetailRow('Node', artifact.workload.node),+ ]),+ },+ {+ label: PROXMOX_BACKUP_COLUMN_LABELS.details,+ rows: compactDetailRows([+ makeDetailRow('Identifier', artifact.detailTitle || artifact.detail, { wrap: true }),+ ]),+ },+ ]);+};++const RecoverableArtifactDetail = (props: {+ artifact: RecoverableArtifact;+ onClose: () => void;+}): JSX.Element => {+ const source = () => getProxmoxBackupSourcePresentation(props.artifact.sourceKind);+ return (+ <InlineDetailPanel+ testId="proxmox-recoverable-detail"+ detailFor={props.artifact.id}+ title={props.artifact.workload.name || props.artifact.workload.label}+ status={artifactStateIndicator(props.artifact)}+ summary={[source().detailFallbackLabel, props.artifact.location].filter(Boolean).join(' in ')}+ actions={<RecordOwnerLink subject={proxmoxBackupWorkloadSubject(props.artifact.workload)} />}+ sections={buildRecoverableDetailSections(props.artifact)}+ onClose={props.onClose}+ />+ );+};+export function ProxmoxRecoverableTable(props: {artifacts: RecoverableArtifact[];hasAnyArtifacts: boolean;@@ -112,92 +219,118 @@ export function ProxmoxRecoverableTable(props: {]);});const tableWindow = useProxmoxBackupTableWindowing(tableItems);+ const drawer = createPlatformResourceDetailState({ idPrefix: 'proxmox-recoverable-detail' });const renderRow = (artifact: RecoverableArtifact): JSX.Element => (- <TableRow class="hover:bg-surface-hover" data-proxmox-backup-row="recoverable">- <TableCell class={`${getPlatformTableCellClassForKind('name')} text-base-content`}>- <div class="flex min-w-0 items-center gap-1">- <div- class="min-w-0 truncate font-semibold"- title={[- artifact.workload.name || artifact.workload.label,- artifact.workload.typeLabel,- artifact.workload.vmid,- // The phone projection has no location column, so the row's- // hover title carries the repository instead.- columnVisible('location') ? undefined : artifact.location,- ]- .filter(Boolean)- .join(' · ')}- >- {artifact.workload.name || artifact.workload.label}+ <>+ <TableRow+ {...getPlatformResourceDetailRowInteractionProps({+ expanded: drawer.isExpanded(artifact),+ onToggle: () => drawer.toggle(artifact),+ class: 'hover:bg-surface-hover',+ })}+ data-proxmox-backup-row="recoverable"+ >+ <TableCell class={`${getPlatformTableCellClassForKind('name')} text-base-content`}>+ <div class="flex min-w-0 items-center gap-1">+ <PlatformResourceDetailToggleButton+ expanded={drawer.isExpanded(artifact)}+ resourceLabel={artifact.workload.name || artifact.workload.label}+ controlsId={drawer.detailRowId(artifact)}+ onToggle={() => drawer.toggle(artifact)}+ />+ <div+ class="min-w-0 truncate font-semibold"+ title={[+ artifact.workload.name || artifact.workload.label,+ artifact.workload.typeLabel,+ artifact.workload.vmid,+ // The phone projection has no location column, so the row's+ // hover title carries the repository instead.+ columnVisible('location') ? undefined : artifact.location,+ ]+ .filter(Boolean)+ .join(' · ')}+ >+ {artifact.workload.name || artifact.workload.label}+ </div>+ <Show when={isCompactBackupIdentityLayout(layoutMode())}>+ <span class="shrink-0 text-[10px] text-muted">+ {artifact.workload.typeLabel}+ <Show when={artifact.workload.vmid}> {artifact.workload.vmid}</Show>+ </span>+ </Show></div>- <Show when={isCompactBackupIdentityLayout(layoutMode())}>- <span class="shrink-0 text-[10px] text-muted">- {artifact.workload.typeLabel}- <Show when={artifact.workload.vmid}> {artifact.workload.vmid}</Show>- </span>- </Show>- </div>- </TableCell>- <Show when={columnVisible('type')}>- <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <ProxmoxBackupWorkloadTypeBadge- type={artifact.workload.type}- label={artifact.workload.typeLabel}- /></TableCell>- </Show>- <Show when={columnVisible('targetId')}>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-muted font-mono text-[11px] tabular-nums`}- >- {artifact.workload.vmid || '—'}- </TableCell>- </Show>- <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <ArtifactSourceBadge artifact={artifact} />- </TableCell>- <Show when={columnVisible('location')}>+ <Show when={columnVisible('type')}>+ <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>+ <ProxmoxBackupWorkloadTypeBadge+ type={artifact.workload.type}+ label={artifact.workload.typeLabel}+ />+ </TableCell>+ </Show>+ <Show when={columnVisible('targetId')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-muted font-mono text-[11px] tabular-nums`}+ >+ {artifact.workload.vmid || '—'}+ </TableCell>+ </Show><TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <span class="block truncate" title={artifact.location}>- {artifact.location}- </span>+ <ArtifactSourceBadge artifact={artifact} /></TableCell>- </Show>- <TableCell class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}>- <ProxmoxBackupAgeText artifact={artifact} compact={layoutMode() === 'compact'} />- </TableCell>- <Show when={columnVisible('size')}>- <TableCell class={`${getPlatformTableCellClassForKind('metric-bar')} text-base-content`}>- <Show- when={artifact.size && artifact.size > 0}- fallback={<span class="text-muted">No size</span>}- >- <RowMetricBar- valuePct={- props.sizeMaxBytes > 0 && artifact.size- ? (artifact.size / props.sizeMaxBytes) * 100- : 0- }- fillClass="bg-blue-500/40 dark:bg-blue-500/40"- label={formatPlatformTableBytesValue(artifact.size)}- tooltip={`${formatPlatformTableBytesValue(artifact.size)} (relative to largest artifact in view)`}- />- </Show>+ <Show when={columnVisible('location')}>+ <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>+ <span class="block truncate" title={artifact.location}>+ {artifact.location}+ </span>+ </TableCell>+ </Show>+ <TableCell class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}>+ <ProxmoxBackupAgeText artifact={artifact} compact={layoutMode() === 'compact'} /></TableCell>- </Show>- <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <ArtifactStateBadge artifact={artifact} label={artifactStateLabel(artifact)} />- </TableCell>- <Show when={columnVisible('details')}>+ <Show when={columnVisible('size')}>+ <TableCell class={`${getPlatformTableCellClassForKind('metric-bar')} text-base-content`}>+ <Show+ when={artifact.size && artifact.size > 0}+ fallback={<span class="text-muted">No size</span>}+ >+ <RowMetricBar+ valuePct={+ props.sizeMaxBytes > 0 && artifact.size+ ? (artifact.size / props.sizeMaxBytes) * 100+ : 0+ }+ fillClass="bg-blue-500/40 dark:bg-blue-500/40"+ label={formatPlatformTableBytesValue(artifact.size)}+ tooltip={`${formatPlatformTableBytesValue(artifact.size)} (relative to largest artifact in view)`}+ />+ </Show>+ </TableCell>+ </Show><TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <span class="block truncate" title={artifact.detailTitle ?? artifact.detail}>- {artifact.detail || '—'}- </span>+ <ArtifactStateBadge artifact={artifact} label={artifactStateLabel(artifact)} /></TableCell>+ <Show when={columnVisible('details')}>+ <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>+ <span class="block truncate" title={artifact.detailTitle ?? artifact.detail}>+ {artifact.detail || '—'}+ </span>+ </TableCell>+ </Show>+ </TableRow>+ <Show when={drawer.isExpanded(artifact)}>+ <InlineDetailTableRow+ cellId={drawer.detailRowId(artifact)}+ class=""+ colspan={visibleColumns().length}+ data-inline-detail-for={artifact.id}+ >+ <RecoverableArtifactDetail artifact={artifact} onClose={() => drawer.close(artifact)} />+ </InlineDetailTableRow></Show>- </TableRow>+ </>);return (diff --git a/frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsxindex b417a44bc7..5c60625308 100644--- a/frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx@@ -1,6 +1,14 @@import { For, Show, createMemo, createSignal, type Component, type JSX } from 'solid-js';import ArrowRightIcon from 'lucide-solid/icons/arrow-right';import { filterChipStatusDot } from '@/components/shared/FilterBar';+import {+ InlineDetailPanel,+ compactDetailRows,+ compactDetailSections,+ makeDetailRow,+ type DetailSection,+ type DetailValueTone,+} from '@/components/shared/DetailSectionTable';import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';import { StatusDot } from '@/components/shared/StatusDot';import type { StatusIndicatorVariant } from '@/utils/status';@@ -11,6 +19,7 @@ import {PlatformTableToolbar,PlatformErrorState,PlatformTableDurationValue,+ formatPlatformTableDurationValue,formatPlatformTableRelativeTimeValue,PlatformTableRelativeTimeValue,getPlatformTableCellClassForKind,@@ -29,10 +38,12 @@ import {getPlatformResourceDetailRowInteractionProps,PlatformResourceDetailToggleButton,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';import type { ReplicationJob, ReplicationJobsResponse } from '@/types/api';import { buildPlatformSearchSuggestions } from '@/features/platformPage/platformSearchSuggestions';import { matchesSearchTermSplit, splitSearchExclusions } from '@/utils/searchQuery';+import { buildProxmoxGuestNativeId } from '@/utils/workloads';// Replication is a Proxmox-specific concept (zfs send/receive scheduled// between PVE nodes), so this table is bespoke rather than a filtered@@ -264,6 +275,151 @@ export const compactReplicationNextSyncText = (text: string, tone: NextSyncTone)return text.replace(/^in /, '');};+const NEXT_SYNC_DETAIL_TONE: Record<NextSyncTone, DetailValueTone | undefined> = {+ overdue: 'danger',+ imminent: 'warning',+ normal: undefined,+ muted: 'muted',+};++// The detail row id follows the job, not its place in the filtered list, so a+// refresh that reorders rows keeps the disclosure pointing at the same job.+const replicationJobDetailRowId = (job: ReplicationJob): string =>+ `replication-job-detail-${(job.id || job.jobId).replace(/[^A-Za-z0-9_-]/g, '-')}`;++// The guest the job copies, as the Proxmox workloads table knows it.+const replicationJobGuestSubject = (job: ReplicationJob) => {+ const id = buildProxmoxGuestNativeId({+ instance: job.instance,+ node: job.guestNode || job.sourceNode,+ vmid: job.guestId,+ });+ if (!id) return null;+ return {+ id,+ name: job.guestName?.trim() || job.guest?.trim() || String(job.guestId),+ type: (job.guestType ?? '').trim().toLowerCase() === 'lxc' ? 'lxc' : 'vm',+ };+};++const replicationJobSummary = (job: ReplicationJob, now: number): string => {+ const last = formatPlatformTableRelativeTimeValue(syncTimeValue(job), { now, emptyText: '' });+ const next = nextSyncFor(job, now);+ return [+ last ? `Last synced ${last}` : 'Not synced yet',+ next.tone === 'muted' ? '' : `next sync ${next.text}`,+ ]+ .filter(Boolean)+ .join(' · ');+};++const buildReplicationJobSections = (+ job: ReplicationJob,+ classification: ReplicationStatusFilter,+ guestLabel: string,+ now: number,+): DetailSection[] => {+ const errorText = (job.error ?? '').trim();+ const next = nextSyncFor(job, now);+ const failCount = job.failCount ?? 0;+ return compactDetailSections([+ // A failed job's error is the drawer summary; any other job's error+ // still leads, because it is why the job may fail next.+ classification === 'failed'+ ? null+ : {+ label: 'Error',+ rows: compactDetailRows([makeDetailRow('Error', errorText, { tone: 'danger' })]),+ },+ {+ label: 'Job',+ rows: compactDetailRows([+ makeDetailRow('Guest', guestLabel === '—' ? '' : guestLabel),+ makeDetailRow('Job ID', job.jobId || job.id),+ makeDetailRow('Failures', String(failCount), {+ tone: failCount > 0 ? 'danger' : undefined,+ }),+ makeDetailRow('Comment', job.comment),+ ]),+ },+ {+ label: 'Route',+ rows: compactDetailRows([+ makeDetailRow('Source', job.sourceNode),+ makeDetailRow('Target', job.targetNode),+ makeDetailRow('Source storage', job.sourceStorage),+ makeDetailRow('Target storage', job.targetStorage),+ makeDetailRow(+ 'Rate limit',+ job.rateLimitMbps && job.rateLimitMbps > 0 ? `${job.rateLimitMbps} MB/s` : '',+ ),+ ]),+ },+ {+ label: 'Schedule',+ rows: compactDetailRows([+ makeDetailRow('Schedule', job.schedule),+ makeDetailRow(+ 'Last sync',+ formatPlatformTableRelativeTimeValue(syncTimeValue(job), { now, emptyText: '' }),+ ),+ makeDetailRow('Next sync', next.tone === 'muted' ? '' : next.text, {+ tone: NEXT_SYNC_DETAIL_TONE[next.tone],+ }),+ makeDetailRow(+ 'Duration',+ formatPlatformTableDurationValue(job.lastSyncDurationSeconds, {+ fallbackText: job.lastSyncDurationHuman,+ emptyText: '',+ }),+ ),+ ]),+ },+ ]);+};++// The row truncates and narrower layouts drop columns, so the drawer is where+// the whole job is always readable, starting with why it failed.+const ReplicationJobDetail: Component<{+ job: ReplicationJob;+ classification: ReplicationStatusFilter;+ guestLabel: string;+ now: number;+ onClose: () => void;+}> = (props) => {+ const indicator = () => indicatorFor(props.classification);+ const errorText = () => (props.job.error ?? '').trim();+ const guest = () => replicationJobGuestSubject(props.job);+ return (+ <InlineDetailPanel+ testId="replication-job-detail"+ detailFor={props.job.id || props.job.jobId}+ title={+ props.job.guestName?.trim() || props.job.guest?.trim() || props.job.jobId || props.job.id+ }+ status={{ variant: indicator().variant, label: indicator().label }}+ summary={+ <Show+ when={props.classification === 'failed' && errorText()}+ fallback={replicationJobSummary(props.job, props.now)}+ >+ <span class="text-red-600 dark:text-red-300" data-replication-job-error>+ {errorText()}+ </span>+ </Show>+ }+ actions={<RecordOwnerLink subject={guest()} />}+ sections={buildReplicationJobSections(+ props.job,+ props.classification,+ props.guestLabel,+ props.now,+ )}+ onClose={props.onClose}+ />+ );+};+export async function fetchReplicationJobs(signal?: AbortSignal): Promise<ReplicationJob[]> {const response = await apiFetch('/api/replication/jobs?platform=proxmox-pve', { signal });if (!response.ok) {@@ -518,9 +674,8 @@ export const ProxmoxReplicationTable: Component<{const targetNode = (job.targetNode ?? '').trim() || '—';const guestLabel = formatGuestLabel(job);const jobKey = `${job.id}:${job.jobId}:${job.guestId ?? index()}`;- const detailRowId = `replication-job-detail-${index()}`;+ const detailRowId = replicationJobDetailRowId(job);const errorText = (job.error ?? '').trim();- const comment = (job.comment ?? '').trim();const isExpanded = () => expandedJobKey() === jobKey;const toggleDetails = () => {setExpandedJobKey(isExpanded() ? null : jobKey);@@ -682,60 +837,15 @@ export const ProxmoxReplicationTable: Component<{cellId={detailRowId}colspan={visibleColumnCount()}class=""+ data-inline-detail-for={job.id || job.jobId}>- {/* The row truncates and narrower layouts drop columns, so- the expansion is where the whole job is always readable,- starting with why it failed. */}- <dl class="grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 text-[10px] leading-4 sm:text-xs sm:leading-5">- <Show when={errorText}>- <dt class="font-semibold text-muted">Error</dt>- <dd- class="wrap-break-word text-red-600 dark:text-red-300"- data-replication-job-error- >- {errorText}- </dd>- </Show>- <dt class="font-semibold text-muted">Guest</dt>- <dd class="break-all text-base-content">{guestLabel}</dd>- <dt class="font-semibold text-muted">Job</dt>- <dd class="break-all font-mono text-base-content">- {job.jobId || job.id}- </dd>- <dt class="font-semibold text-muted">Route</dt>- <dd class="font-mono text-base-content">- {sourceNode} → {targetNode}- </dd>- <dt class="font-semibold text-muted">Schedule</dt>- <dd class="font-mono text-base-content">{job.schedule || '—'}</dd>- <dt class="font-semibold text-muted">Last sync</dt>- <dd class="text-base-content">- {formatPlatformTableRelativeTimeValue(syncTimeValue(job), {- now: now(),- })}- </dd>- <dt class="font-semibold text-muted">Next sync</dt>- <dd- class={NEXT_SYNC_TONE_CLASS[next().tone] || 'text-base-content'}- >- {next().text}- </dd>- <dt class="font-semibold text-muted">Duration</dt>- <dd class="text-base-content">- <PlatformTableDurationValue- seconds={job.lastSyncDurationSeconds}- fallbackText={job.lastSyncDurationHuman}- />- </dd>- <dt class="font-semibold text-muted">Failures</dt>- <dd class="tabular-nums text-base-content">- {job.failCount ?? 0}- </dd>- <Show when={comment}>- <dt class="font-semibold text-muted">Comment</dt>- <dd class="wrap-break-word text-base-content">{comment}</dd>- </Show>- </dl>+ <ReplicationJobDetail+ job={job}+ classification={classification}+ guestLabel={guestLabel}+ now={now()}+ onClose={() => setExpandedJobKey(null)}+ /></InlineDetailTableRow></Show></>diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsxindex 87b2605ca3..a8b8d1804b 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx@@ -1,11 +1,20 @@-import { cleanup, render } from '@solidjs/testing-library';-import { afterEach, describe, expect, it } from 'vitest';-import type { Accessor } from 'solid-js';+import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';+import { Route, Router } from '@solidjs/router';+import { afterEach, describe, expect, it, vi } from 'vitest';+import type { Accessor, JSX } from 'solid-js';import { ProxmoxCoverageTable } from '../ProxmoxCoverageTable';import type { WorkloadCoverageRow } from '../proxmoxBackupRecoveryModel';import type { CoverageSortKey } from '../proxmoxBackupsTableModel';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const row = {key: 'w1',workload: {@@ -54,7 +63,7 @@ afterEach(cleanup);describe('ProxmoxCoverageTable column visibility', () => {it('renders single-line rows with identity columns matching the by-date table', () => {- render(() => (+ renderInRouter(() => (<ProxmoxCoverageTablerows={[row]}hasAnyRows@@ -64,7 +73,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>()}+ expandedKey={null}onToggleExpand={() => {}}showTaskColumn={false}layoutWidth={() => 1_200}@@ -92,7 +101,7 @@ describe('ProxmoxCoverageTable column visibility', () => {});it('keeps posture, backup age and job visible in compact rows', () => {- render(() => (+ renderInRouter(() => (<ProxmoxCoverageTablerows={[row]}hasAnyRows@@ -102,7 +111,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>()}+ expandedKey={null}onToggleExpand={() => {}}showTaskColumn={true}layoutWidth={() => 330}@@ -115,7 +124,7 @@ describe('ProxmoxCoverageTable column visibility', () => {});it('keeps provider evidence in the workload drill-down instead of every table row', () => {- const { unmount } = render(() => (+ const { unmount } = renderInRouter(() => (<ProxmoxCoverageTablerows={[row]}hasAnyRows@@ -125,7 +134,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>()}+ expandedKey={null}onToggleExpand={() => {}}showTaskColumn={false}layoutWidth={() => 1_200}@@ -138,7 +147,7 @@ describe('ProxmoxCoverageTable column visibility', () => {);unmount();- render(() => (+ renderInRouter(() => (<ProxmoxCoverageTablerows={[row]}hasAnyRows@@ -148,7 +157,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>(['w1'])}+ expandedKey="w1"onToggleExpand={() => {}}showTaskColumn={false}layoutWidth={() => 1_200}@@ -161,6 +170,92 @@ describe('ProxmoxCoverageTable column visibility', () => {expect(document.body.textContent).toContain('Access Sufficient');});+ it('heads the workload drawer with its posture and links to the workload', async () => {+ const onToggleExpand = vi.fn();+ const linked = {+ ...row,+ workload: { ...row.workload, resourceId: 'vm-100-resource' },+ artifacts: [+ {+ id: 'pbs-1',+ nativeId: 'pbs-1',+ sourceKind: 'pbs',+ sourceLabel: 'PBS',+ workload: row.workload,+ createdAt: '2026-07-18T23:00:00Z',+ createdMs: Date.parse('2026-07-18T23:00:00Z'),+ location: 'pbs-main:datastore-with-a-very-long-namespace/that-must-wrap',+ detail: 'vm/100/2026-07-18T23:00:00Z',+ protected: false,+ verified: true,+ },+ ],+ } as unknown as WorkloadCoverageRow;+ renderInRouter(() => (+ <ProxmoxCoverageTable+ rows={[linked]}+ hasAnyRows+ emptyIcon={<span />}+ emptyTitle=""+ emptyDescription=""+ sortKey={(() => 'posture') as Accessor<CoverageSortKey>}+ sortDirection={() => 'asc'}+ onSort={() => {}}+ expandedKey="w1"+ onToggleExpand={onToggleExpand}+ showTaskColumn={false}+ layoutWidth={() => 1_600}+ />+ ));++ const panel = screen.getByTestId('proxmox-coverage-detail');+ expect(within(panel).getByRole('heading', { level: 2, name: /web/ })).toBeInTheDocument();+ expect(+ within(panel).getByText(+ 'A current verified backup is available from complete provider history.',+ ),+ ).toBeInTheDocument();+ expect(within(panel).getByRole('link', { name: 'Open web' })).toHaveAttribute(+ 'href',+ '/proxmox/overview?resource=vm-100-resource',+ );+ // Restore evidence leads; provider quality is a section, not a grid.+ expect(within(panel).getByText('Restore evidence')).toBeInTheDocument();+ const location = panel.querySelector('[data-coverage-evidence-location]');+ expect(location).toHaveClass('wrap-anywhere');+ expect(location).not.toHaveClass('truncate');+ expect(panel.querySelector('.grid')).toBeNull();+ expect(within(panel).getByText('Provider evidence', { selector: 'th' })).toBeInTheDocument();++ await fireEvent.click(within(panel).getByRole('button', { name: 'Collapse web details' }));+ expect(onToggleExpand).toHaveBeenCalledWith('w1');+ });++ it('states a workload without restore points in a shared notice', () => {+ renderInRouter(() => (+ <ProxmoxCoverageTable+ rows={[{ ...row, posture: 'unprotected' } as WorkloadCoverageRow]}+ hasAnyRows+ emptyIcon={<span />}+ emptyTitle=""+ emptyDescription=""+ sortKey={(() => 'posture') as Accessor<CoverageSortKey>}+ sortDirection={() => 'asc'}+ onSort={() => {}}+ expandedKey="w1"+ onToggleExpand={() => {}}+ showTaskColumn={false}+ layoutWidth={() => 1_200}+ />+ ));++ const notice = screen.getByRole('status');+ expect(notice).toHaveTextContent('No restore points found for this workload.');+ expect(notice.className).toContain('border-amber-300');+ // No registry match, so nothing to link to.+ expect(screen.queryByRole('link')).not.toBeInTheDocument();+ });+it('windows large coverage result sets while keeping one continuous table', () => {const rows = Array.from({ length: 600 }, (_, index) => ({...row,@@ -174,7 +269,7 @@ describe('ProxmoxCoverageTable column visibility', () => {},})) as WorkloadCoverageRow[];- render(() => (+ renderInRouter(() => (<ProxmoxCoverageTablerows={rows}hasAnyRows@@ -184,7 +279,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>()}+ expandedKey={null}onToggleExpand={() => {}}showTaskColumn={false}layoutWidth={() => 1_200}@@ -201,7 +296,7 @@ describe('ProxmoxCoverageTable column visibility', () => {});it('marks an empty evidence cell with a short label and the full reason on hover', () => {- render(() => (+ renderInRouter(() => (<ProxmoxCoverageTablerows={[row]}hasAnyRows@@ -211,7 +306,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>()}+ expandedKey={null}onToggleExpand={() => {}}showTaskColumn={true}layoutWidth={() => 1_200}@@ -227,7 +322,7 @@ describe('ProxmoxCoverageTable column visibility', () => {});it('explains snapshot-only and unrated rows in plain words', () => {- render(() => (+ renderInRouter(() => (<ProxmoxCoverageTablerows={[{ ...row, key: 'snapshot-only', snapshotCount: 2 },@@ -240,7 +335,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>()}+ expandedKey={null}onToggleExpand={() => {}}showTaskColumn={true}layoutWidth={() => 1_200}@@ -263,7 +358,7 @@ describe('ProxmoxCoverageTable column visibility', () => {// A capped inline-block sat above the row's text line; a block span fills// the fixed-layout cell and ends in an ellipsis there.const node = 'pve-production-rack-04-node-17.example.internal';- render(() => (+ renderInRouter(() => (<ProxmoxCoverageTablerows={[{ ...row, workload: { ...row.workload, node } }] as WorkloadCoverageRow[]}hasAnyRows@@ -273,7 +368,7 @@ describe('ProxmoxCoverageTable column visibility', () => {sortKey={(() => 'posture') as Accessor<CoverageSortKey>}sortDirection={() => 'asc'}onSort={() => {}}- expandedKeys={new Set<string>()}+ expandedKey={null}onToggleExpand={() => {}}showTaskColumn={false}layoutWidth={() => 1_200}diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxRecoverableTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxRecoverableTable.test.tsxindex a8c0248ff5..7ec2d39023 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxRecoverableTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxRecoverableTable.test.tsx@@ -1,11 +1,20 @@-import { cleanup, render } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';+import { Route, Router } from '@solidjs/router';import { afterEach, describe, expect, it } from 'vitest';-import type { Accessor } from 'solid-js';+import type { Accessor, JSX } from 'solid-js';import { ProxmoxRecoverableTable } from '../ProxmoxRecoverableTable';import type { RecoverableArtifact } from '../proxmoxBackupRecoveryModel';import type { RecoverableSortKey } from '../proxmoxBackupsTableModel';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const artifact: RecoverableArtifact = {id: 'pbs:web:100',nativeId: 'vm/100/2026-08-04T08:00:00Z',@@ -31,7 +40,7 @@ const artifact: RecoverableArtifact = {};const renderTable = (layoutWidth: number) =>- render(() => (+ renderInRouter(() => (<ProxmoxRecoverableTableartifacts={[artifact]}hasAnyArtifacts@@ -48,6 +57,62 @@ const renderTable = (layoutWidth: number) =>afterEach(cleanup);+describe('ProxmoxRecoverableTable record drawer', () => {+ it('opens one restore point at a time with what the phone row drops', async () => {+ const second: RecoverableArtifact = {+ ...artifact,+ id: 'pbs:db:101',+ workload: { ...artifact.workload, key: 'vm:101', vmid: '101', name: 'db', label: 'db' },+ location: 'offsite / pbs2',+ };+ renderInRouter(() => (+ <ProxmoxRecoverableTable+ artifacts={[+ { ...artifact, workload: { ...artifact.workload, resourceId: 'vm-100' } },+ second,+ ]}+ hasAnyArtifacts+ emptyIcon={<span />}+ emptyTitle=""+ emptyDescription=""+ sortKey={(() => 'created') as Accessor<RecoverableSortKey>}+ sortDirection={() => 'desc'}+ onSort={() => {}}+ sizeMaxBytes={artifact.size ?? 0}+ layoutWidth={() => 330}+ />+ ));++ const toggle = screen.getByRole('button', { name: 'Expand details for web' });+ expect(toggle).toHaveAttribute('aria-controls', 'proxmox-recoverable-detail-pbs:web:100');+ await fireEvent.click(toggle);++ const panel = screen.getByTestId('proxmox-recoverable-detail');+ expect(within(panel).getByRole('heading', { level: 2, name: /web/ })).toBeInTheDocument();+ expect(within(panel).getByText('PBS snapshot in main / pve1')).toBeInTheDocument();+ expect(within(panel).getByText('main / pve1', { selector: 'span' })).toBeInTheDocument();+ expect(within(panel).getByText('Verified')).toBeInTheDocument();+ expect(within(panel).getByText('5 PBS files')).toBeInTheDocument();+ expect(within(panel).getByRole('link', { name: 'Open web' })).toHaveAttribute(+ 'href',+ '/proxmox/overview?resource=vm-100',+ );++ // Opening another restore point closes the first.+ await fireEvent.click(screen.getByRole('button', { name: 'Expand details for db' }));+ expect(screen.getAllByTestId('proxmox-recoverable-detail')).toHaveLength(1);+ expect(screen.getByTestId('proxmox-recoverable-detail')).toHaveAttribute(+ 'data-inline-detail-for',+ 'pbs:db:101',+ );+ // The db backup has no registry match, so there is nothing to open.+ expect(screen.queryByRole('link')).not.toBeInTheDocument();++ await fireEvent.click(screen.getByRole('button', { name: 'Collapse db details' }));+ expect(screen.queryByTestId('proxmox-recoverable-detail')).not.toBeInTheDocument();+ });+});+describe('ProxmoxRecoverableTable responsive columns', () => {it('keeps source, location, recovery age, and state visible in compact containers', () => {renderTable(330);@@ -97,7 +162,7 @@ describe('ProxmoxRecoverableTable responsive columns', () => {},}));- render(() => (+ renderInRouter(() => (<ProxmoxRecoverableTableartifacts={artifacts}hasAnyArtifactsdiff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxReplicationTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxReplicationTable.test.tsxindex 938f07c21f..ad1d642acd 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxReplicationTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxReplicationTable.test.tsx@@ -1,4 +1,6 @@-import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';+import { Route, Router } from '@solidjs/router';import { afterEach, describe, expect, it, vi } from 'vitest';import type { ReplicationJob } from '@/types/api';import { RELATIVE_TIME_TICK_MS } from '@/utils/relativeTimeClock';@@ -12,6 +14,14 @@ import {} from '../ProxmoxReplicationTable';import replicationTableSource from '../ProxmoxReplicationTable.tsx?raw';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const replicationJob = (overrides: Partial<ReplicationJob> = {}): ReplicationJob => ({id: 'replication-100',instance: 'pve',@@ -62,7 +72,7 @@ describe('ProxmoxReplicationTable', () => {it('renders replication duration cells through the shared duration format', () => {vi.spyOn(Date, 'now').mockReturnValue(1_700_000_300_000);- render(() => (+ renderInRouter(() => (<ProxmoxReplicationTablejobs={[replicationJob()]}error={undefined}@@ -79,7 +89,7 @@ describe('ProxmoxReplicationTable', () => {});it('preserves explicit replication duration labels from the backend', () => {- render(() => (+ renderInRouter(() => (<ProxmoxReplicationTablejobs={[replicationJob({@@ -101,7 +111,7 @@ describe('ProxmoxReplicationTable', () => {it('reveals the whole error from the row disclosure at desktop width', async () => {const error ="command 'zfs send -- rpool/data/vm-100-disk-0@__replicate_100-0__' failed: exit code 255";- render(() => (+ renderInRouter(() => (<ProxmoxReplicationTablejobs={[replicationJob({ lastSyncStatus: 'error', failCount: 3, error })]}error={undefined}@@ -117,11 +127,75 @@ describe('ProxmoxReplicationTable', () => {screen.getByRole('button', { name: 'Expand details for replication job 100-0' }),);+ // A failed job's drawer is headed by its guest and states why it failed.+ const panel = screen.getByTestId('replication-job-detail');+ expect(panel).toHaveAttribute('data-inline-detail-for', 'replication-100');+ expect(screen.getByRole('heading', { level: 2, name: /web/ })).toBeInTheDocument();const detail = document.querySelector('[data-replication-job-error]');expect(detail).toHaveTextContent(error);- // The expansion wraps; only the one-line row cell truncates.- expect(detail?.className).toContain('wrap-break-word');+ // The drawer wraps the error; only the one-line row cell truncates.+ expect(detail?.parentElement?.className).toContain('wrap-anywhere');expect(detail?.className).not.toContain('truncate');+ // The error is the summary, so it is not repeated as a section.+ expect(within(panel).queryByText('Error', { selector: 'th' })).not.toBeInTheDocument();+ });++ it('keys the disclosure to the job and links the drawer to the replicated guest', async () => {+ renderInRouter(() => (+ <ProxmoxReplicationTable+ jobs={[replicationJob({ guestType: 'lxc', guestNode: 'pve-a' })]}+ error={undefined}+ onRetry={() => undefined}+ emptyIcon={<span />}+ emptyTitle="No replication jobs"+ emptyDescription="Replication jobs appear here."+ />+ ));++ const toggle = screen.getByRole('button', { name: 'Expand details for replication job 100-0' });+ expect(toggle).toHaveAttribute('aria-controls', 'replication-job-detail-replication-100');+ await fireEvent.click(toggle);++ expect(document.getElementById('replication-job-detail-replication-100')).not.toBeNull();+ const link = screen.getByRole('link', { name: 'Open web' });+ expect(link).toHaveAttribute('href', '/proxmox/overview?resource=pve%3Apve-a%3A100');+ const panel = screen.getByTestId('replication-job-detail');+ for (const section of ['Job', 'Route', 'Schedule']) {+ expect(within(panel).getByText(section, { selector: 'th' })).toBeInTheDocument();+ }++ await fireEvent.click(screen.getByRole('button', { name: 'Collapse web details' }));+ expect(screen.queryByTestId('replication-job-detail')).not.toBeInTheDocument();+ });++ it('leads a pending job drawer with its error and omits the link without a guest', async () => {+ renderInRouter(() => (+ <ProxmoxReplicationTable+ jobs={[+ replicationJob({+ lastSyncStatus: 'pending',+ error: 'target unreachable',+ guestId: undefined,+ guestName: undefined,+ }),+ ]}+ error={undefined}+ onRetry={() => undefined}+ emptyIcon={<span />}+ emptyTitle="No replication jobs"+ emptyDescription="Replication jobs appear here."+ />+ ));++ await fireEvent.click(+ screen.getByRole('button', { name: 'Expand details for replication job 100-0' }),+ );+ const sections = [...document.querySelectorAll('[data-testid="replication-job-detail"] th')];+ expect(sections[0]).toHaveTextContent('Error');+ expect(+ within(screen.getByTestId('replication-job-detail')).getByText('target unreachable'),+ ).toBeInTheDocument();+ expect(screen.queryByRole('link')).not.toBeInTheDocument();});it('gives the error column more room than the 8% that clipped it', () => {@@ -168,7 +242,7 @@ describe('ProxmoxReplicationTable relative times', () => {nextSyncUnix: (start + 10 * 60_000) / 1000,});const renderTable = () =>- render(() => (+ renderInRouter(() => (<ProxmoxReplicationTablejobs={[job()]}error={undefined}@@ -210,15 +284,17 @@ describe('ProxmoxReplicationTable relative times', () => {screen.getByRole('button', { name: 'Expand details for replication job 100-0' }),);const detail = (label: string) =>- screen.getByText(label, { selector: 'dt' }).nextElementSibling as HTMLElement;+ screen.getByText(label, { selector: 'td' }).nextElementSibling as HTMLElement;expect(detail('Last sync')).toHaveTextContent('5m ago');expect(detail('Next sync')).toHaveTextContent('in 10m');+ expect(screen.getByText('Last synced 5m ago · next sync in 10m')).toBeInTheDocument();twoHoursLater();expect(detail('Last sync')).toHaveTextContent('2h ago');expect(detail('Next sync')).toHaveTextContent('1h overdue');- expect(detail('Next sync')).toHaveClass('text-red-600');+ expect(detail('Next sync')).toHaveClass('text-rose-700');+ expect(screen.getByText('Last synced 2h ago · next sync 1h overdue')).toBeInTheDocument();});});diff --git a/frontend-modern/src/features/proxmox/proxmoxBackupWorkloadSubject.ts b/frontend-modern/src/features/proxmox/proxmoxBackupWorkloadSubject.tsnew file mode 100644index 0000000000..5745ccceb4--- /dev/null+++ b/frontend-modern/src/features/proxmox/proxmoxBackupWorkloadSubject.ts@@ -0,0 +1,16 @@+import type { ResourcePageSubject } from '@/features/platformNavigation/resourcePagePath';+import type { WorkloadReference } from './proxmoxBackupRecoveryModel';++// The guest a backup row is about, when Pulse matched it to a monitored one.+// Host backups have no workload drawer to open.+export const proxmoxBackupWorkloadSubject = (+ workload: WorkloadReference,+): ResourcePageSubject | null => {+ const id = workload.resourceId?.trim();+ if (!id || (workload.type !== 'vm' && workload.type !== 'ct')) return null;+ return {+ id,+ name: workload.name || workload.label,+ type: workload.type === 'ct' ? 'lxc' : 'vm',+ };+};diff --git a/frontend-modern/src/features/standalone/AvailabilityFleetView.tsx b/frontend-modern/src/features/standalone/AvailabilityFleetView.tsxindex d4c43e896c..71e3fdb735 100644--- a/frontend-modern/src/features/standalone/AvailabilityFleetView.tsx+++ b/frontend-modern/src/features/standalone/AvailabilityFleetView.tsx@@ -18,6 +18,8 @@ import {import { getProbeSourceChipLabel, type ProbeAgentOption } from '@/utils/availabilityProbeAgents';import { getStandaloneResourceStatusIndicator } from './standalonePageModel';+const AVAILABILITY_FLEET_DETAIL_ID = 'availability-fleet-detail';+type AvailabilityFleetHistoryState = 'reachable' | 'unreachable' | 'indeterminate' | 'unknown';const statePresentation: Record<@@ -239,6 +241,10 @@ export const AvailabilityFleetView: Component<{});const resolveResourceLabel = (resourceId: string): string | undefined =>props.resources.find((resource) => resource.id === resourceId)?.name;+ // Tiles are disclosures for the one drawer below the grid: a second click+ // on the open tile closes it, as a second click on a table row does.+ const toggleResource = (resourceId: string) =>+ setSelectedResourceId((current) => (current === resourceId ? undefined : resourceId));return (<section aria-label="Availability fleet" class="space-y-3">@@ -299,6 +305,7 @@ export const AvailabilityFleetView: Component<{emptyText: 'Not checked',now: now(),});+ const isSelected = () => selectedResourceId() === resource.id;const latency = () => {const value = availability()?.latencyMillis;return typeof value === 'number' && Number.isFinite(value) && value > 0@@ -309,10 +316,16 @@ export const AvailabilityFleetView: Component<{return (<buttontype="button"- class="group min-w-0 rounded-md border border-border bg-surface p-3 text-left shadow-xs transition hover:border-blue-400/60 hover:bg-surface-hover focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500"+ class="group min-w-0 rounded-md border bg-surface p-3 text-left shadow-xs transition hover:border-blue-400/60 hover:bg-surface-hover focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500"+ classList={{+ 'border-border': !isSelected(),+ 'border-blue-500 bg-surface-hover ring-1 ring-blue-500/40': isSelected(),+ }}aria-label={`Open details for ${resource.name}`}+ aria-expanded={isSelected()}+ aria-controls={AVAILABILITY_FLEET_DETAIL_ID}data-availability-fleet-tile={resource.id}- onClick={() => setSelectedResourceId(resource.id)}+ onClick={() => toggleResource(resource.id)}><div class="flex items-start justify-between gap-3"><div class="min-w-0">@@ -379,15 +392,26 @@ export const AvailabilityFleetView: Component<{</For></div>- <Show when={selectedResource()}>- {(resource) => (- <ResourceDetailDrawer- resource={resource()}- resolveResourceLabel={resolveResourceLabel}- onClose={() => setSelectedResourceId(undefined)}- />- )}- </Show>+ {/* The same check reads the same here as in the table view: the+ table-row drawer, headed by the dot its tile shows. Keyed by id, so+ switching tiles resets the drawer's tabs. */}+ <div id={AVAILABILITY_FLEET_DETAIL_ID} data-testid="availability-fleet-detail">+ <Show when={selectedResourceId()} keyed>+ <Show when={selectedResource()}>+ {(resource) => (+ <div class="rounded-sm border border-border bg-surface px-2 py-3 sm:px-4 sm:py-4">+ <ResourceDetailDrawer+ resource={resource()}+ statusIndicator={getStandaloneResourceStatusIndicator(resource(), now())}+ presentation="table-row"+ resolveResourceLabel={resolveResourceLabel}+ onClose={() => setSelectedResourceId(undefined)}+ />+ </div>+ )}+ </Show>+ </Show>+ </div></section>);};diff --git a/frontend-modern/src/features/standalone/__tests__/AvailabilityFleetView.test.tsx b/frontend-modern/src/features/standalone/__tests__/AvailabilityFleetView.test.tsxindex f31851a32f..251da8c775 100644--- a/frontend-modern/src/features/standalone/__tests__/AvailabilityFleetView.test.tsx+++ b/frontend-modern/src/features/standalone/__tests__/AvailabilityFleetView.test.tsx@@ -4,13 +4,21 @@ import { createSignal } from 'solid-js';import type { AvailabilityHistoryTarget } from '@/api/availabilityHistory';import type { Resource } from '@/types/resource';import { AvailabilityFleetView } from '../AvailabilityFleetView';+import { getStandaloneResourceStatusIndicator } from '../standalonePageModel';vi.mock('@/components/Infrastructure/ResourceDetailDrawer', () => ({- ResourceDetailDrawer: (props: { resource: Resource; onClose?: () => void }) => (+ ResourceDetailDrawer: (props: {+ resource: Resource;+ onClose?: () => void;+ presentation?: string;+ statusIndicator?: { variant: string; label: string };+ }) => (<divdata-testid="resource-detail-drawer"data-resource-id={props.resource.id}data-resource-status={props.resource.status}+ data-presentation={props.presentation}+ data-status-variant={props.statusIndicator?.variant}><button type="button" onClick={props.onClose}>Close@@ -155,6 +163,45 @@ describe('AvailabilityFleetView', () => {);});+ it('makes each tile a disclosure for the shared drawer, closed by a second click', () => {+ render(() => (+ <AvailabilityFleetView+ resources={[resource(1), resource(5)]}+ historyByTarget={new Map()}+ historyLoading={false}+ />+ ));++ const first = screen.getByRole('button', { name: 'Open details for Service 1' });+ const second = screen.getByRole('button', { name: 'Open details for Service 5' });+ const detail = screen.getByTestId('availability-fleet-detail');+ expect(first).toHaveAttribute('aria-expanded', 'false');+ expect(first).toHaveAttribute('aria-controls', detail.id);++ fireEvent.click(first);+ expect(first).toHaveAttribute('aria-expanded', 'true');+ expect(first).toHaveClass('border-blue-500');+ // The same drawer the checks table opens, headed by the tile's own dot.+ const drawer = screen.getByTestId('resource-detail-drawer');+ expect(drawer).toHaveAttribute('data-presentation', 'table-row');+ expect(drawer).toHaveAttribute(+ 'data-status-variant',+ getStandaloneResourceStatusIndicator(resource(1), Date.now()).variant,+ );++ fireEvent.click(second);+ expect(first).toHaveAttribute('aria-expanded', 'false');+ expect(second).toHaveAttribute('aria-expanded', 'true');+ expect(screen.getByTestId('resource-detail-drawer')).toHaveAttribute(+ 'data-status-variant',+ getStandaloneResourceStatusIndicator(resource(5), Date.now()).variant,+ );++ fireEvent.click(second);+ expect(second).toHaveAttribute('aria-expanded', 'false');+ expect(screen.queryByTestId('resource-detail-drawer')).not.toBeInTheDocument();+ });+it('keeps current health visible when history is unavailable', () => {render(() => (<AvailabilityFleetViewdiff --git a/frontend-modern/src/features/vmware/VsphereActivityTable.tsx b/frontend-modern/src/features/vmware/VsphereActivityTable.tsxindex 7ef0e37b40..6f0f5cbc87 100644--- a/frontend-modern/src/features/vmware/VsphereActivityTable.tsx+++ b/frontend-modern/src/features/vmware/VsphereActivityTable.tsx@@ -33,6 +33,7 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import type { ResourceType } from '@/types/resource';import type { StatusIndicatorVariant } from '@/utils/status';import {@@ -213,6 +214,16 @@ const ActivityDetail: Component<{ activity: VmwareActivityRow; onClose: () => volabel: formatPlatformTableTitleCaseValue(props.activity.stateBucket),}}summary={`${formatActivityKind(props.activity.activityKind)} · ${props.activity.title}`}+ actions={+ <RecordOwnerLink+ subject={{+ id: props.activity.resourceId,+ name: props.activity.resourceName,+ type: props.activity.resourceType,+ resource: props.activity.resource,+ }}+ />+ }sections={buildActivityDetailSections(props.activity)}detailAttributes={{ 'data-vsphere-activity-detail-for': props.activity.id }}onClose={props.onClose}diff --git a/frontend-modern/src/features/vmware/VsphereAlertsTable.tsx b/frontend-modern/src/features/vmware/VsphereAlertsTable.tsxindex 18e66255a8..d2bdb0b7bb 100644--- a/frontend-modern/src/features/vmware/VsphereAlertsTable.tsx+++ b/frontend-modern/src/features/vmware/VsphereAlertsTable.tsx@@ -25,6 +25,7 @@ import {createPlatformResourceDetailState,getPlatformResourceDetailRowClass,} from '@/features/platformPage/PlatformResourceDetailTableRow';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';import { getPlatformAlertSeverityFilterOptions } from '@/features/platformPage/platformAlertSeverityFilterOptions';import {formatPlatformAlertCode,@@ -103,6 +104,16 @@ const AlertDetail: Component<{ incident: VmwareIncidentRow; onClose: () => voidtitle={props.incident.resourceName || formatPlatformAlertCode(props.incident.code, 'vmware')}status={getAlertSeverityIndicator(props.incident.severity, props.incident.severityBucket)}summary={props.incident.summary || props.incident.label}+ actions={+ <RecordOwnerLink+ subject={{+ id: props.incident.resourceId,+ name: props.incident.resourceName,+ type: props.incident.resourceType,+ resource: props.incident.resource,+ }}+ />+ }sections={buildAlertDetailSections(props.incident)}detailAttributes={{ 'data-vsphere-alert-detail-for': props.incident.id }}onClose={props.onClose}diff --git a/frontend-modern/src/features/vmware/__tests__/VsphereActivityTable.test.tsx b/frontend-modern/src/features/vmware/__tests__/VsphereActivityTable.test.tsxindex 5cec4b9a6d..a2f5a200de 100644--- a/frontend-modern/src/features/vmware/__tests__/VsphereActivityTable.test.tsx+++ b/frontend-modern/src/features/vmware/__tests__/VsphereActivityTable.test.tsx@@ -1,10 +1,20 @@import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';+import { Route, Router } from '@solidjs/router';import { afterEach, describe, expect, it } from 'vitest';import { VsphereActivityTable } from '@/features/vmware/VsphereActivityTable';import { buildVmwareActivityRows, filterVmwareActivity } from '@/features/vmware/vmwarePageModel';import type { Resource } from '@/types/resource';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const makeVm = (overrides: Partial<Resource> = {}): Resource =>({id: 'vm-201',@@ -82,7 +92,7 @@ describe('VsphereActivityTable', () => {it('renders native vSphere activity rows with inline details', async () => {const activity = buildVmwareActivityRows([makeVm()]);- render(() => (+ renderInRouter(() => (<VsphereActivityTableactivity={activity}emptyIcon={<span />}@@ -136,6 +146,11 @@ describe('VsphereActivityTable', () => {expect(detail.getByText('task-901')).toBeInTheDocument();expect(detail.getByText('Description')).toBeInTheDocument();expect(detail.getByText('Reconfigure virtual machine CPU reservation')).toBeInTheDocument();+ // The activity links to the VM it happened to, opening that VM's drawer.+ expect(detail.getByRole('link', { name: 'Open warehouse-api-01' })).toHaveAttribute(+ 'href',+ '/vmware/overview?resource=vm-201',+ );await fireEvent.click(detail.getByRole('button', { name: /^Collapse .* details$/ }));@@ -168,7 +183,7 @@ describe('VsphereActivityTable', () => {makeVm({ recentChanges: [...vm.recentChanges!, unset] }),]);- render(() => (+ renderInRouter(() => (<VsphereActivityTableactivity={activity}emptyIcon={<span />}@@ -204,7 +219,7 @@ describe('VsphereActivityTable', () => {expect(detail.queryByText('Message')).not.toBeInTheDocument();});it('drops the vCenter column when one vCenter is connected', () => {- render(() => (+ renderInRouter(() => (<VsphereActivityTableactivity={buildVmwareActivityRows([makeVm()])}emptyIcon={<span />}diff --git a/frontend-modern/src/features/vmware/__tests__/VsphereAlertsTable.test.tsx b/frontend-modern/src/features/vmware/__tests__/VsphereAlertsTable.test.tsxindex 3b76c8740d..9a5027ce36 100644--- a/frontend-modern/src/features/vmware/__tests__/VsphereAlertsTable.test.tsx+++ b/frontend-modern/src/features/vmware/__tests__/VsphereAlertsTable.test.tsx@@ -1,10 +1,20 @@import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';+import { Route, Router } from '@solidjs/router';import { afterEach, describe, expect, it, vi } from 'vitest';import { VsphereAlertsTable } from '@/features/vmware/VsphereAlertsTable';import { buildVmwareIncidentRows } from '@/features/vmware/vmwarePageModel';import type { Resource } from '@/types/resource';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const makeHost = (overrides: Partial<Resource> = {}): Resource =>({id: 'host-alarm',@@ -44,7 +54,7 @@ afterEach(() => {describe('VsphereAlertsTable', () => {it('renders every signal without the filter toolbar for the overview lead-in', () => {- render(() => (+ renderInRouter(() => (<VsphereAlertsTableincidents={buildVmwareIncidentRows([makeHost()])}emptyIcon={<span />}@@ -83,7 +93,7 @@ describe('VsphereAlertsTable', () => {});const incidents = buildVmwareIncidentRows([informational, host]);- render(() => (+ renderInRouter(() => (<VsphereAlertsTableincidents={incidents}emptyIcon={<span />}@@ -142,6 +152,8 @@ describe('VsphereAlertsTable', () => {expect(detail.getByText('Primary DC')).toBeInTheDocument();expect(detail.getByText('Action')).toBeInTheDocument();expect(detail.getByText('Investigate in vCenter')).toBeInTheDocument();+ // The Hosts tab cannot open one host, so the drawer offers no owner link.+ expect(detail.queryByRole('link')).not.toBeInTheDocument();await fireEvent.click(detail.getByRole('button', { name: /^Collapse .* details$/ }));@@ -153,7 +165,7 @@ describe('VsphereAlertsTable', () => {);});it('drops the vCenter column when one vCenter is connected and keeps it in the drawer', async () => {- render(() => (+ renderInRouter(() => (<VsphereAlertsTableincidents={buildVmwareIncidentRows([makeHost()])}emptyIcon={<span />}@@ -177,7 +189,7 @@ describe('VsphereAlertsTable', () => {const host = makeHost();host.incidents = [{ ...host.incidents![0]!, startedAt }];- render(() => (+ renderInRouter(() => (<VsphereAlertsTableincidents={buildVmwareIncidentRows([host])}emptyIcon={<span />}@@ -195,7 +207,7 @@ describe('VsphereAlertsTable', () => {const host = makeHost();host.incidents = [{ ...host.incidents![0]!, startedAt: '2026-10-06T10:00:00Z' }];- render(() => (+ renderInRouter(() => (<VsphereAlertsTableincidents={buildVmwareIncidentRows([host])}emptyIcon={<span />}