import type { Profile, Instance } from "../../generated/types"; interface Props { profile: Profile; instance?: Instance; } function MetaBlock({ label, children, }: { label: string; children: React.ReactNode; }) { return (
{label}
{children}
); } export default function ProfileMetaInfoPanel({ profile, instance }: Props) { const accountText = profile.accountEmail || profile.accountName || ""; const sizeText = profile.sizeMB ? `${profile.sizeMB.toFixed(0)} MB` : "—"; const browserType = instance?.attached ? "Attached via CDP" : instance?.headless ? "Headless" : "Headed"; return (
Status {instance?.status || "stopped"}
{instance?.port && (
Port {instance.port}
)}
Browser {browserType}
Size {sizeText}
{accountText && (
Account {accountText}
)} {profile.chromeProfileName && (
Identity {profile.chromeProfileName}
)} {instance?.attached && (
Connection CDP attached
)} {instance?.cdpUrl && (
CDP URL
{instance.cdpUrl}
)} {profile.path && (
Path
{profile.path} {!profile.pathExists && " (not found)"}
)}
); }