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}`,
})),
]}
/>
);
}
const modelProfileLedgerRuns: RunForIssue[] = [
{
runId: "run-cheap-applied",
status: "succeeded",
agentId: "agent-codex",
adapterType: "codex_local",
startedAt: "2026-04-29T09:30:00.000Z",
finishedAt: "2026-04-29T09:32:14.000Z",
createdAt: "2026-04-29T09:29:55.000Z",
invocationSource: "manual",
usageJson: { costCents: 17, inputTokens: 6400, outputTokens: 480 },
resultJson: {
stopReason: "completed",
modelProfile: {
requested: "cheap",
applied: "cheap",
configSource: "agent_runtime_config",
},
},
livenessState: "advanced",
livenessReason: "Cheap-lane summary completed inside the planned scope.",
continuationAttempt: 0,
lastUsefulActionAt: "2026-04-29T09:32:10.000Z",
nextAction: "Hand the routine output back to the operator inbox.",
},
{
runId: "run-cheap-fallback",
status: "succeeded",
agentId: "agent-codex",
adapterType: "codex_local",
startedAt: "2026-04-29T08:10:00.000Z",
finishedAt: "2026-04-29T08:14:42.000Z",
createdAt: "2026-04-29T08:09:50.000Z",
invocationSource: "manual",
usageJson: { costCents: 91, inputTokens: 21800, outputTokens: 3200 },
resultJson: {
stopReason: "completed",
modelProfile: {
requested: "cheap",
applied: "primary",
configSource: "adapter_default",
fallbackReason: "Cheap profile not configured for this agent",
},
},
livenessState: "advanced",
livenessReason: "Routine fell back to the primary model after the cheap lookup missed.",
continuationAttempt: 0,
lastUsefulActionAt: "2026-04-29T08:14:36.000Z",
nextAction: "Configure agent-codex with a cheap profile to avoid the fallback.",
},
{
runId: "run-baseline",
status: "succeeded",
agentId: "agent-codex",
adapterType: "codex_local",
startedAt: "2026-04-28T18:05:00.000Z",
finishedAt: "2026-04-28T18:14:11.000Z",
createdAt: "2026-04-28T18:04:50.000Z",
invocationSource: "scheduler",
usageJson: { costCents: 142, inputTokens: 38400, outputTokens: 7200 },
resultJson: { stopReason: "completed" },
livenessState: "advanced",
livenessReason: "Standard primary-lane run with no profile metadata recorded.",
continuationAttempt: 0,
lastUsefulActionAt: "2026-04-28T18:13:58.000Z",
nextAction: "Continue with the next planned subtask.",
},
];
function ModelProfileBadgeLedger() {
return (