Show one seed column when the flow declares a seed input

The run-level seed is that parameter then, so the comparison table drew it
twice and counted it twice in "N of M varied".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013GAeg4Jo6xjZzjwy9QDWMQ
This commit is contained in:
2026-10-05 15:11:01 +02:00
co-authored by Claude Opus 5.5
parent 8e655c842f
commit 190754e398
+8 -4
View File
@@ -724,12 +724,15 @@ function ParamDiff({ rows }: { rows: RunRow[] }) {
const one = rows.every((run) => run.flow === rows[0].flow)
const { declared } = useFlowInputs(one ? rows[0].flow : undefined)
const varying = varyingKeys(rows)
// Not a parameter, but it is part of what produced the number, and in a
// sweep it is often the only thing that moved.
const seedVaries = new Set(rows.map((run) => run.seed ?? null)).size > 1
const keys = new Set<string>()
for (const run of rows)
for (const key of Object.keys(run.params)) keys.add(key)
// Not a parameter, but it is part of what produced the number, and in a
// sweep it is often the only thing that moved. Unless the flow declares a
// `seed` input: the run's seed is then that parameter, already a column.
const seedColumn = !keys.has("seed")
const seedVaries =
seedColumn && new Set(rows.map((run) => run.seed ?? null)).size > 1
const shared = keys.size - varying.length
if (varying.length === 0 && !seedVaries) {
@@ -747,7 +750,8 @@ function ParamDiff({ rows }: { rows: RunRow[] }) {
<div className="flex flex-wrap items-baseline gap-x-3">
<h2 className="font-medium text-sm">What differs</h2>
<p className="text-muted-foreground text-xs">
{varying.length + (seedVaries ? 1 : 0)} of {keys.size + 1} varied
{varying.length + (seedVaries ? 1 : 0)} of{" "}
{keys.size + (seedColumn ? 1 : 0)} varied
{shared > 0
? shared === 1
? "; the other one is the same across all of them"