Context
usageLevel(pct, exhausted) in apps/desktop-tauri/src/surfaces/tray/UsageBar.tsx:11 maps a percentage into normal | high | critical | exhausted (thresholds at 70 and 90, with exhausted taking priority). Pure function, no test.
Task
Export usageLevel and add unit tests (a new UsageBar.test.tsx can hold both this and the ARIA test if that issue is done together).
Acceptance criteria
- Covers each band and both sides of the boundaries:
0, 69, 70, 89, 90, 100.
- Covers
exhausted = true overriding a low percentage.
- Uses the existing vitest setup.
How to test
pnpm --dir apps/desktop-tauri test
Pointers
Context
usageLevel(pct, exhausted)inapps/desktop-tauri/src/surfaces/tray/UsageBar.tsx:11maps a percentage intonormal | high | critical | exhausted(thresholds at 70 and 90, withexhaustedtaking priority). Pure function, no test.Task
Export
usageLeveland add unit tests (a newUsageBar.test.tsxcan hold both this and the ARIA test if that issue is done together).Acceptance criteria
0,69,70,89,90,100.exhausted = trueoverriding a low percentage.How to test
Pointers
UsageBar.tsx:11