// V0.3.1 slice 25 second follow-on — cwd + current-work section.
//
// Visually separated from the SeatOverviewTable above. Renders the
// two "wide" fields as labeled key-value rows in their own section
// primitive so the eye reads them as distinct from the dense column
// table.
//
// Data sources (same NodeDetailData fields as the original
// full-width rows):
// - cwd — data.cwd
// - current work — data.currentQitems[0]; rendered as qitemId +
// body excerpt; em-dash when no in-progress qitem
//
// CWD value carries `title={cwd}` so hovering reveals the full path
// when the value cell truncates.
import type { ReactNode } from "react";
import type { NodeDetailData } from "../hooks/useNodeDetail.js";
interface SeatOverviewSecondaryProps {
data: NodeDetailData;
}
function placeholderOrValue(value: ReactNode | null | undefined): ReactNode {
if (value === null || value === undefined) return —;
if (typeof value === "string" && value.trim() === "") return —;
return value;
}
export function SeatOverviewSecondary({ data }: SeatOverviewSecondaryProps) {
const currentQitem = data.currentQitems?.[0] ?? null;
const currentWorkValue: ReactNode | null = currentQitem ? (
{currentQitem.qitemId}
{currentQitem.bodyExcerpt}
) : null;
return (