refactor(recovery): restore activity context above events table

This commit is contained in:
rcourtman 2026-03-28 13:33:07 +00:00
parent 9705b63f0e
commit 03de617c9d
3 changed files with 57 additions and 56 deletions

View file

@ -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

View file

@ -532,6 +532,54 @@ const Recovery: Component = () => {
</Show>
<Show when={workspaceView() === 'events'}>
<RecoveryActivitySection
activitySummary={activitySummary}
activeClusterLabel={activeClusterLabel}
activeItemTypeLabel={activeItemTypeLabel}
activeNamespaceLabel={activeNamespaceLabel}
activeNodeLabel={activeNodeLabel}
chartRangeDays={chartRangeDays}
clearClusterFilter={() => {
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);
}}
/>
<Show when={!recoveryPoints.response.loading && recoveryPoints.response.error}>
<Card padding="sm">
<EmptyState
@ -593,54 +641,6 @@ const Recovery: Component = () => {
verificationFilter={verificationFilter}
/>
</Show>
<RecoveryActivitySection
activitySummary={activitySummary}
activeClusterLabel={activeClusterLabel}
activeItemTypeLabel={activeItemTypeLabel}
activeNamespaceLabel={activeNamespaceLabel}
activeNodeLabel={activeNodeLabel}
chartRangeDays={chartRangeDays}
clearClusterFilter={() => {
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);
}}
/>
</Show>
</>
);

View file

@ -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();