fix(web): rename storageUsagePie helper to storageUsageSlices to avoid macOS case-collision with StorageUsagePie.tsx (#1483)

Since #1383 renamed the helper to storageUsagePie.ts, the same directory
contained both StorageUsagePie.tsx and storageUsagePie.ts. On case-insensitive
filesystems (macOS), extensionless imports of the component resolve to the
helper because '.ts' is tried before '.tsx' and 'StorageUsagePie.ts' matches
'storageUsagePie.ts' case-insensitively, breaking typecheck and component
tests on macOS. Linux CI is unaffected.

Renames the helper (and its test) to storageUsageSlices.ts, which cannot
collide, and updates the two importers. Fixes #1482.
This commit is contained in:
SSU-WEI HUANG
2026-08-11 10:04:18 +08:00
committed by GitHub
parent 24e0c76717
commit d147ae00aa
3 changed files with 2 additions and 2 deletions
@@ -7,7 +7,7 @@ import {
type StorageUsageBytes,
type StorageUsageSlice,
type StorageUsageSliceKey,
} from '@/components/settings/storageUsagePie'
} from '@/components/settings/storageUsageSlices'
const SLICE_FILL: Record<StorageUsageSliceKey, string> = {
database: 'var(--app-link)',
@@ -4,7 +4,7 @@ import {
describeDonutArc,
formatStoragePercent,
polarToCartesian,
} from './storageUsagePie'
} from './storageUsageSlices'
describe('buildStorageUsageSlices', () => {
it('drops zero-byte sidecars and returns empty when nothing has size', () => {