Polish every product workflow across desktop and mobile
CI / verify (push) Successful in 3m32s

Reframe each screen around the decisions compute brokers make: sellable capacity, full-cost margin, pipeline movement, contract deadlines, evidence review, staged imports, and controlled agent access. Group the shell by operating domain, strengthen mobile navigation and sheets, add responsive record treatments, and make loading, error, empty, readiness, and retry states explicit.

The visual audit exposed sortable table targets and an unnamed file input only after exercising the rendered app, so this commit also pins those accessibility decisions at their actual interaction boundaries. Manrope is self-hosted as a single Latin variable subset to keep the stronger hierarchy without shipping unused font payloads.
This commit is contained in:
2026-08-13 05:34:23 -07:00
parent 1318c0b841
commit e12d27edd1
28 changed files with 672 additions and 522 deletions
+12 -9
View File
@@ -198,7 +198,7 @@ export function AllocationSheet({
resolver: zodResolver(formSchema),
defaultValues: defaults(preferredCommitmentId, defaultGpuHours),
});
const { data: availability, isLoading: availabilityLoading } = useQuery({
const { data: availability, isLoading: availabilityLoading, error: availabilityError } = useQuery({
queryKey: ['availability'],
queryFn: () => get<AvailabilityRow[]>('/api/capacity/availability'),
enabled: open,
@@ -208,7 +208,7 @@ export function AllocationSheet({
queryFn: () => get<CommitmentRow[]>('/api/commitments'),
enabled: open,
});
const { data: demand } = useQuery({
const { data: demand, isLoading: demandLoading, error: demandError } = useQuery({
queryKey: ['/api/deals/demand'],
queryFn: () => get<DemandBoard>('/api/deals/demand'),
enabled: open,
@@ -309,7 +309,7 @@ export function AllocationSheet({
description:
values.kind === 'hold'
? `${hours} GPU-hours reserved. The hold releases automatically when it expires.`
: `${hours} GPU-hours committed. Margin and utilisation have been updated.`,
: `${hours} GPU-hours committed. Margin and sold-capacity reporting have been updated.`,
},
);
},
@@ -344,7 +344,7 @@ export function AllocationSheet({
return (
<Sheet open={open} onOpenChange={onOpenChange}>
<SheetContent className="flex h-full w-full flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl">
<SheetContent className="flex h-full w-full max-w-none flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl">
<SheetHeader className="shrink-0 gap-1 px-5 pb-4 pt-5 text-left sm:px-6">
<SheetTitle>Reserve capacity</SheetTitle>
<SheetDescription>
@@ -358,13 +358,14 @@ export function AllocationSheet({
className="flex min-h-0 flex-1 flex-col"
onSubmit={form.handleSubmit((values) => save.mutate(values))}
>
<div className="flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto px-5 py-5 sm:px-6">
<div className="flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overscroll-contain px-5 py-5 sm:gap-6 sm:px-6">
<div className="grid grid-cols-2 rounded-lg bg-surface-2 p-1" role="group" aria-label="Reservation type">
{(['allocation', 'hold'] as const).map((value) => (
<button
key={value}
type="button"
onClick={() => form.setValue('kind', value)}
aria-pressed={kind === value}
className={
kind === value
? 'tap rounded-md bg-surface px-3 text-sm font-medium text-fg shadow-sm'
@@ -376,6 +377,8 @@ export function AllocationSheet({
))}
</div>
{availabilityError || demandError ? <ServerError message={errorMessage(availabilityError ?? demandError)} /> : null}
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<FormField
control={form.control}
@@ -412,7 +415,7 @@ export function AllocationSheet({
<FormLabel>Demand deal</FormLabel>
<Select value={field.value} onValueChange={field.onChange}>
<FormControl>
<SelectTrigger className="h-11"><SelectValue placeholder="Select the customer deal" /></SelectTrigger>
<SelectTrigger className="h-11"><SelectValue placeholder={demandLoading ? 'Loading customer deals…' : 'Select the customer deal'} /></SelectTrigger>
</FormControl>
<SelectContent>
<SelectGroup>
@@ -496,7 +499,7 @@ export function AllocationSheet({
{allocation.holdExpiresAt ? ` · expires ${shortDate(allocation.holdExpiresAt)}` : ''}
</p>
</div>
<Button type="button" variant="outline" className="shrink-0" disabled={release.isPending} onClick={() => release.mutate(allocation.id)}>
<Button type="button" variant="outline" className="w-full shrink-0 sm:w-auto" disabled={release.isPending} onClick={() => release.mutate(allocation.id)}>
{release.isPending && release.variables === allocation.id ? <LoaderCircle data-icon="inline-start" className="animate-spin" aria-hidden /> : <RotateCcw data-icon="inline-start" aria-hidden />}
Release
</Button>
@@ -543,12 +546,12 @@ function CommitmentContext({ row, detail, match, quotedPrice }: { row: Availabil
<section className="rounded-xl border border-border bg-surface-2 p-4">
<div className="flex flex-wrap items-start justify-between gap-2">
<div className="min-w-0">
<p className="truncate font-semibold">{row.name}</p>
<p className="break-words font-semibold leading-snug">{row.name}</p>
<p className="mt-1 text-xs text-muted">{row.gpuCount}× {row.gpuType} · {row.interconnectType} · {row.securityTier.replace(/_/g, ' ')}</p>
</div>
{match ? <Badge tone={match.score > 0.7 ? 'positive' : 'neutral'}>{percent(match.score)} fit</Badge> : null}
</div>
<div className="mt-4 flex h-2 overflow-hidden rounded-full bg-surface">
<div className="mt-4 flex h-2 overflow-hidden rounded-full bg-surface" role="img" aria-label={`${percent(soldPct)} sold, ${percent(heldPct)} held, ${compactNumber(row.availableGpuHours)} GPU-hours available`}>
<div className="bg-primary" style={{ width: `${Math.min(100, soldPct * 100)}%` }} />
<div className="bg-primary/35" style={{ width: `${Math.min(100 - soldPct * 100, heldPct * 100)}%` }} />
</div>