+
+ setState((current) => ({ ...current, ...patch }))}
+ activeFilterCount={countActiveIssueFilters(state, true)}
+ agents={storybookAgents.map((agent) => ({ id: agent.id, name: agent.name }))}
+ projects={storybookProjects.map((project) => ({ id: project.id, name: project.name }))}
+ labels={storybookIssueLabels.map((label) => ({ id: label.id, name: label.name, color: label.color }))}
+ currentUserId="user-board"
+ enableRoutineVisibilityFilter
+ buttonVariant="outline"
+ workspaces={storybookExecutionWorkspaces.map((workspace) => ({ id: workspace.id, name: workspace.name }))}
+ creators={[
+ { id: "user:user-board", label: "Riley Board", kind: "user", searchText: "board user human" },
+ ...storybookAgents.map((agent) => ({
+ id: `agent:${agent.id}`,
+ label: agent.name,
+ kind: "agent" as const,
+ searchText: `${agent.name} ${agent.role}`,
+ })),
+ ]}
+ />
+
+
+ );
+}
+
+function RunLedgerWithCostColumns() {
+ return (
+
+
+
+
+ Run
+ Status
+ Duration
+ Cost
+
+ {storybookIssueRuns.map((run) => {
+ const start = run.startedAt ? new Date(run.startedAt).getTime() : null;
+ const end = run.finishedAt ? new Date(run.finishedAt).getTime() : Date.now();
+ const minutes = start ? Math.max(1, Math.round((end - start) / 60_000)) : null;
+ const costCents = typeof run.usageJson?.costCents === "number" ? run.usageJson.costCents : 0;
+ return (
+
+ {run.runId}
+ {run.status}
+ {minutes ? `${minutes}m` : "unknown"}
+ ${(costCents / 100).toFixed(2)}
+
+ );
+ })}
+
+
+ );
+}
+
+function WorkspaceCardWithRuntime() {
+ const service = primaryIssue.currentExecutionWorkspace?.runtimeServices?.[0] ?? null;
+
+ return (
+