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 BYOM Workspace Diagnostics Out of Composer Layout
Lia179ff350ec32
diff --git a/client/src/components/Chat/Input/CodeWorkspaceMenu.tsx b/client/src/components/Chat/Input/CodeWorkspaceMenu.tsxindex 6221c959d7..5d35adefb1 100644--- a/client/src/components/Chat/Input/CodeWorkspaceMenu.tsx+++ b/client/src/components/Chat/Input/CodeWorkspaceMenu.tsx@@ -380,10 +380,23 @@ function GitContext({);}-function WorkspaceRequirements({ id, requirements }: { id: string; requirements: string[] }) {+function WorkspaceRequirements({+ id,+ requirements,+ visible = false,+}: {+ id: string;+ requirements: string[];+ visible?: boolean;+}) {if (requirements.length === 0) return null;return (- <div id={id} role="status" aria-live="polite" className="text-text-secondary text-xs">+ <div+ id={id}+ role={visible ? undefined : 'status'}+ aria-live={visible ? undefined : 'polite'}+ className={visible ? 'text-text-secondary px-2.5 pb-2 text-xs' : 'sr-only'}+ >{requirements.map((requirement) => (<p key={requirement}>{requirement}</p>))}@@ -653,6 +666,8 @@ export default function CodeWorkspaceMenu({) {requirements.unshift(localize('com_ui_code_workspace_graph_requirement'));}+ const details = [...requirements, ...checkoutSummaries];+ const description = details.join(' ');if (workspace.locked && transition == null) {/** A sealed decision with no transition on offer only reports where this chat runs: without a@@ -675,9 +690,9 @@ export default function CodeWorkspaceMenu({</span></span>)}- <div className="flex min-w-0 flex-col items-start gap-1">+ <div className="flex min-w-0 items-center"><TooltipAnchor- description={requirements.join(' ') || recovery}+ description={description || recovery}render={<buttontype="button"@@ -803,11 +818,9 @@ export default function CodeWorkspaceMenu({</Ariakit.MenuProvider>)}<Ariakit.MenuProvider store={menuStore}>- <div className="flex min-w-0 flex-col items-start gap-1">+ <div className="flex min-w-0 items-center"><TooltipAnchor- description={- transitionText?.info ?? (requirements.join(' ') || localize('com_ui_code_workspace'))- }+ description={transitionText?.info ?? (description || localize('com_ui_code_workspace'))}render={<Ariakit.MenuButtondisabled={buttonDisabled}@@ -1013,6 +1026,7 @@ export default function CodeWorkspaceMenu({))}</>)}+ <WorkspaceRequirements id={`${requirementsId}-details`} requirements={details} visible /><Ariakit.MenuSeparator className="border-border-light my-1 h-0 w-full border-t" /><Ariakit.MenuItemdisabled={buttonDisabled || isRefreshing}diff --git a/client/src/components/Chat/Input/__tests__/CodeWorkspaceMenu.spec.tsx b/client/src/components/Chat/Input/__tests__/CodeWorkspaceMenu.spec.tsxindex 36019c1dc2..cbc002d719 100644--- a/client/src/components/Chat/Input/__tests__/CodeWorkspaceMenu.spec.tsx+++ b/client/src/components/Chat/Input/__tests__/CodeWorkspaceMenu.spec.tsx@@ -2,7 +2,7 @@ import { AxiosError } from 'axios';import { Provider, createStore } from 'jotai';import userEvent from '@testing-library/user-event';import { dataService } from 'librechat-data-provider';-import { render, screen, waitFor } from '@testing-library/react';+import { render, screen, within, waitFor } from '@testing-library/react';import { QueryClient, QueryClientProvider } from '@tanstack/react-query';import type { TConversation } from 'librechat-data-provider';import type { AxiosResponse } from 'axios';@@ -620,6 +620,91 @@ describe('CodeWorkspaceMenu', () => {}});+ test.each([false, true])(+ 'keeps changing workspace requirements out of the composer layout (locked: %s)',+ (locked) => {+ const requiredBy = [+ { id: 'lia', name: 'Lia' },+ { id: 'reviewer', name: 'PR Reviewer' },+ ];+ const graph = workspace({ locked });+ const setter = jest.fn();+ const { rerenderMenu } = renderMenu(+ <CodeWorkspaceMenu setConversation={setter} workspace={graph} disabled={false} />,+ );+ for (const state of ['loading', 'choose', 'unavailable', 'missing'] as const) {+ const pending = workspace({+ locked,+ state,+ canSubmit: false,+ environments: [{ environment, state, workspaces: [], requiredBy }],+ });+ rerenderMenu(+ <CodeWorkspaceMenu setConversation={setter} workspace={pending} disabled={false} />,+ );+ const button = screen.getByTestId(+ locked ? 'code-workspace-locked-status' : 'code-workspace',+ );+ const requirements = document.getElementById(button.getAttribute('aria-describedby')!);+ expect(requirements).toHaveClass('sr-only');+ expect(requirements).toHaveAttribute('role', 'status');+ expect(requirements).toHaveAttribute('aria-live', 'polite');+ expect(requirements).toHaveTextContent('Lia');+ expect(requirements).toHaveTextContent('PR Reviewer');+ expect(button.parentElement).not.toHaveClass('flex-col');+ }+ rerenderMenu(+ <CodeWorkspaceMenu setConversation={setter} workspace={graph} disabled={false} />,+ );+ expect(screen.queryByText(/Every coding agent/)).not.toBeInTheDocument();+ expect(setter).not.toHaveBeenCalled();+ },+ );++ test('shows pending workspace requirements in the menu without a second live region', async () => {+ const graph = workspace({ state: 'loading', canSubmit: false });+ graph.environments[0] = {+ environment,+ state: 'loading',+ workspaces: [],+ requiredBy: [+ { id: 'lia', name: 'Lia' },+ { id: 'reviewer', name: 'PR Reviewer' },+ ],+ };+ renderMenu(+ <CodeWorkspaceMenu setConversation={jest.fn()} workspace={graph} disabled={false} />,+ );+ await userEvent.click(screen.getByTestId('code-workspace'));+ const detail = within(screen.getByRole('menu')).getByText(+ 'Every coding agent in this chat needs a workspace, including subagents.',+ );+ expect(detail).toBeVisible();+ expect(detail.parentElement).not.toHaveClass('sr-only');+ expect(detail.parentElement).not.toHaveAttribute('aria-live');+ expect(screen.getAllByRole('status')).toHaveLength(1);+ });++ test('keeps multi-machine checkout summaries in the menu instead of extra composer rows', async () => {+ const graph = workspace();+ graph.environments[0].selected!.checkout = 'source';+ graph.environments.push({+ environment: { ...environment, id: 'reviewer-vm', name: 'Reviewer VM' },+ state: 'ready',+ workspaces: [{ id: 'review', name: 'Review' }],+ selected: { environmentId: 'reviewer-vm', workspaceId: 'review', checkout: 'isolated' },+ });+ renderMenu(+ <CodeWorkspaceMenu setConversation={jest.fn()} workspace={graph} disabled={false} />,+ );+ const summary = 'Reviewer VM · Review · com_ui_code_checkout_isolated';+ expect(screen.getByText(summary).parentElement).toHaveClass('sr-only');+ await userEvent.click(screen.getByTestId('code-workspace'));+ const detail = within(screen.getByRole('menu')).getByText(summary);+ expect(detail).toBeVisible();+ expect(detail.parentElement).not.toHaveClass('sr-only');+ });+test('explains the missing reviewer workspace while the selected primary workspace is ready', async () => {const reviewerMachine = { ...environment, id: 'reviewer-vm', name: 'Danny Skynet Trusted VM' };const graph = workspace({ state: 'choose', canSubmit: false });