Skip to content

Commit 3d40be3

Browse files
authored
Merge pull request #31 from Multiplier-Labs/fix/workflow-model-display
Add model label badge to workflow list rows
2 parents 65711f4 + 7b41120 commit 3d40be3

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
77
<title>Codekin</title>
8-
<script type="module" crossorigin src="/assets/index-DPudnR8n.js"></script>
8+
<script type="module" crossorigin src="/assets/index-DpGwZSiY.js"></script>
99
<link rel="stylesheet" crossorigin href="/assets/index-dNFIrKVU.css">
1010
</head>
1111
<body class="bg-neutral-12 text-neutral-2">

src/components/workflows/WorkflowRow.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
IconPencil, IconTrash,
99
} from '@tabler/icons-react'
1010
import type { WorkflowRun, WorkflowRunWithSteps, CronSchedule, ReviewRepoConfig } from '../../lib/workflowApi'
11-
import { kindLabel, describeCron } from '../../lib/workflowHelpers'
11+
import { kindLabel, describeCron, modelLabel } from '../../lib/workflowHelpers'
1212
import { StatusBadge } from '../WorkflowBadges'
1313
import { HealthDot } from './HealthDot'
1414
import { MiniRunRow } from './MiniRunRow'
@@ -64,6 +64,11 @@ export function WorkflowRow({
6464
<span className="text-[14px] text-neutral-5 whitespace-nowrap shrink-0">
6565
{schedule ? describeCron(schedule.cronExpression) : describeCron(repo.cronExpression)}
6666
</span>
67+
{modelLabel(repo.model) && (
68+
<span className="text-[12px] text-neutral-5 bg-neutral-9 rounded px-1.5 py-0.5 shrink-0">
69+
{modelLabel(repo.model)}
70+
</span>
71+
)}
6772
{lastRun && (
6873
<>
6974
<StatusBadge status={lastRun.status} />

src/lib/workflowHelpers.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ export function describeCron(expr: string): string {
109109
return `Weekly ${dayName} at ${time}`
110110
}
111111

112+
/** Look up the display label for a model value, e.g. `"claude-sonnet-4-6"` → `"Sonnet 4.6"`. Returns `null` for empty/default. */
113+
export function modelLabel(model: string | undefined): string | null {
114+
if (!model) return null
115+
return MODEL_OPTIONS.find(m => m.value === model)?.label ?? model
116+
}
117+
112118
/** Look up the display label for a workflow kind, e.g. `"coverage.daily"` → `"Coverage Assessment"`. */
113119
export function kindLabel(kind: string): string {
114120
return WORKFLOW_KINDS.find(k => k.value === kind)?.label ?? kind

0 commit comments

Comments
 (0)