From 74f381da6a615ae159d2c60b5cc73302d8262b9c Mon Sep 17 00:00:00 2001 From: Michael Buluma <1452922+buluma@users.noreply.github.com> Date: Wed, 2 Sep 2026 06:43:49 +0300 Subject: [PATCH 1/3] feat(web): rotate a whimsical verb on the composer stop button Accessible-only for now: the stop-generation button is a fixed-size icon-only circle, so the rotating verb (Pondering, Noodling, ...) only reaches aria-label/title, not a visible label. --- .../chat/ComposerPrimaryActions.tsx | 8 ++++- apps/web/src/hooks/useSpinnerVerb.ts | 30 +++++++++++++++++ apps/web/src/lib/spinnerVerbs.test.ts | 19 +++++++++++ apps/web/src/lib/spinnerVerbs.ts | 32 +++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 apps/web/src/hooks/useSpinnerVerb.ts create mode 100644 apps/web/src/lib/spinnerVerbs.test.ts create mode 100644 apps/web/src/lib/spinnerVerbs.ts diff --git a/apps/web/src/components/chat/ComposerPrimaryActions.tsx b/apps/web/src/components/chat/ComposerPrimaryActions.tsx index d8626496..fc3ec47d 100644 --- a/apps/web/src/components/chat/ComposerPrimaryActions.tsx +++ b/apps/web/src/components/chat/ComposerPrimaryActions.tsx @@ -2,6 +2,7 @@ import { memo, type PointerEventHandler } from "react"; import { ChevronDownIcon, ChevronLeftIcon } from "lucide-react"; import { useEnvironmentIdentificationMode } from "~/hooks/useSettings"; import { cn } from "~/lib/utils"; +import { useSpinnerVerb } from "~/hooks/useSpinnerVerb"; import { StageBackdropButtonArt, useSidebarStageBackdropVariant } from "../SidebarStageBackdrop"; import { Button } from "../ui/button"; import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu"; @@ -80,6 +81,10 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ const stageBackdropVariant = useSidebarStageBackdropVariant( environmentIdentificationMode === "artwork", ); + // Accessible-only flavor text (aria-label/title), not a visible label: the + // stop button is a fixed-size icon-only circle with no room to grow. + const spinnerVerb = useSpinnerVerb(isRunning); + const stopGenerationLabel = spinnerVerb ? `Stop ${spinnerVerb.toLowerCase()}` : "Stop generation"; const renderStopGenerationButton = (insidePendingAction: boolean) => (