From 03de617c9d56a697cdbb32e60ee60aa1b36f3b59 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 28 Mar 2026 13:33:07 +0000 Subject: [PATCH] refactor(recovery): restore activity context above events table --- .../internal/subsystems/storage-recovery.md | 9 +- .../src/components/Recovery/Recovery.tsx | 96 +++++++++---------- .../Recovery/__tests__/Recovery.test.tsx | 8 +- 3 files changed, 57 insertions(+), 56 deletions(-) diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md index 4906aa49e..ba781fcdc 100644 --- a/docs/release-control/v6/internal/subsystems/storage-recovery.md +++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md @@ -794,10 +794,11 @@ 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-workspace rule should keep the handoff data-first. The events -workspace should move from tabs to shared controls to the recovery history -table before showing the activity/timeline card, so the analytics surface -stays secondary to the working table instead of interrupting the operator path. +That same events-workspace rule should keep the activity strip as orientation +for the event list rather than burying it at the bottom. The events workspace +should move from tabs to `RecoveryActivitySection.tsx`, then shared controls, +then the recovery history table, so the timeline frames the event list without +turning the page back into stacked primary tables. That same events-shell contract should avoid repeating page-state bookkeeping ahead of the history grid. Recovery events should keep the toolbar utility area focused on actual controls like advanced filters and column visibility instead diff --git a/frontend-modern/src/components/Recovery/Recovery.tsx b/frontend-modern/src/components/Recovery/Recovery.tsx index a4d8cdba5..08e4ee6b8 100644 --- a/frontend-modern/src/components/Recovery/Recovery.tsx +++ b/frontend-modern/src/components/Recovery/Recovery.tsx @@ -532,6 +532,54 @@ const Recovery: Component = () => { + { + setClusterFilter('all'); + setCurrentPage(1); + }} + clearFocusedRollup={() => setRollupId('')} + clearItemTypeFilter={() => { + setItemTypeFilter('all'); + setCurrentPage(1); + }} + clearNamespaceFilter={() => { + setNamespaceFilter('all'); + setCurrentPage(1); + }} + clearNodeFilter={() => { + setNodeFilter('all'); + setCurrentPage(1); + }} + clearSelectedDate={() => { + setSelectedDateKey(null); + setCurrentPage(1); + }} + hasFocusedRollup={() => rollupId().trim().length > 0} + isMobile={isMobile()} + loading={() => recoverySeries.response.loading} + overallRollupsSummary={overallRollupsSummary} + selectedDateKey={selectedDateKey} + selectedDateLabel={selectedDateLabel} + selectedHistoryItemLabel={selectedHistoryItemLabel} + setChartRangeDays={(range) => { + setChartRangeDays(range); + setSelectedDateKey(null); + setCurrentPage(1); + }} + timeline={timeline} + toggleSelectedDate={(key) => { + setWorkspaceView('events'); + setSelectedDateKey((previous) => (previous === key ? null : key)); + setCurrentPage(1); + }} + /> + { verificationFilter={verificationFilter} /> - - { - setClusterFilter('all'); - setCurrentPage(1); - }} - clearFocusedRollup={() => setRollupId('')} - clearItemTypeFilter={() => { - setItemTypeFilter('all'); - setCurrentPage(1); - }} - clearNamespaceFilter={() => { - setNamespaceFilter('all'); - setCurrentPage(1); - }} - clearNodeFilter={() => { - setNodeFilter('all'); - setCurrentPage(1); - }} - clearSelectedDate={() => { - setSelectedDateKey(null); - setCurrentPage(1); - }} - hasFocusedRollup={() => rollupId().trim().length > 0} - isMobile={isMobile()} - loading={() => recoverySeries.response.loading} - overallRollupsSummary={overallRollupsSummary} - selectedDateKey={selectedDateKey} - selectedDateLabel={selectedDateLabel} - selectedHistoryItemLabel={selectedHistoryItemLabel} - setChartRangeDays={(range) => { - setChartRangeDays(range); - setSelectedDateKey(null); - setCurrentPage(1); - }} - timeline={timeline} - toggleSelectedDate={(key) => { - setWorkspaceView('events'); - setSelectedDateKey((previous) => (previous === key ? null : key)); - setCurrentPage(1); - }} - /> ); diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx index d6cc789f9..37b1688ac 100644 --- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx +++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx @@ -283,12 +283,12 @@ describe('Recovery', () => { expect( historyTablist.compareDocumentPosition(historyControls) & Node.DOCUMENT_POSITION_FOLLOWING, ).not.toBe(0); - expect( - historyControls.compareDocumentPosition(historyTable) & Node.DOCUMENT_POSITION_FOLLOWING, - ).not.toBe(0); const activityHeading = screen.getByText('Recovery Activity'); expect( - historyTable.compareDocumentPosition(activityHeading) & Node.DOCUMENT_POSITION_FOLLOWING, + activityHeading.compareDocumentPosition(historyControls) & Node.DOCUMENT_POSITION_FOLLOWING, + ).not.toBe(0); + expect( + historyControls.compareDocumentPosition(historyTable) & Node.DOCUMENT_POSITION_FOLLOWING, ).not.toBe(0); const historySearch = within(historyControls).getByPlaceholderText('Search recovery history...'); expect(historySearch).toBeInTheDocument();