From 5cb396e85cafb4fcffc819490d91832ca023f65c Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Wed, 14 Oct 2026 11:10:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8B=20feat:=20Optional=20Greeting=20He?= =?UTF-8?q?ading=20and=20Footer-Free=20Welcome=20Screen=20(#17055)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/server/experimental.js | 1 + api/server/index.js | 1 + client/src/common/types.ts | 3 + client/src/components/Chat/ChatView.tsx | 16 +-- client/src/components/Chat/Footer.tsx | 15 +++ client/src/components/Chat/Input/ChatForm.tsx | 22 +--- .../Chat/Input/__tests__/clearance.spec.ts | 30 +++++ client/src/components/Chat/Input/clearance.ts | 25 ++++ client/src/components/Chat/Landing.tsx | 9 +- .../Chat/__tests__/ChatView.spec.tsx | 54 +++++++- .../Chat/__tests__/ChatView.subagent.spec.tsx | 1 + .../components/Chat/__tests__/Footer.spec.tsx | 71 ++++++++++- .../__tests__/Landing.agent-contact.spec.tsx | 41 ++++++- .../mock/scenarios/landing-greeting.spec.ts | 115 ++++++++++++++++++ librechat.example.yaml | 7 ++ packages/api/src/html/footer.spec.ts | 12 ++ packages/api/src/html/footer.ts | 8 +- .../specs/config-schemas.spec.ts | 9 ++ packages/data-provider/src/config.ts | 9 ++ .../data-schemas/src/app/interface.spec.ts | 20 +++ packages/data-schemas/src/app/interface.ts | 2 + 21 files changed, 438 insertions(+), 33 deletions(-) create mode 100644 client/src/components/Chat/Input/__tests__/clearance.spec.ts create mode 100644 client/src/components/Chat/Input/clearance.ts create mode 100644 e2e/specs/mock/scenarios/landing-greeting.spec.ts diff --git a/api/server/experimental.js b/api/server/experimental.js index b17cd2e350..4807103983 100644 --- a/api/server/experimental.js +++ b/api/server/experimental.js @@ -543,6 +543,7 @@ if (cluster.isMaster) { so the answer is the deployment's base configuration, like index.js. */ indexHTML = injectConfiguredFooterBootstrap(indexHTML, { customFooter: process.env.CUSTOM_FOOTER, + landingFooter: baseAppConfig?.interfaceConfig?.landingFooter, }); indexHTML = injectColorModeHandoff(indexHTML, baseAppConfig?.interfaceConfig?.colorModeFromUrl); diff --git a/api/server/index.js b/api/server/index.js index fe1e723e4e..324d1ed4e9 100644 --- a/api/server/index.js +++ b/api/server/index.js @@ -301,6 +301,7 @@ const startServer = async () => { caller's and the client prefers it. */ indexHTML = injectConfiguredFooterBootstrap(indexHTML, { customFooter: process.env.CUSTOM_FOOTER, + landingFooter: appConfig?.interfaceConfig?.landingFooter, }); indexHTML = injectColorModeHandoff(indexHTML, appConfig.interfaceConfig?.colorModeFromUrl); diff --git a/client/src/common/types.ts b/client/src/common/types.ts index 8ddd11b6e7..5d44eb600a 100644 --- a/client/src/common/types.ts +++ b/client/src/common/types.ts @@ -692,6 +692,9 @@ declare global { /** Whether this deployment configured footer content of its own, so the * composer reserves the footer bar's band on its first frame. */ hasConfiguredFooter?: boolean; + /** The deployment's `interface.landingFooter`, so the welcome screen does + * not paint a footer the config is about to remove. */ + landingFooter?: boolean; }; } } diff --git a/client/src/components/Chat/ChatView.tsx b/client/src/components/Chat/ChatView.tsx index ead33f83d1..e867175bd5 100644 --- a/client/src/components/Chat/ChatView.tsx +++ b/client/src/components/Chat/ChatView.tsx @@ -24,6 +24,7 @@ import { useFileMapContext, ComposerRestoreProvider, } from '~/Providers'; +import Footer, { useLandingFooter, useConfiguredFooter } from './Footer'; import { QueuedTurnPortalProvider } from './Steering/QueuedTurnPortal'; import { useChatSettings } from '~/Providers/ChatSettingsContext'; import ApprovalProvider from './Messages/Content/ApprovalContext'; @@ -33,7 +34,6 @@ import ProjectBadge from '~/components/Projects/ProjectBadge'; import { composerLiftFamily } from './Input/Composer/state'; import { OwnerTextProvider } from './Messages/PrivateText'; import { useGetMessagesByConvoId } from '~/data-provider'; -import Footer, { useConfiguredFooter } from './Footer'; import { AskAnswerHostProvider } from './ask/state'; import MessagesView from './Messages/MessagesView'; import Presentation from './Presentation'; @@ -86,6 +86,7 @@ function ChatView({ * composer's clearance has to account for the bar when it does — including * before the config answers, so a cold load does not jump. */ const configuredFooter = useConfiguredFooter(); + const landingFooter = useLandingFooter(); /** Room an open composer popover needs below the composer; see the atom. */ const composerLift = useAtomValue(composerLiftFamily(index)); @@ -149,11 +150,10 @@ function ChatView({ (!messagesTree || messagesTree.length === 0) && (conversationId === Constants.NEW_CONVO || !conversationId); - /** A footer bar renders beneath the composer on the welcome screen always, and - * in a conversation when the deployment configured one. The shell already - * carried that answer, so this is the same value before and after the config - * resolves. */ - const footerBelow = isLandingPage || configuredFooter; + /** The welcome screen carries the full footer unless the deployment turned it + * off; otherwise a footer bar renders only for configured content. */ + const fullFooter = isLandingPage && landingFooter; + const footerBelow = fullFooter || configuredFooter; const isNavigating = (!messagesTree || messagesTree.length === 0) && conversationId != null; const isProjectLandingPage = isLandingPage && project != null; @@ -280,7 +280,7 @@ function ChatView({ {/* The generic disclaimer and the policy links are the welcome screen's; a deployment's own footer stays with the conversation that always showed it. */} - {!isLandingPage && configuredFooter &&