From 78c025ff000f95862cf3d0f356a620f4e84468e5 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 27 Mar 2026 23:30:54 +0000 Subject: [PATCH] refactor(recovery): simplify default events grid --- .../internal/subsystems/storage-recovery.md | 6 +++ .../src/components/Recovery/Recovery.tsx | 4 +- .../Recovery/RecoveryHistoryTable.tsx | 44 +++++++++---------- .../Recovery/__tests__/Recovery.test.tsx | 6 ++- 4 files changed, 34 insertions(+), 26 deletions(-) diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md index b3d1827925..804f1c6da0 100644 --- a/docs/release-control/v6/internal/subsystems/storage-recovery.md +++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md @@ -678,6 +678,12 @@ pattern as the protected inventory surface, not a separate large titled header bar plus another full toolbar slab. Event filter labels should also stay on the canonical short Pulse vocabulary like `Platform` and `Status` instead of recovery-only variants such as `History platform` or `History status`. +That same events-table contract should also keep the default column set on a +monitoring-style scan path rather than a report-export path. Recovery events +should default to the concise columns operators need to triage quickly, while +secondary fields such as verification, size, target, and details remain +available through the shared column picker instead of crowding the baseline +grid. That shared unified-resource dependency now also includes policy-governed resource metadata on the frontend decode path: storage and recovery surfaces that route through `frontend-modern/src/hooks/useUnifiedResources.ts` must diff --git a/frontend-modern/src/components/Recovery/Recovery.tsx b/frontend-modern/src/components/Recovery/Recovery.tsx index c57d4e5eba..04aa73bb83 100644 --- a/frontend-modern/src/components/Recovery/Recovery.tsx +++ b/frontend-modern/src/components/Recovery/Recovery.tsx @@ -305,7 +305,7 @@ const Recovery: Component = () => { { id: 'verified', label: 'Verified', toggleable: true }, { id: 'size', label: 'Size', toggleable: true }, { id: 'method', label: 'Method' }, - { id: 'repository', label: 'Target' }, + { id: 'repository', label: 'Target', toggleable: true }, { id: 'details', label: 'Details', toggleable: true }, { id: 'outcome', label: 'Outcome' }, ]; @@ -333,7 +333,7 @@ const Recovery: Component = () => { const artifactColumnVisibility = useColumnVisibility( STORAGE_KEYS.RECOVERY_HIDDEN_COLUMNS, artifactColumns, - ['entityId', 'cluster', 'nodeAgent', 'namespace'], + ['entityId', 'cluster', 'nodeAgent', 'namespace', 'verified', 'size', 'repository', 'details'], relevantArtifactColumnIDs, LEGACY_RECOVERY_COLUMN_ID_ALIASES, ); diff --git a/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx b/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx index 866343f39c..95f5f7a039 100644 --- a/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx +++ b/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx @@ -117,7 +117,7 @@ export const RecoveryHistoryTable: Component = (props >
@@ -125,7 +125,7 @@ export const RecoveryHistoryTable: Component = (props {(column) => ( @@ -203,7 +203,7 @@ export const RecoveryHistoryTable: Component = (props case 'time': return ( @@ -212,10 +212,10 @@ export const RecoveryHistoryTable: Component = (props ); case 'type': return ( - + —}> @@ -227,11 +227,11 @@ export const RecoveryHistoryTable: Component = (props case 'item': return (
- + {item} @@ -271,34 +271,34 @@ export const RecoveryHistoryTable: Component = (props ); case 'entityId': return ( - + {entityId || '—'} ); case 'cluster': return ( - + {cluster || '—'} ); case 'nodeAgent': return ( - + {nodeAgent || '—'} ); case 'namespace': return ( - + {namespace || '—'} ); case 'platform': { const badge = getSourcePlatformBadge(platform); return ( - + {badge?.label || getSourcePlatformLabel(platform)} @@ -307,7 +307,7 @@ export const RecoveryHistoryTable: Component = (props } case 'verified': return ( - + {typeof point.verified === 'boolean' ? ( point.verified ? ( = (props ); case 'size': return ( - + {point.sizeBytes && point.sizeBytes > 0 ? formatBytes(point.sizeBytes) : '—'} @@ -363,9 +363,9 @@ export const RecoveryHistoryTable: Component = (props ); case 'method': return ( - + @@ -376,7 +376,7 @@ export const RecoveryHistoryTable: Component = (props case 'repository': return ( {repoLabel || '—'} @@ -385,7 +385,7 @@ export const RecoveryHistoryTable: Component = (props case 'details': return ( {detailsSummary || '—'} @@ -393,9 +393,9 @@ export const RecoveryHistoryTable: Component = (props ); case 'outcome': return ( - + @@ -405,7 +405,7 @@ export const RecoveryHistoryTable: Component = (props ); default: return ( - + - ); diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx index b188156685..bdf3c61a8b 100644 --- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx +++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx @@ -243,6 +243,8 @@ describe('Recovery', () => { expect(within(historyTable).getByText('Item Type')).toBeInTheDocument(); expect(within(historyTable).getByText('Item')).toBeInTheDocument(); expect(within(historyTable).getByText('Platform')).toBeInTheDocument(); + expect(within(historyTable).queryByText('Target')).not.toBeInTheDocument(); + expect(within(historyTable).queryByText('Details')).not.toBeInTheDocument(); }); it('persists the selected recovery workspace view in the route when explicitly changed', async () => { @@ -438,7 +440,7 @@ describe('Recovery', () => { expect(within(historyTable).getByText('default/data')).toBeInTheDocument(); expect(within(historyTable).getByText('PVC')).toBeInTheDocument(); expect(within(historyTable).getByText('K8s')).toBeInTheDocument(); - expect(within(historyTable).getByText('Immutable copy')).toBeInTheDocument(); + expect(within(historyTable).queryByText('Immutable copy')).not.toBeInTheDocument(); fireEvent.click(within(historyTable).getByText('11:00')); @@ -469,7 +471,7 @@ describe('Recovery', () => { const tables = await screen.findAllByRole('table'); const historyTable = tables.find((table) => within(table).queryByText('Local Copy')); expect(historyTable).toBeDefined(); - expect(historyTable).toHaveStyle({ 'min-width': '1142px', 'table-layout': 'fixed' }); + expect(historyTable).toHaveStyle({ 'min-width': '980px', 'table-layout': 'fixed' }); }); it('keeps canonical item and platform columns visible when legacy hidden-column ids exist', async () => {