From e8fe9aba000b257d1c96a685e73ad3c099a24b11 Mon Sep 17 00:00:00 2001 From: Nico Hinderling Date: Thu, 21 May 2026 16:39:11 -0700 Subject: [PATCH] feat(preprod): Display images_skipped in snapshot table Wire images_skipped into the frontend ChangeCounts component so the snapshots table displays skipped image counts when present. Also fix the "No changes" early return to account for skipped-only cases, matching the backend behavior. Co-Authored-By: Claude --- .../preprod/preprodBuildsSnapshotTable.snapshots.tsx | 4 ++++ .../app/components/preprod/preprodBuildsSnapshotTable.tsx | 8 +++++++- static/app/views/preprod/types/buildDetailsTypes.ts | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx b/static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx index 0203058ccdd0e8..ca955081a0d1b8 100644 --- a/static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx +++ b/static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx @@ -69,6 +69,7 @@ function makeBuild( images_removed: 0, images_changed: 3, images_unchanged: 19, + images_skipped: 0, }, ...overrides, }; @@ -117,6 +118,7 @@ describe('PreprodBuildsSnapshotTable', () => { images_removed: 0, images_changed: 3, images_unchanged: 19, + images_skipped: 0, }, }) ), @@ -137,6 +139,7 @@ describe('PreprodBuildsSnapshotTable', () => { images_removed: 0, images_changed: 0, images_unchanged: 0, + images_skipped: 0, }, }) ), @@ -168,6 +171,7 @@ describe('PreprodBuildsSnapshotTable', () => { images_removed: 0, images_changed: 0, images_unchanged: 20, + images_skipped: 0, }, }) ), diff --git a/static/app/components/preprod/preprodBuildsSnapshotTable.tsx b/static/app/components/preprod/preprodBuildsSnapshotTable.tsx index eef097448b7fb0..b75b01d6a35bb9 100644 --- a/static/app/components/preprod/preprodBuildsSnapshotTable.tsx +++ b/static/app/components/preprod/preprodBuildsSnapshotTable.tsx @@ -31,18 +31,20 @@ function ChangeCounts({ removed, changed, unchanged, + skipped, comparisonState, }: { added: number; changed: number; comparisonState: SnapshotComparisonState | null | undefined; removed: number; + skipped: number; unchanged: number; }) { if (comparisonState !== 'success') { return {'–'}; } - if (added === 0 && removed === 0 && changed === 0) { + if (added === 0 && removed === 0 && changed === 0 && skipped === 0) { return ( {t('No changes')} @@ -62,6 +64,9 @@ function ChangeCounts({ if (unchanged > 0) { parts.push(t('%s unchanged', unchanged)); } + if (skipped > 0) { + parts.push(t('%s skipped', skipped)); + } return ( {parts.join(', ')} @@ -113,6 +118,7 @@ export function PreprodBuildsSnapshotTable({ removed={info?.images_removed ?? 0} changed={info?.images_changed ?? 0} unchanged={info?.images_unchanged ?? 0} + skipped={info?.images_skipped ?? 0} comparisonState={info?.comparison_state} /> diff --git a/static/app/views/preprod/types/buildDetailsTypes.ts b/static/app/views/preprod/types/buildDetailsTypes.ts index bf2b6e49c9d1e0..a3f6ea1853a5f4 100644 --- a/static/app/views/preprod/types/buildDetailsTypes.ts +++ b/static/app/views/preprod/types/buildDetailsTypes.ts @@ -211,5 +211,6 @@ interface SnapshotComparisonInfo { images_added: number; images_changed: number; images_removed: number; + images_skipped: number; images_unchanged: number; }