From 55106cd4007b6b70595aca038a1b588d531bbe84 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Fri, 11 Sep 2026 22:48:12 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=A1=20fix:=20Align=20the=20Subagent=20?= =?UTF-8?q?Panel=20With=20the=20Conversation's=20Footer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The panel's bottom band states that it matches the main composer's clearance so the two surfaces end on one line beside each other. That clearance became footer-dependent in the previous commit, and the panel kept a fixed `pb-4`, so a deployment with a configured footer ended them 24px apart. The panel reads the same answer the composer reads — `useConfiguredFooter` — and clears the bar when there is one. Three consumers now share one source for the question "does a footer render beneath this surface": `ChatView`, `ChatForm` through `footerBelow`, and this panel. The panel's own alignment has no browser scenario: reaching this surface needs an agent with subagents, a dispatched task and an open control footer, which is a fixture of its own. The shared cause is covered by `configured-footer-clears-the-composer` on the main composer. Reported by Codex on PR #15838: https://github.com/danny-avila/LibreChat/pull/15838#discussion_r3993177163 --- .../Chat/Subagents/SubagentThreadPanel.test.tsx | 3 +++ .../Chat/Subagents/SubagentThreadPanel.tsx | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx b/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx index be2909f44b..c835da419a 100644 --- a/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx +++ b/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx @@ -70,6 +70,9 @@ jest.mock('librechat-data-provider', () => { jest.mock('~/data-provider', () => ({ ACTIVE_THREAD_REFRESH_MS: 2000, + /** The panel's bottom clearance follows the conversation's configured footer + * (`useConfiguredFooter`), so the panel now reads the startup config. */ + useGetStartupConfig: () => ({ data: undefined }), useSubagentThreadQuery: (...args: unknown[]) => mockUseSubagentThreadQuery(...args), subagentThreadHasTaskEvidence: (view: SubagentThreadView | undefined, taskId: string): boolean => view?.messages.some( diff --git a/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx b/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx index b5006084d0..5d4fcab540 100644 --- a/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx +++ b/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx @@ -48,13 +48,14 @@ import SubagentActivity, { SubagentActivityScrollSurface } from './SubagentActiv import ApprovalProvider from '~/components/Chat/Messages/Content/ApprovalContext'; import { isMacPlatform, resolveComposerKeyDown } from '~/utils/shortcuts'; import { useFocusTrap, useLocalize, useNavigateToConvo } from '~/hooks'; +import { useConfiguredFooter } from '~/components/Chat/Footer'; import { useParentSubagents } from './ParentSubagentsProvider'; import SubagentConversation from './SubagentConversation'; import { eventSubagentSelection } from './eventSelection'; import { resolveSubagentAgentId } from './identity'; import { useAgentsMapContext } from '~/Providers'; import { isLiveSubagentStatus } from './status'; -import { renderAgentAvatar } from '~/utils'; +import { cn, renderAgentAvatar } from '~/utils'; import { useChatSurface } from './surface'; const EVENT_TASK_PAGE_SIZE = 3; @@ -109,6 +110,7 @@ const failedControlLocaleKey = (reason?: string) => { }; export default function SubagentThreadPanel({ selection }: { selection: ActiveSubagentPanel }) { + const hasConfiguredFooter = useConfiguredFooter(); const localize = useLocalize(); const panelStore = useStore(); const { showToast } = useToastContext(); @@ -1460,11 +1462,12 @@ export default function SubagentThreadPanel({ selection }: { selection: ActiveSu {activityPanel} {(showControlFooter || composerMode != null) && ( - /* The main chat form's own bottom rhythm: a started conversation carries - no disclaimer, so its composer keeps only enough clearance to show its - shadow, and this one keeps the same, so the two surfaces end on one - line when the panel is open beside the thread. */ -