diff --git a/ui/provider/src/components/create-capacity-dialog.tsx b/ui/provider/src/components/create-capacity-dialog.tsx
index 267b152b..2df862a7 100644
--- a/ui/provider/src/components/create-capacity-dialog.tsx
+++ b/ui/provider/src/components/create-capacity-dialog.tsx
@@ -1,3 +1,4 @@
+import { Spinner } from '@datum-cloud/datum-ui/spinner';
import { Button } from '@datum-cloud/datum-ui/button';
import { Label } from '@datum-cloud/datum-ui/label';
import { useQuery } from '@tanstack/react-query';
@@ -73,7 +74,7 @@ export function CapacityRegistrationForm({ onRegistered }: { onRegistered?: () =
// A Device without a uid is listed as ineligible; its placeholder value never matches a selection.
return { value: device.metadata.uid ?? `unidentified/${device.metadata.name}`, disabled: !!reason, label: `${device.metadata.name}${reason ? ` — ${reason}` : ''}` };
})} />
- {devices.isPending &&
Loading Devices…
}
+ {devices.isPending && Loading Devices…
}
{devices.error && Devices are unavailable or access is denied. Registration is blocked.
}
{devices.data?.length === 0 && No Devices are available in default.
}
{selected && Capacity name: {capacityNameFor(selected)}
}
diff --git a/ui/provider/src/components/device-discovery.test.tsx b/ui/provider/src/components/device-discovery.test.tsx
index 8e173251..b70fda69 100644
--- a/ui/provider/src/components/device-discovery.test.tsx
+++ b/ui/provider/src/components/device-discovery.test.tsx
@@ -19,7 +19,8 @@ const hardware = () => screen.getByRole('region', { name: 'Hardware & management
const table = (label: string) => within(hardware()).getByRole('table', { name: label });
const rowOf = (label: string, first: string) => within(table(label)).getAllByRole('row').find(row => within(row).queryAllByRole('cell')[0]?.textContent === first)!;
const cells = (label: string, first: string) => within(rowOf(label, first)).getAllByRole('cell');
-const chips = () => within(within(hardware()).getByRole('list', { name: 'Discovery conditions' })).getAllByRole('listitem');
+// Each list item holds one datum-ui Badge, which carries the tone, status and tooltip.
+const chips = () => within(within(hardware()).getByRole('list', { name: 'Discovery conditions' })).getAllByRole('listitem').map(item => item.firstElementChild as HTMLElement);
const fact = (label: string) => within(hardware()).getByText(label, { selector: 'dt' }).nextElementSibling as HTMLElement;
const header = (container: HTMLElement) => container.querySelector('.inventory-fact-strip')!;
diff --git a/ui/provider/src/components/device-discovery.tsx b/ui/provider/src/components/device-discovery.tsx
index d8553bbd..03ba36bd 100644
--- a/ui/provider/src/components/device-discovery.tsx
+++ b/ui/provider/src/components/device-discovery.tsx
@@ -1,6 +1,7 @@
// The Device page's view of BMC discovery: Device.status, next to the spec it
// is compared with. See "Device page" in docs/development/staff-inventory-ui.md.
// Red is a disagreement or failure, amber needs checking, and OK stays plain.
+import { Badge } from '@datum-cloud/datum-ui/badge';
import { Button } from '@datum-cloud/datum-ui/button';
import { useState, type ReactNode } from 'react';
import type { Device } from '../../../shared/fleet-api';
@@ -20,22 +21,27 @@ function Marked({ tone, reason, children }: { tone: Tone; reason?: string; child
;
}
+/** Red for a disagreement or failure, amber to check, plain outline when OK. */
+function chipBadge(tone: Tone) {
+ return { type: tone ?? 'secondary', theme: tone ? 'light' : 'outline' } as const;
+}
+
/** The header's one BMC chip; nothing before discovery has run. */
export function BmcChip({ device }: { device: Device }) {
const chip = bmcChip(device);
if (!chip) return null;
return
BMC
- {chip.label}. {chip.reason}
+ {chip.label}. {chip.reason}
;
}
/** The five conditions as one line of chips; the reason and message are each chip's tooltip. */
export function ConditionChips({ device }: { device: Device }) {
return
- {conditionChips(device).map(chip =>
+ {conditionChips(device).map(chip =>
{chip.status === 'False' ? '✕ ' : chip.status === 'Unknown' ? '? ' : ''} {chip.word}
. {chip.reason}
- )}
+ )}
;
}
diff --git a/ui/provider/src/components/device-power.tsx b/ui/provider/src/components/device-power.tsx
index 40549676..3a4a0926 100644
--- a/ui/provider/src/components/device-power.tsx
+++ b/ui/provider/src/components/device-power.tsx
@@ -2,6 +2,7 @@
// operation in the header strip, the Power control in the header actions, and
// the Operations tab. See "Device page: power" in
// docs/development/staff-inventory-ui.md.
+import { Badge } from '@datum-cloud/datum-ui/badge';
import { Button } from '@datum-cloud/datum-ui/button';
import { Input } from '@datum-cloud/datum-ui/input';
import { Label } from '@datum-cloud/datum-ui/label';
@@ -26,10 +27,12 @@ const HOUR = 3_600_000;
/** A phase badge: the reason and any recovery hold are its tooltip and accessible text. */
export function PowerOutcomeBadge({ outcome, prefix }: { outcome: PowerOutcome; prefix?: string }) {
const note = [outcome.reason, outcome.hold].filter(Boolean).join('\n') || undefined;
- return
+ // Red failed or unknown, amber cancelled, blue dashed in progress, plain outline when it succeeded.
+ const tone = outcome.tone === 'progress' ? { type: 'info', theme: 'outline' } as const : outcome.tone ? { type: outcome.tone, theme: 'light' } as const : { type: 'secondary', theme: 'outline' } as const;
+ return
{prefix && <>{prefix} · >}{outcome.label}{outcome.hold && · held }
{note && . {note} }
- ;
+ ;
}
/**
diff --git a/ui/provider/src/components/inventory-directory-heading.tsx b/ui/provider/src/components/inventory-directory-heading.tsx
index bb6bf0cb..52bbdb34 100644
--- a/ui/provider/src/components/inventory-directory-heading.tsx
+++ b/ui/provider/src/components/inventory-directory-heading.tsx
@@ -1,3 +1,4 @@
+import { Badge } from '@datum-cloud/datum-ui/badge';
import { Button } from '@datum-cloud/datum-ui/button';
import { Input } from '@datum-cloud/datum-ui/input';
import { Label } from '@datum-cloud/datum-ui/label';
@@ -69,7 +70,7 @@ export function InventoryToolbar({ section, search = '', onSearch, location = ''
{(hasLocation || hasModel) &&
}>
- Filter {active > 0 && {active} }
+ Filter {active > 0 && {active} }
diff --git a/ui/provider/src/components/inventory-location.tsx b/ui/provider/src/components/inventory-location.tsx
index 640aecc6..9e220a15 100644
--- a/ui/provider/src/components/inventory-location.tsx
+++ b/ui/provider/src/components/inventory-location.tsx
@@ -1,4 +1,5 @@
import { Button } from '@datum-cloud/datum-ui/button';
+import { ButtonGroup } from '@datum-cloud/datum-ui/button-group';
import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from '@datum-cloud/datum-ui/table';
import { Title } from '@datum-cloud/datum-ui/typography';
import { useState, type ReactNode } from 'react';
@@ -96,7 +97,7 @@ export function RackOverview({ rack, inventory, selection, toolbar }: { rack: Ph
return
Rack elevation {height ? `${height}U` : 'Height unknown'}
- {(['both', 'front', 'rear'] as const).map(value => setFace(value)}>{value === 'both' ? 'Front + rear' : value === 'front' ? 'Front' : 'Rear'} )}
{toolbar}
+ {(['both', 'front', 'rear'] as const).map(value => setFace(value)}>{value === 'both' ? 'Front + rear' : value === 'front' ? 'Front' : 'Rear'} )} {toolbar}
{denied ? Installation details unavailable. Rack positions cannot be shown.
: !height ? Rack height is not recorded. Equipment remains listed without invented slots.
: {(['front', 'rear'] as const).filter(value => face === 'both' || face === value).map(side => )}
}
;
diff --git a/ui/provider/src/components/inventory-navigation.tsx b/ui/provider/src/components/inventory-navigation.tsx
index d9dfc3e2..14ebe578 100644
--- a/ui/provider/src/components/inventory-navigation.tsx
+++ b/ui/provider/src/components/inventory-navigation.tsx
@@ -1,5 +1,6 @@
import { Link, useLocation, useSearchParams } from 'react-router';
import { Button } from '@datum-cloud/datum-ui/button';
+import { ButtonGroup } from '@datum-cloud/datum-ui/button-group';
import { Popover, PopoverContent, PopoverTrigger } from '@datum-cloud/datum-ui/popover';
import { Box, Building2, Cable, Check, ChevronDown, ClipboardList, Factory, HardDrive, MapPin, Server, Zap } from 'lucide-react';
import { inventoryDirectoryPath, inventoryReturnSearch } from './inventory-page-title';
@@ -114,15 +115,17 @@ function CatalogNavigation({ counts }: { counts?: InventoryCounts }) {
const { href, current } = useCategoryHref(active);
return
{CATALOG_KINDS.map(kind => )}
- {CATALOG_KINDS.map(kind => {
+ {CATALOG_KINDS.map(kind => {
const section = sections.find(item => item.kind === kind)!;
const Icon = section.icon;
const target = href(kind);
- return { if (target === current) event.preventDefault(); }}>
- {section.title}
- ;
- })}
+ return
+ { if (target === current) event.preventDefault(); }}>
+ {section.title}
+
+ ;
+ })}
;
}
diff --git a/ui/provider/src/components/physical-inventory.css b/ui/provider/src/components/physical-inventory.css
index 0a161aba..f23faef0 100644
--- a/ui/provider/src/components/physical-inventory.css
+++ b/ui/provider/src/components/physical-inventory.css
@@ -84,8 +84,6 @@
.inventory-rack-plan-far a { color:var(--muted-foreground); }
.inventory-rack-plan-side { font-style:italic; }
.inventory-rack-plan[data-depth="unknown"]:not(.inventory-rack-plan-far) { border-style:dotted; }
-.inventory-face-switch { display:flex; gap:4px; }
-.inventory-face-switch button { flex:none; }
.inventory-equipment-sections { display:grid; gap:16px; min-width:0; }
.inventory-equipment-sections section { display:grid; gap:10px; }
.inventory-count { font-size:11px; color:var(--muted-foreground); font-weight:400; }
@@ -123,8 +121,7 @@
.inventory-rack-header { display:grid; gap:6px; min-width:0; }
.inventory-rack-summary { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; }
.inventory-rack-summary > span + span::before { content:"·"; margin-right:12px; color:var(--muted-foreground); }
-.fleet-inventory a.inventory-issue-badge { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border:1px solid var(--destructive); border-radius:999px; font-size:12px; text-decoration:none; }
-.fleet-inventory a.inventory-issue-badge[data-kind="unpositioned"] { border-style:dashed; border-color:var(--muted-foreground); }
+.fleet-inventory a.inventory-issue-badge { display:inline-flex; text-decoration:none; }
.inventory-rack-tabs [role="tablist"] { max-width:100%; overflow-x:auto; }
.inventory-rack-tabs [role="tab"] { flex-shrink:0; }
.fleet-inventory .inventory-rack-tabs a[role="tab"] { text-decoration:none; }
@@ -599,10 +596,7 @@
/* BMC discovery on the Device page: red disagrees or failed, amber needs checking, OK is plain. */
.inventory-discovery-chips { display:flex; flex-wrap:wrap; gap:4px; margin:0; padding:0; list-style:none; }
-.inventory-discovery-chip { display:inline-flex; align-items:center; gap:3px; padding:0 6px; border:1px solid var(--border); border-radius:4px; font-size:12px; line-height:20px; white-space:nowrap; }
-.inventory-discovery-chip[data-tone="danger"] { border-color:var(--destructive); color:var(--destructive); font-weight:500; }
-.inventory-discovery-chip[data-tone="warning"] { border-color:var(--warning,#d97706); }
-.inventory-fact-strip .inventory-discovery-chip { line-height:18px; }
+.inventory-discovery-chip { gap:3px; white-space:nowrap; }
.inventory-discovery-mark[data-tone="danger"] { color:var(--destructive); font-weight:500; }
.inventory-discovery-key { display:inline-flex; flex-wrap:wrap; align-items:baseline; gap:6px; min-width:0; }
.inventory-copy { height:20px; padding:0 6px; font-size:11px; }
@@ -638,11 +632,7 @@
.inventory-switcher-menu a[aria-current="page"] .inventory-tab-count { margin-left:auto; }
.inventory-switcher-check { margin-left:6px; }
-.inventory-catalog-toggle a { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 10px; border-radius:var(--radius); color:var(--foreground); font-size:14px; font-weight:400; text-decoration:none; white-space:nowrap; }
-.inventory-catalog-toggle a:hover { background:var(--muted); color:var(--primary); }
-.inventory-catalog-toggle a[aria-current="page"] { background:var(--muted); color:var(--primary); font-weight:500; }
-.inventory-catalog-toggle a:focus-visible { outline:2px solid var(--ring); outline-offset:2px; }
-.inventory-catalog-toggle svg { flex:none; }
+.inventory-catalog-toggle a { gap:6px; text-decoration:none; white-space:nowrap; }
/* The toolbar row: a card whose bottom edge joins the table. */
.inventory-list-frame .inventory-toolbar { flex-wrap:nowrap; gap:4px; min-height:44px; padding:0 8px 0 calc(var(--inventory-switcher-w, 0px) + 2px); border:1px solid var(--border); border-radius:var(--radius) var(--radius) 0 0; background:var(--card); }
@@ -653,7 +643,8 @@
.inventory-list-frame .inventory-search input:focus-visible { outline:none; box-shadow:none; }
.inventory-list-frame .inventory-search:focus-within { box-shadow:inset 0 -2px 0 var(--ring); }
.inventory-list-frame .inventory-toolbar-actions { flex-wrap:nowrap; gap:4px; }
-.inventory-filter-count { display:inline-block; min-width:18px; height:18px; margin-left:6px; padding:0 5px; border-radius:9px; background:var(--primary); color:var(--primary-foreground); font-size:11px; line-height:18px; text-align:center; }
+.inventory-filter-count { margin-left:6px; padding:0 6px; font-variant-numeric:tabular-nums; }
+.inventory-loading { display:flex; align-items:center; gap:8px; }
.inventory-filter-panel { display:grid; gap:12px; width:min(280px,calc(100vw - 32px)); }
.inventory-filter-panel .inventory-filter-field { display:grid; gap:6px; font-size:13px; }
.inventory-filter-panel .field-select { width:100%; }
@@ -683,7 +674,7 @@
@media(max-width:640px) {
.inventory-list-frame > .inventory-sections { position:static; height:auto; margin-bottom:8px; padding:0; border:0; }
.inventory-list-frame > .inventory-sections .inventory-switcher { border-color:var(--border); background:var(--card); }
- .inventory-list-frame > .inventory-catalog-toggle { display:inline-flex; padding:4px; border:1px solid var(--border); border-radius:calc(var(--radius) + 2px); background:var(--card); }
+ .inventory-list-frame > .inventory-catalog-toggle { display:inline-flex; }
.inventory-list-frame .inventory-toolbar { padding-left:0; }
.inventory-list-frame .inventory-filter-label { display:none; }
}
@@ -717,12 +708,6 @@
.fleet-inventory .inventory-tab-row a[role="tab"] { color:var(--foreground); text-decoration:none; }
.fleet-inventory .inventory-tab-row a[role="tab"]:hover,.fleet-inventory .inventory-tab-row a[role="tab"][data-state="active"] { color:var(--primary); }
-/* Rack face toggle: a segmented pill, like the host's ViewTabs. */
-.inventory-face-switch { display:inline-flex; flex-wrap:wrap; gap:2px; width:fit-content; max-width:100%; padding:3px; border-radius:calc(var(--radius) + 2px); background:color-mix(in oklab,var(--border) 50%,transparent); }
-.inventory-face-switch button { flex:none; height:28px; padding:0 12px; border:0; border-radius:var(--radius); background:transparent; color:var(--foreground); font-weight:400; box-shadow:none; }
-.inventory-face-switch button:hover { color:var(--primary); }
-.inventory-face-switch button[aria-pressed="true"] { background:var(--card); color:var(--primary); font-weight:500; }
-
/* Device power: the header control, its outcome badge and the Operations tab. */
.inventory-title-actions .inventory-power-control { display:contents; }
.inventory-title-actions .inventory-power-control .inventory-management-controls { flex-shrink:0; }
diff --git a/ui/provider/src/components/rack-detail.tsx b/ui/provider/src/components/rack-detail.tsx
index b65f25da..6cbb46c5 100644
--- a/ui/provider/src/components/rack-detail.tsx
+++ b/ui/provider/src/components/rack-detail.tsx
@@ -9,6 +9,7 @@
// fallback stays labelled; overlaps are flagged, never blocked; a denied
// collection shows "unavailable" and names nothing from it.
+import { Badge } from '@datum-cloud/datum-ui/badge';
import { Button } from '@datum-cloud/datum-ui/button';
import { X } from 'lucide-react';
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@datum-cloud/datum-ui/table';
@@ -281,8 +282,8 @@ export function RackSummary({ rack, inventory }: { rack: PhysicalRecord; invento
return
{!facility ? 'Facility not recorded' : inventory.issues?.Facility ? 'Facility unavailable' : facilityRecord ? {displayLabel(facilityRecord)} : 'Facility record not found'}
{rack.spec.heightUnits === undefined ? 'Height not recorded' : `${rack.spec.heightUnits}U`}
- {overlaps > 0 && ! {overlaps} placements disagree}
- {unpositioned > 0 && ? {unpositioned} without a position}
+ {overlaps > 0 && ! {overlaps} placements disagree }
+ {unpositioned > 0 && ? {unpositioned} without a position }
;
}
diff --git a/ui/provider/src/pages/inventory-create.tsx b/ui/provider/src/pages/inventory-create.tsx
index f92ba23f..440c2dd1 100644
--- a/ui/provider/src/pages/inventory-create.tsx
+++ b/ui/provider/src/pages/inventory-create.tsx
@@ -1,3 +1,4 @@
+import { Spinner } from '@datum-cloud/datum-ui/spinner';
import { Link, useLocation, useNavigate, useParams } from 'react-router';
import { FleetPage } from '../components/fleet-page';
import { InventorySessionBoundary } from '../components/inventory-session-boundary';
@@ -30,7 +31,7 @@ export default function InventoryCreatePage() {
function CreateContent({ kind, back }: { kind: ManagedKind; back: string }) {
const { data, error, isLoading, refetch } = useInventory();
const navigate = useNavigate();
- if (isLoading) return Loading inventory references…
;
+ if (isLoading) return Loading inventory references…
;
if (error) return void refetch()} />;
if (!data) return null;
if (Object.values(data.issues ?? {}).some(issue => issue?.status === 401)) return ;