mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
🪡 fix: Align the Subagent Panel With the Conversation's Footer
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
This commit is contained in:
parent
1cd1942de7
commit
55106cd400
2 changed files with 12 additions and 6 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
</ApprovalProvider>
|
||||
{(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. */
|
||||
<div className="shrink-0 px-3 pb-4 pt-2">
|
||||
/* The main chat form's own bottom rhythm, read from the same answer it
|
||||
reads (`useConfiguredFooter`): a conversation clears the footer bar
|
||||
when the deployment configured one and otherwise keeps only enough to
|
||||
show the composer's shadow, and this surface keeps the same, so the
|
||||
two end on one line when the panel is open beside the thread. */
|
||||
<div className={cn('shrink-0 px-3 pt-2', hasConfiguredFooter ? 'pb-10' : 'pb-4')}>
|
||||
{transientControl?.status === 'failed' && (
|
||||
<Alert variant="error" className="mb-2 flex items-center gap-2">
|
||||
<span className="min-w-0 flex-1">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue