Skip to content

Commit 6d78973

Browse files
committed
Drop "Default" option from effort dropdown
The dropdown now lists only the model's actual levels and pre-selects the model's default via the value attribute. onChange always patches a real Effort (no more null path for opus/sonnet). For legacy session.json files that were written before the effort field existed (so it hydrated as null), runManager falls back to the model's default at spawn time so the run never goes out without an effort the UI showed as selected. https://claude.ai/code/session_015mACScqpz9U8NmhpDorPhA
1 parent e6f2292 commit 6d78973

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/server/runManager.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type { RunConfig, TranscriptFile } from '@shared/schemas/run.js';
1313
import type { NormalizedEvent, ServerSseEvent } from '@shared/schemas/events.js';
1414
import type { Mode, RunStatus } from '@shared/schemas/types.js';
1515
import type { ColumnConfig } from '@shared/schemas/session.js';
16+
import { defaultEffortForModel } from '@shared/constants.js';
1617

1718
const SEQ_FILE = '.seq';
1819
const RING_BUFFER_LIMIT = 2_000;
@@ -316,7 +317,10 @@ export class RunManager extends EventEmitter {
316317
promptSha256: sha256(col.prompt),
317318
prompt: col.prompt,
318319
model: col.model,
319-
effort: col.effort ?? null,
320+
// Fall back to the model's default effort for legacy session.json files
321+
// (written before this field existed) so a Run never goes out without
322+
// an effort the UI showed as selected.
323+
effort: col.effort ?? defaultEffortForModel(col.model),
320324
mode: sessionSnap.mode,
321325
status: 'preparing',
322326
startedAt: new Date().toISOString(),
@@ -338,7 +342,7 @@ export class RunManager extends EventEmitter {
338342
outputsDir: sandbox.outputsDir,
339343
prompt: col.prompt,
340344
model: col.model,
341-
effort: col.effort ?? null,
345+
effort: col.effort ?? defaultEffortForModel(col.model),
342346
mode: sessionSnap.mode as Mode,
343347
initialConfig,
344348
});

src/web/components/VariantColumn.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,14 @@ export function VariantColumn(props: {
147147
{effortLevelsForModel(column.model).length > 0 && (
148148
<Hint content="Reasoning effort for the variant run">
149149
<select
150-
value={column.effort ?? ''}
150+
value={column.effort ?? (defaultEffortForModel(column.model) as Effort)}
151151
disabled={isLocked}
152152
onChange={(e) => {
153-
const v = e.target.value;
154153
void props.onPatchColumn(column.id, {
155-
effort: v === '' ? null : (v as Effort),
154+
effort: e.target.value as Effort,
156155
});
157156
}}
158157
>
159-
<option value="">Default</option>
160158
{effortLevelsForModel(column.model).map((x) => (
161159
<option key={x} value={x}>
162160
{EFFORT_LABELS[x]}

0 commit comments

Comments
 (0)