From a25776f2404e5c45e65386f8dd7140ed6a62b447 Mon Sep 17 00:00:00 2001 From: Elias <69803556+elias1218@users.noreply.github.com> Date: Sun, 13 Sep 2026 20:42:59 -0400 Subject: [PATCH] fix(web): keep the bolt when fast mode is the only trait --- apps/web/src/components/chat/TraitsPicker.test.ts | 6 +++--- apps/web/src/components/chat/TraitsPicker.tsx | 10 +--------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/apps/web/src/components/chat/TraitsPicker.test.ts b/apps/web/src/components/chat/TraitsPicker.test.ts index dbe97cdd54e0..2e1d42a6f6c3 100644 --- a/apps/web/src/components/chat/TraitsPicker.test.ts +++ b/apps/web/src/components/chat/TraitsPicker.test.ts @@ -100,7 +100,7 @@ describe("buildTraitsTriggerDisplay", () => { }); expect(display([serviceTierDescriptor("priority")])).toEqual({ label: "Fast", - showFastModeIcon: false, + showFastModeIcon: true, }); }); @@ -117,10 +117,10 @@ describe("buildTraitsTriggerDisplay", () => { }); }); - it("falls back to a text label when fast mode is the only trait", () => { + it("keeps the bolt alongside the text label when fast mode is the only trait", () => { expect(display([fastModeDescriptor(true)])).toEqual({ label: "Fast", - showFastModeIcon: false, + showFastModeIcon: true, }); expect(display([fastModeDescriptor(false)])).toEqual({ label: "Normal", diff --git a/apps/web/src/components/chat/TraitsPicker.tsx b/apps/web/src/components/chat/TraitsPicker.tsx index 47ce59efde52..04e3d307a2f6 100644 --- a/apps/web/src/components/chat/TraitsPicker.tsx +++ b/apps/web/src/components/chat/TraitsPicker.tsx @@ -478,14 +478,6 @@ export const TraitsMenuContent = memo(function TraitsMenuContentImpl({ ); }); -/** - * Build the traits trigger's text label plus whether the fast-mode bolt should - * render. Claude and Cursor expose fast mode as a boolean, while Codex exposes - * it through the Standard/Fast service tiers. In either form, fast mode is a - * lightning bolt when on and nothing at all when off. The one exception is when - * fast mode is the only trait, where a bare bolt (or bare chevron) would leave - * the trigger unreadable. - */ export function buildTraitsTriggerDisplay(input: { provider: ProviderDriverKind; descriptors: ReadonlyArray; @@ -531,7 +523,7 @@ export function buildTraitsTriggerDisplay(input: { // off an empty label list alone would also catch descriptors that resolved to // no label at all, printing a bogus "Normal" for a model without fast mode. if (labels.length === 0 && fastModeFallbackLabel !== null) { - return { label: fastModeFallbackLabel, showFastModeIcon: false }; + return { label: fastModeFallbackLabel, showFastModeIcon: fastModeEnabled }; } return { label: labels.join(" ยท "), showFastModeIcon: fastModeEnabled }; }