Skip to content

Commit 4a9be31

Browse files
design-system upgrade -> 6.2.1 (#3196)
Checked for visual regressions locally
1 parent 93f206c commit 4a9be31

6 files changed

Lines changed: 49 additions & 18 deletions

File tree

app/components/RefetchIntervalPicker.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export function useIntervalPicker({ enabled, isLoading, fn, className }: Props)
5151
<div className={cn('flex', className)}>
5252
<button
5353
type="button"
54+
aria-label="Refresh data"
55+
data-testid="refetch-interval-refresh"
5456
className={cn(
5557
'border-default bg-default flex w-10 items-center justify-center rounded-l-md border-t border-b border-l disabled:cursor-default',
5658
isLoading && 'hover:bg-hover',
@@ -69,6 +71,8 @@ export function useIntervalPicker({ enabled, isLoading, fn, className }: Props)
6971
items={intervalItems}
7072
onChange={setIntervalPreset}
7173
disabled={!enabled}
74+
label="Refresh interval"
75+
hideLabel
7276
hideSelected
7377
/>
7478
</div>

app/pages/SiloUtilizationPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ export default function SiloUtilizationPage() {
102102
<Listbox
103103
selected={filterId}
104104
className="w-52"
105-
aria-labelledby="filter-id-label"
105+
label="Filter by project"
106+
hideLabel
106107
name="filter-id"
107108
items={projectItems}
108109
onChange={setFilterId}

app/pages/system/UtilizationPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ const MetricsTab = () => {
133133
<Listbox
134134
selected={filterId}
135135
className="w-52"
136-
aria-labelledby="filter-id-label"
136+
label="Filter by silo"
137+
hideLabel
137138
name="filter-id"
138139
items={siloItems}
139140
onChange={setFilterId}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@base-ui/react": "^1.1.0",
3838
"@floating-ui/react": "^0.26.23",
3939
"@headlessui/react": "^2.2.9",
40-
"@oxide/design-system": "^6.0.4",
40+
"@oxide/design-system": "^6.2.1",
4141
"@react-aria/live-announcer": "^3.3.4",
4242
"@tailwindcss/container-queries": "^0.1.1",
4343
"@tailwindcss/vite": "^4.1.17",

test/visual/regression.e2e.ts

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ import { expect, test } from '../e2e/utils'
1919
// set a fixed time to avoid diffs due to irrelevant time differences
2020
test.beforeEach(async ({ page }) => {
2121
await page.clock.setFixedTime(new Date('2025-10-23T12:34:56.000Z'))
22-
// TODO: revert to default viewport once we've confirmed no visual regressions
23-
// from the grid layout change. The tall viewport forces all content to render
24-
// without scrolling, so fullPage screenshots are comparable between the old
25-
// contained-scroll layout and the new document-scroll layout.
26-
await page.setViewportSize({ width: 1280, height: 3100 })
22+
// seed Math.random so mock data (e.g. metrics charts) is deterministic
23+
await page.addInitScript(() => {
24+
let seed = 0x12345678
25+
Math.random = () => {
26+
seed |= 0
27+
seed = (seed + 0x6d2b79f5) | 0
28+
let t = Math.imul(seed ^ (seed >>> 15), 1 | seed)
29+
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t
30+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296
31+
}
32+
})
2733
})
2834

2935
const fullPage = { fullPage: true }
@@ -53,7 +59,6 @@ const pages = [
5359
heading: 'Silo image',
5460
exact: true,
5561
},
56-
{ name: 'silo utilization', url: '/utilization', heading: 'Utilization' },
5762
{ name: 'silo access', url: '/access', heading: 'Silo Access' },
5863

5964
// Project - Instances
@@ -136,11 +141,6 @@ const pages = [
136141

137142
// System - Utilization
138143
{ name: 'system utilization', url: '/system/utilization', heading: 'Utilization' },
139-
{
140-
name: 'system utilization metrics tab',
141-
url: '/system/utilization?tab=metrics',
142-
heading: 'Utilization',
143-
},
144144

145145
// System - Networking
146146
{ name: 'system ip pools', url: '/system/networking/ip-pools', heading: 'IP Pools' },
@@ -231,4 +231,29 @@ test.describe('Visual Regression', { tag: '@visual' }, () => {
231231
await page.waitForLoadState('networkidle')
232232
await expect(page).toHaveScreenshot('command-menu.png', fullPage)
233233
})
234+
235+
// Utilization pages render charts and include the refetch interval picker —
236+
// wait for the chart, then mask the refresh button so the spinner state
237+
// doesn't cause flaky diffs.
238+
test('silo utilization', async ({ page }) => {
239+
await page.goto('/utilization', { waitUntil: 'networkidle' })
240+
await expect(page.getByRole('heading', { name: 'Utilization' })).toBeVisible()
241+
await expect(page.locator('.recharts-curve').first()).toBeVisible()
242+
await expect(page).toHaveScreenshot('silo-utilization.png', {
243+
fullPage: true,
244+
mask: [page.getByTestId('refetch-interval-refresh')],
245+
maskColor: '#0b0e14',
246+
})
247+
})
248+
249+
test('system utilization metrics tab', async ({ page }) => {
250+
await page.goto('/system/utilization?tab=metrics', { waitUntil: 'networkidle' })
251+
await expect(page.getByRole('heading', { name: 'Utilization' })).toBeVisible()
252+
await expect(page.locator('.recharts-curve').first()).toBeVisible()
253+
await expect(page).toHaveScreenshot('system-utilization-metrics-tab.png', {
254+
fullPage: true,
255+
mask: [page.getByTestId('refetch-interval-refresh')],
256+
maskColor: '#0b0e14',
257+
})
258+
})
234259
})

0 commit comments

Comments
 (0)