import { num, timeAgo } from "../lib/format"; type Intent = { id: number; ts: string; strategy: string; symbol: string; side: string; qty: number; order_type: string; limit_price: number | null; trail_percent: number | null; details_json: string; submitted: number; alpaca_order_id: string | null; status: string | null; }; function statusTone(status: string | null, submitted: number): string { if (status === "blocked") return "text-down"; if (status === "error") return "text-down"; if (submitted) return "text-up"; if (status === "dry_run") return "text-mute"; return "text-warn"; } export function IntentsTable({ intents }: { intents: Intent[] }) { if (!intents.length) return (
alpaclaudia tick.
| When | Strategy | Symbol | Side | Type | Qty | Outcome | Rationale |
|---|---|---|---|---|---|---|---|
| {timeAgo(i.ts)} | {i.strategy} | {i.symbol} | {i.side} | {i.order_type} | {num(i.qty, 0)} | {i.status || (i.submitted ? "submitted" : "pending")} |
{rationale}
{blockedReason && (
blocked: {blockedReason}
)}
|