From b7626738429d3f9738f8d48854fa3f4c76fe2900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Su=C3=A1rez?= Date: Mon, 26 Oct 2026 14:33:08 -0300 Subject: [PATCH 1/3] fix(web): compact-before-send toggle looks like a switch When a Claude thread's context is large and idle, the composer shows a "compact before sending" toggle next to the send arrow. It was styled as a pill button, so it read as a second send action, and people compacted when they meant to send normally. Render it as a caption plus the shared Switch, keeping the same state, tooltip, and composer focus behavior. --- .../chat/ComposerPrimaryActions.tsx | 57 +++++++------------ 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/apps/web/src/components/chat/ComposerPrimaryActions.tsx b/apps/web/src/components/chat/ComposerPrimaryActions.tsx index 51c233807d154..9f2008fc761c1 100644 --- a/apps/web/src/components/chat/ComposerPrimaryActions.tsx +++ b/apps/web/src/components/chat/ComposerPrimaryActions.tsx @@ -1,5 +1,5 @@ import { memo, type MouseEventHandler, type PointerEventHandler } from "react"; -import { CheckIcon, ChevronDownIcon, ChevronLeftIcon, Minimize2Icon, PlayIcon } from "lucide-react"; +import { CheckIcon, ChevronDownIcon, ChevronLeftIcon, PlayIcon } from "lucide-react"; import { CornerUpRight, ListPlus } from "lucide"; import { MorphIcon } from "~/components/MorphIcon"; import { useClientSettings, useEnvironmentIdentificationMode } from "~/hooks/useSettings"; @@ -10,6 +10,7 @@ import { StageBackdropButtonArt, useSidebarStageBackdropVariant } from "../Sideb import { Button } from "../ui/button"; import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu"; import { Spinner } from "../ui/spinner"; +import { Switch } from "../ui/switch"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; import { composerFloatingLayerProps } from "./composerEventScope"; import { @@ -367,48 +368,32 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ } > - -
- {keepFullHistory - ? `Next send keeps all ${compactTokens} tokens.` - : `Next send compacts ${compactTokens} tokens first.`} -
-
{keepFullHistory ? "Click to compact first" : "Click to keep full history"}
+ {keepFullHistory + ? `Next send keeps all ${compactTokens} tokens.` + : `Next send compacts ${compactTokens} tokens first.`}
{submit} From 746bf8bf273ef39517e766d5d9651a4ecb245baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Su=C3=A1rez?= Date: Mon, 26 Oct 2026 15:17:35 -0300 Subject: [PATCH 2/3] docs: describe the idle compaction control as a switch --- docs/user/providers-claude.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/user/providers-claude.md b/docs/user/providers-claude.md index cd9c22c542817..b02db00810a0c 100644 --- a/docs/user/providers-claude.md +++ b/docs/user/providers-claude.md @@ -50,17 +50,16 @@ window. Leave it empty for Claude Code's default. You can also send `/compact` in an existing conversation. Web and desktop offer **Compact context** from the context meter. When you return to a large thread -after Claude's prompt cache expires, a **Compact** chip with the thread's token count shows -next to the send button. While it is on, Enter summarizes the history first, then -sends your message. Click the chip to switch it to **Full** and keep the full -history for that message. The cache lasts about an hour on a Claude +after Claude's prompt cache expires, a **Compact** switch shows next to the send +button. While it is on, Enter summarizes the history first, then sends your +message. Turn it off to keep the full history for that message. The cache lasts about an hour on a Claude subscription and 5 minutes with an API key, Bedrock, or Vertex. See [commands and skills](./composer.md#commands-and-skills) for using composer commands. **Compact idle threads** in **Settings > General** controls this for threads over 200,000 tokens. Each Claude provider's settings can override it: -- **When you return** shows the **Compact** chip described above. This is the default. +- **When you return** shows the **Compact** switch described above. This is the default. - **Before the cache expires (beta)** compacts an idle thread shortly before its prompt cache expires, so coming back does not reprocess the whole conversation. The compaction appears in the thread as a `/compact` turn sent by T3 Code. From 1a2709af082945476a385f83aefa20f99a561ab1 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Fri, 30 Oct 2026 02:16:29 +0000 Subject: [PATCH 3/3] fix(web): keep compact token count visible on touch screens --- apps/web/src/components/chat/ComposerPrimaryActions.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/src/components/chat/ComposerPrimaryActions.tsx b/apps/web/src/components/chat/ComposerPrimaryActions.tsx index 20e2c8df749cb..d0c5b34bceb9f 100644 --- a/apps/web/src/components/chat/ComposerPrimaryActions.tsx +++ b/apps/web/src/components/chat/ComposerPrimaryActions.tsx @@ -364,6 +364,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ } > Compact + {compactTokens} {/* A label would focus the hidden input and steal focus from the composer. */}