Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🥞 fix: Keep Tool Glyphs Behind Approval Reviews (#16307)
lia-by-librechat[bot]0829709d4e5a
diff --git a/client/src/components/Chat/ChatView.tsx b/client/src/components/Chat/ChatView.tsxindex a7bd0361f1..ef6949da36 100644--- a/client/src/components/Chat/ChatView.tsx+++ b/client/src/components/Chat/ChatView.tsx@@ -192,10 +192,12 @@ function ChatView({ index = 0, project }: { index?: number; project?: TChatProjepopover ⇄ chat-card morph) paints the whole composer bandover the travelling card instead of letting it showthrough below the composer. The background matches the- page, so normal rendering is unchanged. */}+ page, so normal rendering is unchanged. The named surface+ is a stacking context; keep it above positioned tool glyphs+ so they cannot paint through the approval preview. */}<divclassName={cn(- 'w-full bg-presentation [view-transition-name:chat-form]',+ 'relative z-10 w-full bg-presentation [view-transition-name:chat-form]',!isLandingPage && 'scrollbar-gutter-spacer',isLandingPage && 'max-w-3xl transition-all duration-200 xl:max-w-4xl',)}diff --git a/client/src/components/Chat/Header.tsx b/client/src/components/Chat/Header.tsxindex 240e83fa3f..fa09c8b187 100644--- a/client/src/components/Chat/Header.tsx+++ b/client/src/components/Chat/Header.tsx@@ -78,7 +78,9 @@ function Header({const hiddenBehindNav = navVisible === true && 'max-md:hidden';return (- <div className="absolute top-0 z-10 flex h-[52px] w-full items-center gap-2 bg-gradient-to-b from-presentation via-presentation/70 to-transparent p-2 font-semibold text-text-primary md:from-presentation/80 md:via-presentation/50 2xl:from-presentation/0 2xl:via-transparent">+ /* The composer review is in a z-10 stacking context. Keep header controls+ above it when a tall review reaches the top of a short viewport. */+ <div className="absolute top-0 z-20 flex h-[52px] w-full items-center gap-2 bg-gradient-to-b from-presentation via-presentation/70 to-transparent p-2 font-semibold text-text-primary md:from-presentation/80 md:via-presentation/50 2xl:from-presentation/0 2xl:via-transparent"><div className="flex flex-shrink-0 items-center md:hidden"><OpenSidebar testId="header-open-sidebar-button" /></div>diff --git a/client/src/components/Chat/__tests__/ChatView.spec.tsx b/client/src/components/Chat/__tests__/ChatView.spec.tsxindex 80d03eada0..e44ebf3302 100644--- a/client/src/components/Chat/__tests__/ChatView.spec.tsx+++ b/client/src/components/Chat/__tests__/ChatView.spec.tsx@@ -135,4 +135,13 @@ describe('ChatView composer column', () => {expect(composerColumn).not.toHaveClass('overflow-y-auto');expect(composerColumn).not.toHaveClass('scrollbar-gutter-stable');});++ test('layers composer overlays above positioned tool glyphs in the message column', () => {+ const { container } = render(<ChatView />);++ const composerColumn = container.querySelector('.scrollbar-gutter-spacer');++ expect(composerColumn).toHaveClass('[view-transition-name:chat-form]');+ expect(composerColumn).toHaveClass('relative', 'z-10');+ });});diff --git a/client/src/components/Chat/__tests__/Header.stacking.spec.tsx b/client/src/components/Chat/__tests__/Header.stacking.spec.tsxnew file mode 100644index 0000000000..d573da116b--- /dev/null+++ b/client/src/components/Chat/__tests__/Header.stacking.spec.tsx@@ -0,0 +1,48 @@+import React from 'react';+import '@testing-library/jest-dom';+import { render } from '@testing-library/react';+import Header from '../Header';++jest.mock('react-router-dom', () => ({+ useParams: () => ({ conversationId: 'convo-1' }),+}));+jest.mock('recoil', () => ({ useRecoilValue: () => false }));+jest.mock('librechat-data-provider', () => ({+ getConfigDefaults: () => ({ interface: {} }),+ Constants: { NEW_CONVO: 'new' },+ PermissionTypes: { BOOKMARKS: 'bookmarks', MULTI_CONVO: 'multi_convo', TEMPORARY_CHAT: 'temp' },+ Permissions: { USE: 'use' },+}));+jest.mock('~/data-provider', () => ({ useGetStartupConfig: () => ({ data: undefined }) }));+jest.mock('~/hooks', () => ({ useHasAccess: () => false }));+jest.mock('~/store', () => ({+ __esModule: true,+ default: { sidebarExpanded: {}, isSubmittingFamily: () => ({}) },+}));+jest.mock('~/utils', () => ({+ cn: (...classes: Array<string | false | undefined>) => classes.filter(Boolean).join(' '),+}));+jest.mock('../Menus', () => ({+ OpenSidebar: () => null,+ PresetsMenu: () => null,+ NewChat: () => null,+ HeaderMenu: () => null,+}));+jest.mock('../TemporaryChat', () => ({+ TemporaryChat: () => null,+ TemporaryChatIndicator: () => null,+}));+jest.mock('../Trace', () => ({ useTraceControl: () => ({ show: false }) }));+jest.mock('../Menus/Endpoints/ModelSelector', () => () => null);+jest.mock('../ExportAndShareMenu', () => () => null);+jest.mock('../SubagentThreadLink', () => () => null);+jest.mock('../Menus/BookmarkMenu', () => () => null);+jest.mock('../AddMultiConvo', () => () => null);++describe('Header stacking', () => {+ test('keeps header controls above the z-10 composer approval review', () => {+ const { container } = render(<Header />);++ expect(container.firstElementChild).toHaveClass('absolute', 'top-0', 'z-20');+ });+});