Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/src/components/ConsolePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export function ConsolePanel({
}: {
url: string | null;
title?: string;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
follow?: boolean;
downloadName?: string;
}) {
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export function CopyButton({
value: string;
label?: string;
copiedLabel?: string;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
iconOnly?: boolean;
/** Prefer quiet static color on dark console chrome */
dark?: boolean;
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/ExecTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ export function ExecTerminal({
}: {
/** Base WebSocket URL; `shell` query is appended. */
wsUrl: string;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
title?: string;
}) {
const hostRef = useRef<HTMLDivElement>(null);
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/GlassSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ export function TerminalBlock({
copyValue,
}: {
children: ReactNode;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
copyValue?: string;
}) {
const text = copyValue ?? (typeof children === "string" ? children : "");
Expand Down
21 changes: 9 additions & 12 deletions app/src/components/GpuPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Content,
Heading,
IllustratedMessage,
ProgressCircle,
Text,
Tooltip,
TooltipTrigger,
Expand All @@ -13,7 +14,7 @@ import { style } from "@react-spectrum/s2/style" with { type: "macro" };
import CloudStateError from "@react-spectrum/s2/illustrations/linear/CloudStateError";
import { api, type GPUStatus } from "@/lib/api";
import { HelpHint } from "@/components/HelpHint";
import { MetricCard, RingGauge, WaveBars } from "@/components/charts/MetricChart";
import { RingGauge } from "@/components/charts/MetricChart";

export function GpuPanel() {
const gpus = useQuery({ queryKey: ["gpus"], queryFn: api.gpus, refetchInterval: 4000 });
Expand All @@ -32,7 +33,7 @@ export function GpuPanel() {
textAlign: "center",
})}
>
<WaveBars values={[0.25, 0.5, 0.35, 0.7, 0.45, 0.6, 0.8, 0.4, 0.55, 0.65]} max={1} />
<ProgressCircle aria-label="Probing GPUs" isIndeterminate size="M" />
<Text styles={style({ font: "body-sm", color: "neutral-subdued" })}>Probing GPUs…</Text>
</div>
);
Expand Down Expand Up @@ -155,17 +156,13 @@ export function GpuPanel() {
<div>
<RingGauge value={d.utilization} label="GPU util" sub={`${d.utilization}% compute`} />
</div>
<MetricCard
flat
label="VRAM"
value={`${memPct.toFixed(0)}%`}
hint={`${d.memoryUsedMiB} / ${d.memoryTotalMiB} MiB`}
>
<WaveBars
values={[memPct * 0.7, memPct * 0.85, memPct, memPct * 0.9, memPct * 0.75, memPct]}
max={100}
<div>
<RingGauge
value={memPct}
label="VRAM"
sub={`${d.memoryUsedMiB} / ${d.memoryTotalMiB} MiB`}
/>
</MetricCard>
</div>
</div>
</div>
);
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/HelpHint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export function HelpHint({
/** Optional popover title; omit for tip-only content. */
title?: string;
side?: "top" | "right" | "bottom" | "left";
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
}) {
return (
<ContextualHelp variant="info" placement={placementMap[side]} size="XS">
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/InspectFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ export function InspectFields({
rows,
}: {
rows: { label: string; value?: ReactNode; copy?: string; mono?: boolean }[];
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
}) {
const visible = rows.filter((r) => r.value != null && r.value !== "");
if (!visible.length) return null;
Expand Down
38 changes: 23 additions & 15 deletions app/src/components/ListPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,30 @@ export function ListSkeleton({ rows = 6 }: { rows?: number }) {
borderRadius: "lg",
paddingX: 12,
paddingY: 12,
display: "flex",
flexDirection: "column",
gap: 8,
})}
style={{ opacity: 1 - i * 0.1 }}
>
<Text styles={style({ font: "ui", display: "block", marginBottom: 8 })}>
Loading item title placeholder
</Text>
<Text styles={style({ font: "body-xs", display: "block" })}>
Secondary loading detail line
</Text>
<div
className={style({
height: 14,
width: "full",
maxWidth: 200,
borderRadius: "sm",
backgroundColor: "gray-200",
})}
/>
<div
className={style({
height: 10,
width: "full",
maxWidth: 140,
borderRadius: "sm",
backgroundColor: "gray-200",
})}
/>
</div>
))}
</Skeleton>
Expand Down Expand Up @@ -245,21 +260,16 @@ export function ListEmpty({

export function ListPaneScroll({
className,
contentClassName,
style: inlineStyle,
children,
empty,
loading,
}: {
className?: string;
/** @deprecated Unused — header is no longer absolutely positioned. */
contentClassName?: string;
style?: CSSProperties;
children: ReactNode;
empty?: ReactNode;
loading?: boolean;
/** @deprecated Unused — header is no longer absolutely positioned. */
hasSearch?: boolean;
}) {
const hasItems = Array.isArray(children)
? children.length > 0
Expand Down Expand Up @@ -342,7 +352,7 @@ export function ListPane({
/>
) : null}
</ListPaneHeader>
<ListPaneScroll hasSearch={!!search} empty={empty} loading={loading}>
<ListPaneScroll empty={empty} loading={loading}>
{children}
</ListPaneScroll>
</ListPaneRoot>
Expand Down Expand Up @@ -388,11 +398,10 @@ export const ListItem = forwardRef<
{
active?: boolean;
onClick?: () => void;
onContextMenu?: (e: React.MouseEvent) => void;
children: React.ReactNode;
className?: string;
}
>(function ListItem({ active, onClick, onContextMenu, children, className }, ref) {
>(function ListItem({ active, onClick, children, className }, ref) {
return (
<div
ref={ref}
Expand All @@ -406,7 +415,6 @@ export const ListItem = forwardRef<
onClick();
}
}}
onContextMenu={onContextMenu}
className={[
"dh-list-item",
active ? "dh-list-item-selected" : null,
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/SettingRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ export function SettingRow({
* When `action` is omitted: treated as the right-aligned control (legacy Deckhand).
*/
children?: ReactNode;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
}) {
const heading = title || label || "";
const right = action !== undefined ? action : children;
Expand Down
37 changes: 12 additions & 25 deletions app/src/components/StatusDock.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useRef, useState, type ReactNode } from "react";
import { useEffect, useRef, useState } from "react";
import { useNavigate } from "@tanstack/react-router";
import { useQuery } from "@tanstack/react-query";
import { AnimatePresence, motion, useReducedMotion } from "framer-motion";
import { Button, Text, Tooltip, TooltipTrigger } from "@react-spectrum/s2";
import { Button, Text } from "@react-spectrum/s2";
import { style } from "@react-spectrum/s2/style" with { type: "macro" };
import { api, subscribeDockerEvents } from "@/lib/api";
import {
Expand All @@ -13,27 +13,13 @@ import {
import { GlassSheet } from "@/components/GlassSheet";
import { LogoMark } from "@/components/Logo";
import { StatusBadge } from "@/components/spectrum/StatusBadge";
import { Tip } from "@/components/spectrum/Tip";
import { StatusHalo } from "@/components/StatusHalo";
import { useUIStore } from "@/stores/uiStore";

const easeOutExpo = [0.16, 1, 0.3, 1] as const;
const MAX_EVENTS = 40;

function TipTop({
label,
children,
}: {
label: ReactNode;
children: ReactNode;
}) {
return (
<TooltipTrigger placement="top" delay={400}>
{children}
<Tooltip>{label}</Tooltip>
</TooltipTrigger>
);
}

const chipBtn = style({
display: "inline-flex",
alignItems: "center",
Expand Down Expand Up @@ -82,7 +68,7 @@ function RuntimeChip({
const tone = ok ? "ok" : warn ? "idle" : "error";

return (
<TipTop label={tip}>
<Tip label={tip} placement="top">
<button type="button" className={`dh-chip ${chipBtn}`} onClick={onClick}>
<StatusHalo tone={tone} pulse={ok} size="sm" />
<Text styles={style({ font: "ui-sm" })}>{label}</Text>
Expand All @@ -97,7 +83,7 @@ function RuntimeChip({
</Text>
) : null}
</button>
</TipTop>
</Tip>
);
}

Expand Down Expand Up @@ -197,7 +183,7 @@ export function StatusDock() {
minWidth: 0,
})}
>
<TipTop label="Local-first Docker & Kubernetes desktop">
<Tip label="Local-first Docker & Kubernetes desktop" placement="top">
<button
type="button"
className={`dh-chip ${chipBtn}`}
Expand All @@ -209,7 +195,7 @@ export function StatusDock() {
<LogoMark size={22} />
<Text styles={style({ font: "title-sm" })}>Deckhand</Text>
</button>
</TipTop>
</Tip>
<RuntimeChip
label="Docker"
ok={dockerOk && !statusDown}
Expand Down Expand Up @@ -258,7 +244,7 @@ export function StatusDock() {
})}
>
{latest ? (
<TipTop label="Open activity — recent engine events with detail">
<Tip label="Open activity — recent engine events with detail" placement="top">
<button
type="button"
className={`dh-chip ${eventChipBtn}`}
Expand Down Expand Up @@ -349,14 +335,15 @@ export function StatusDock() {
</span>
</div>
</button>
</TipTop>
</Tip>
) : (
<TipTop
<Tip
label={
dockerOk
? "Container start/stop and image activity will show here"
: "Connect Docker to stream engine activity here"
}
placement="top"
>
<button
type="button"
Expand All @@ -374,7 +361,7 @@ export function StatusDock() {
{dockerOk ? "No activity" : "local-first"}
</Text>
</button>
</TipTop>
</Tip>
)}
</div>
</div>
Expand Down
23 changes: 10 additions & 13 deletions app/src/components/charts/MetricChart.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { motion } from "framer-motion";
import { motion, useReducedMotion } from "framer-motion";
import { useId, useMemo } from "react";
import { Text } from "@react-spectrum/s2";
import { style } from "@react-spectrum/s2/style" with { type: "macro" };
Expand All @@ -12,13 +12,11 @@ export function WaveBars({
}: {
values: number[];
max?: number;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
/** @deprecated Unused — Spectrum tokens drive color. */
color?: string;
}) {
const reduceMotion = useReducedMotion();
const peak = Math.max(max ?? 0, ...values, 1);
const pads = values.length ? values : Array.from({ length: 24 }, () => 0);
const duration = reduceMotion ? 0 : 0.35;

return (
<div
Expand All @@ -45,7 +43,11 @@ export function WaveBars({
height: `${Math.max(8, (v / peak) * 100)}%`,
opacity: 0.35 + (i / Math.max(pads.length, 1)) * 0.65,
}}
transition={{ duration: 0.35, ease, delay: Math.min(i * 0.008, 0.12) }}
transition={{
duration,
ease,
delay: reduceMotion ? 0 : Math.min(i * 0.008, 0.12),
}}
/>
))}
</div>
Expand All @@ -59,8 +61,6 @@ export function AreaChart({
}: {
values: number[];
max?: number;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
stroke?: string;
fill?: string;
}) {
Expand Down Expand Up @@ -126,9 +126,8 @@ export function RingGauge({
max?: number;
label: string;
sub?: string;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
}) {
const reduceMotion = useReducedMotion();
const pct = Math.min(100, Math.max(0, (value / max) * 100));
const r = 34;
const c = 2 * Math.PI * r;
Expand All @@ -148,7 +147,7 @@ export function RingGauge({
strokeLinecap="round"
strokeDasharray={c}
animate={{ strokeDashoffset: offset }}
transition={{ duration: 0.45, ease }}
transition={{ duration: reduceMotion ? 0 : 0.45, ease }}
/>
</svg>
<div>
Expand Down Expand Up @@ -186,8 +185,6 @@ export function MetricCard({
children?: React.ReactNode;
/** Skip raised fill when nested inside another layer surface. */
flat?: boolean;
/** @deprecated Unused — kept for call-site compatibility. */
className?: string;
}) {
return (
<div
Expand Down
Loading
Loading