From 2fb47b7c6d94856f462afeafa5edbc5b95188068 Mon Sep 17 00:00:00 2001 From: Elias <69803556+elias1218@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:02:31 -0500 Subject: [PATCH] fix(web): Default effort no longer shows as the lowest bar Claude models reported by Claude Code offer a Default effort choice that sends no effort. The bar glyph counted it as the lowest level, so Default looked like Low and every real level sat one bar too high. Default is now named in the trigger, like Max, and the other levels use the usual scale. --- apps/web/src/components/chat/EffortGlyph.test.ts | 5 ++++- apps/web/src/components/chat/EffortGlyph.tsx | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/chat/EffortGlyph.test.ts b/apps/web/src/components/chat/EffortGlyph.test.ts index 0b73e89e4f833..1c893050e0d41 100644 --- a/apps/web/src/components/chat/EffortGlyph.test.ts +++ b/apps/web/src/components/chat/EffortGlyph.test.ts @@ -25,8 +25,11 @@ describe("resolveEffortGlyph", () => { }); }); - it("names max instead of drawing it", () => { + it("names Max and Default instead of drawing them", () => { expect(resolveEffortGlyph(claude, "max")?.special).toBe("Max"); + const reported = descriptor(["default", "low", "medium", "high", "xhigh", "max"]); + expect(resolveEffortGlyph(reported, "default")?.special).toBe("Default"); + expect(resolveEffortGlyph(reported, "low")).toMatchObject({ count: 4, filled: 1 }); }); it("names Ultracode and Ultrathink instead of drawing a level", () => { diff --git a/apps/web/src/components/chat/EffortGlyph.tsx b/apps/web/src/components/chat/EffortGlyph.tsx index ae90228b8da1b..8220a2b27272c 100644 --- a/apps/web/src/components/chat/EffortGlyph.tsx +++ b/apps/web/src/components/chat/EffortGlyph.tsx @@ -11,15 +11,15 @@ const BASELINE_INSET = 2; type SelectDescriptor = Extract; // Older servers offer Ultracode as a level. It changes the workflow, so it keeps its name. -// Max is named too, so the full scale stops short of it. -const NAMED_LEVELS = new Set(["ultracode", "max"]); +// Max is named too, so the full scale stops short of it. Default leaves the level to the agent. +const NAMED_LEVELS = new Set(["ultracode", "max", "default"]); const OFF_LEVELS = new Set(["off", "none"]); // More bars than this no longer fit the glyph's height in whole pixels. const MAX_BARS = 7; /** * Maps a reasoning select to bars: one per ordinary level, filled up to the current one, with an - * off level as none filled. Max, prompt-injected and workflow levels are named instead of drawn. + * off level as none filled. Max, Default, prompt-injected and workflow levels are named instead. */ export function resolveEffortGlyph(descriptor: SelectDescriptor, current: string | null) { const special = new Set([...(descriptor.promptInjectedValues ?? []), ...NAMED_LEVELS]);