refactor(recovery): trim summary support rows

This commit is contained in:
rcourtman 2026-03-28 13:51:38 +00:00
parent 19f1cb858f
commit 776d281f87
4 changed files with 10 additions and 10 deletions

View file

@ -689,6 +689,12 @@ instead of behaving like a recovery-only executive summary.
That support band should stay genuinely short, usually two or three compact
rows rather than four-item micro reports, so the operator can scan the summary
as orientation instead of reading each card like a dense checklist.
That same summary-scan rule should also trim derivative rows that restate the
headline instead of adding a new operator question. `Freshness` should not add
an extra `<24h` row under a `fresh in 24h` headline, `Protected Footprint`
should not spend a row repeating a primary-platform label when platform count
already frames the footprint, and `Recent History` should stay on a short
activity readout rather than carrying a four-line micro report.
That same summary-card rule should also avoid inline distribution bars or
dashboard-style subvisualizations inside the cards when the same signal can be
expressed as short metric rows. Recovery summary cards should stay on the

View file

@ -63,12 +63,9 @@ describe('RecoverySummary', () => {
expect(screen.getByText(/item types/i)).toBeInTheDocument();
expect(screen.getByText('Platforms')).toBeInTheDocument();
expect(screen.getByText('Primary Item')).toBeInTheDocument();
expect(screen.getByText('Primary Platform')).toBeInTheDocument();
expect(screen.getByText('Avg / Day')).toBeInTheDocument();
expect(screen.getByText('Healthy')).toBeInTheDocument();
expect(screen.getByText('Failed')).toBeInTheDocument();
expect(screen.getByText('<1h')).toBeInTheDocument();
expect(screen.getByText('<24h')).toBeInTheDocument();
expect(screen.getByText('>7d')).toBeInTheDocument();
expect(screen.getByText('fresh in 24h')).toBeInTheDocument();
expect(screen.getByText('Latest Activity')).toBeInTheDocument();
@ -78,6 +75,9 @@ describe('RecoverySummary', () => {
expect(screen.queryByText('protected items')).not.toBeInTheDocument();
expect(screen.queryByText('Running')).not.toBeInTheDocument();
expect(screen.queryByText('<7d')).not.toBeInTheDocument();
expect(screen.queryByText('<24h')).not.toBeInTheDocument();
expect(screen.queryByText('Primary Platform')).not.toBeInTheDocument();
expect(screen.queryByText('Avg / Day')).not.toBeInTheDocument();
expect(screen.queryByText('Peak Throughput')).not.toBeInTheDocument();
expect(screen.queryByText('stale items')).not.toBeInTheDocument();
});

View file

@ -80,10 +80,6 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
},
]);
const freshnessRows = createMemo(() => [
{
label: '<24h',
value: freshnessBuckets().find((bucket) => bucket.key === 'under24h')?.count ?? 0,
},
{
label: '>7d',
value: freshnessBuckets().find((bucket) => bucket.key === 'over7d')?.count ?? 0,
@ -178,7 +174,6 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
rows={[
{ label: 'Platforms', value: platformCoverage().platformCount },
{ label: 'Primary Item', value: itemCoverage().primaryItemLabel ?? 'n/a' },
{ label: 'Primary Platform', value: platformCoverage().primaryPlatformLabel ?? 'n/a' },
]}
/>
</div>
@ -202,7 +197,6 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
<MetricRows
rows={[
{ label: 'Days Active', value: activity().activeDays },
{ label: 'Avg / Day', value: activity().averagePerDay.toFixed(1) },
{ label: 'Peak Day', value: activity().busiestLabel ?? 'n/a' },
{ label: 'Latest Activity', value: activity().latestLabel ?? 'n/a' },
]}

View file

@ -417,8 +417,8 @@ describe('Recovery', () => {
const summary = await screen.findByTestId('recovery-summary');
expect(within(summary).getByText('Protected Footprint')).toBeInTheDocument();
expect(within(summary).getByText('Primary Item')).toBeInTheDocument();
expect(within(summary).getByText('Primary Platform')).toBeInTheDocument();
expect(within(summary).getAllByText(/platforms/i).length).toBeGreaterThan(0);
expect(within(summary).queryByText('Primary Platform')).not.toBeInTheDocument();
});
it('normalizes legacy provider-shaped recovery payloads before rendering', async () => {