From ecb1ee1e0721d05e815c8b33f96a2fc87e88449d Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Sun, 26 Jul 2026 16:00:16 +0200 Subject: [PATCH] refactor: drop the steer and queue toggle copy --- .../components/Chat/Input/Composer/Chip.tsx | 20 +++-------------- .../components/Chat/Input/Composer/Tray.tsx | 1 - .../Input/Composer/__tests__/Tray.spec.tsx | 19 +++++++--------- .../components/Chat/Messages/MessagesView.tsx | 19 +--------------- client/src/locales/en/translation.json | 8 +++---- client/src/store/index.ts | 1 - client/src/store/steer.ts | 22 ------------------- 7 files changed, 15 insertions(+), 75 deletions(-) delete mode 100644 client/src/store/steer.ts diff --git a/client/src/components/Chat/Input/Composer/Chip.tsx b/client/src/components/Chat/Input/Composer/Chip.tsx index c1a6d8e36f..98fbed5aaa 100644 --- a/client/src/components/Chat/Input/Composer/Chip.tsx +++ b/client/src/components/Chat/Input/Composer/Chip.tsx @@ -8,14 +8,12 @@ import { cn } from '~/utils'; * identical across kinds — only the leading icon carries the accent — so the * tray reads as one list rather than four stacked systems. */ -export type ChipTone = 'file' | 'quote' | 'skill' | 'queued' | 'failed' | 'tool'; +export type ChipTone = 'file' | 'quote' | 'skill' | 'tool'; const TONE_ICON: Record = { file: 'text-text-secondary', quote: 'text-cyan-500', skill: 'text-purple-500', - queued: 'text-cyan-500', - failed: 'text-red-500', /** Tools carry their own accent; this is only the fallback (MCP servers, * whose icons are their own branding and shouldn't be tinted). */ tool: 'text-text-primary', @@ -35,9 +33,6 @@ export interface ChipProps { iconClassName?: string; /** Square preview rendered in place of `icon`, used by image attachments. */ thumbnail?: ReactNode; - /** Stretches the chip to fill the tray width, for queued and failed rows - * whose actions do not fit an inline pill. */ - block?: boolean; /** Rendered between the label and the remove button. */ trailing?: ReactNode; onRemove?: () => void; @@ -53,7 +48,6 @@ function Chip({ icon, iconClassName, thumbnail, - block = false, trailing, onRemove, removeLabel, @@ -65,12 +59,7 @@ function Chip({ role="listitem" data-testid={testId} data-tone={tone} - className={cn( - BASE_CLASS, - block ? 'flex w-full px-3 py-2' : 'max-w-full px-2.5 py-1', - tone === 'failed' ? 'border-red-500/60' : 'border-border-light', - className, - )} + className={cn(BASE_CLASS, 'max-w-full border-border-light px-2.5 py-1', className)} > {thumbnail ?? ( )} - + {label} {trailing} diff --git a/client/src/components/Chat/Input/Composer/Tray.tsx b/client/src/components/Chat/Input/Composer/Tray.tsx index c2c04b9c7e..61238f07a1 100644 --- a/client/src/components/Chat/Input/Composer/Tray.tsx +++ b/client/src/components/Chat/Input/Composer/Tray.tsx @@ -68,7 +68,6 @@ function Tray({ items, conversation, files, setFiles, setFilesLoading, isRTL }: return (
= {}): ComposerItem => ({ function renderTray(items: ComposerItem[], files: Map = new Map()) { return render( - - - , + , ); } diff --git a/client/src/components/Chat/Messages/MessagesView.tsx b/client/src/components/Chat/Messages/MessagesView.tsx index 671ca71d81..477bd14752 100644 --- a/client/src/components/Chat/Messages/MessagesView.tsx +++ b/client/src/components/Chat/Messages/MessagesView.tsx @@ -1,12 +1,10 @@ import { memo, useState, useRef, useEffect } from 'react'; import { useAtomValue } from 'jotai'; import { useRecoilValue } from 'recoil'; -import { Constants } from 'librechat-data-provider'; import { CSSTransition } from 'react-transition-group'; import type { TMessage } from 'librechat-data-provider'; import { useScreenshot, useMessageScrolling, useLocalize } from '~/hooks'; import ScrollToBottom from '~/components/Messages/ScrollToBottom'; -import { steerOverlayHeightFamily } from '~/store/steer'; import { MessagesViewProvider } from '~/Providers'; import { fontSizeAtom } from '~/store/fontSize'; import MultiMessage from './MultiMessage'; @@ -102,13 +100,6 @@ function MessagesViewContent({ const { conversationId } = conversation ?? {}; - /** The in-flight steer overlay floats above the composer over the bottom of - * the thread (see `InFlightSteers`); reserve an equal band here so the - * newest message rests above it and older ones scroll behind. */ - const steerOverlayHeight = useAtomValue( - steerOverlayHeightFamily(conversationId ?? Constants.NEW_CONVO), - ); - return ( <>
@@ -123,15 +114,7 @@ function MessagesViewContent({ width: '100%', }} > -
0 - ? { paddingBottom: `calc(2.25rem + ${steerOverlayHeight}px)` } - : undefined - } - > +
{(_messagesTree && _messagesTree.length == 0) || _messagesTree === null ? (
atom(0)); - -/** - * Set synchronously before a bubble's arm request and cleared on settlement. - * Purely a UX gate: with the atomic in-place arm, a double-arm is harmless - * server-side (the run seals once and drains the whole queue in order), but - * every escalation control advertises "one interrupt at a time" by disabling, - * and the chip-derived check cannot see an arm until its response lands. - */ -export const escalatingSteerFamily = atomFamily((_conversationId: string) => atom(false));