From 14c43138c2ffc4f83121aff53652c85732b8481f Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Tue, 6 Oct 2026 22:55:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=A5=EF=B8=8F=20feat:=20Show=20Lia=20on?= =?UTF-8?q?=20the=20Welcome=20Screen=20(#16684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Show Lia on the Welcome Screen Adds the opt-in Show Lia setting (off by default) and the interface.mascot deployment flag (allowed by default). Lia mounts only on the landing page, loads lazily after first paint, stands on the composer's top edge clear of the greeting, reacts to typing, files and theme changes, and speaks through localized bubbles. She is decorative and hidden from assistive technology. * fix: Keep Lia's Long-Message Reaction Re-Armed and Pointer Reads Per Frame Deleting a message back under 280 characters now re-arms the long-message reaction, pointer handling reads layout at most once per animation frame, and the ChatView specs stub Lia like their other children. * test: Open Settings from the Phone Drawer in the Lia Scenarios The opt-in scenario no longer resets the stored preference on reload, and both Settings scenarios open the account menu from the mobile drawer on phones. * fix: Measure Lia's Caret Like the Composer and Label Her When Idle The caret mirror copies direction, alignment, indentation, wrapping and box sizing, so right-to-left and wrapped text measure like the composer. Hovering Lia between activities now says she is hanging out instead of showing nothing. * fix: Wave Off Assistants Sends and Keep Lia's Canvas and Bubble Off Welcome Content * fix: Keep Lia's Speech Bubble Inside Her Stage * fix: Wrap Long Translations in Lia's Speech Bubble * fix: Keep Lia's Long-Message Reaction Until It Plays and Pin the Scenario Greeting * fix: Make Only Lia's Body Clickable So She Fits Beside Long Greetings * fix: Let Lia Stand Beside the Composer When the Greeting Fills Its Top * feat: Let Users Drag Lia Around and Keep Her Near the Composer * test: Cover Picking Lia Up and Setting Her Down on the Composer * refactor: Keep Lia's Preference Inside Her Feature * fix: Let Keyboard Users Pet Lia and Move Her With the Arrow Keys * test: Shift Only the Wall Clock for Lia's Morning Greeting * test: Measure Lia's Keyboard Walk Both Ways So the Greeting's Width Cannot Pin Her * fix: Bring Lia Back When a New Chat Opens During Her Farewell * fix: Start Lia's Reactions on Her Own Clock After a Pause Without Room * fix: Load Lia Through Stale-Asset Recovery and Skip the Farewell Before She Appears * feat: Mark the Lia Settings Toggle as Beta --- client/src/components/Chat/ChatView.tsx | 13 +- .../Chat/__tests__/ChatView.spec.tsx | 1 + .../Chat/__tests__/ChatView.subagent.spec.tsx | 1 + client/src/components/Lia/Stage.tsx | 619 ++++++++++++++++++ .../src/components/Lia/__tests__/Lia.spec.tsx | 118 ++++ .../components/Lia/__tests__/engine.spec.ts | 24 + .../components/Lia/__tests__/speech.spec.ts | 32 + client/src/components/Lia/engine/catalog.ts | 7 + client/src/components/Lia/engine/engine.ts | 30 +- client/src/components/Lia/index.tsx | 71 ++ client/src/components/Lia/speech.ts | 19 + client/src/components/Lia/store.ts | 9 + .../Nav/Settings/__tests__/Sidebar.spec.tsx | 1 + .../Nav/Settings/__tests__/registry.spec.ts | 1 + .../src/components/Nav/Settings/context.tsx | 4 + .../src/components/Nav/Settings/controls.tsx | 3 + .../src/components/Nav/Settings/registry.tsx | 16 + client/src/components/Nav/Settings/types.ts | 1 + .../Nav/SettingsTabs/ToggleSwitch.tsx | 6 + client/src/locales/en/translation.json | 201 ++++++ e2e/specs/mock/scenarios/lia-mascot.spec.ts | 342 ++++++++++ librechat.example.yaml | 2 + packages/data-provider/src/config.ts | 3 + .../data-schemas/src/app/interface.spec.ts | 12 + packages/data-schemas/src/app/interface.ts | 1 + 25 files changed, 1533 insertions(+), 4 deletions(-) create mode 100644 client/src/components/Lia/Stage.tsx create mode 100644 client/src/components/Lia/__tests__/Lia.spec.tsx create mode 100644 client/src/components/Lia/__tests__/speech.spec.ts create mode 100644 client/src/components/Lia/index.tsx create mode 100644 client/src/components/Lia/speech.ts create mode 100644 client/src/components/Lia/store.ts create mode 100644 e2e/specs/mock/scenarios/lia-mascot.spec.ts diff --git a/client/src/components/Chat/ChatView.tsx b/client/src/components/Chat/ChatView.tsx index 35d8bc371b..0f24310eb0 100644 --- a/client/src/components/Chat/ChatView.tsx +++ b/client/src/components/Chat/ChatView.tsx @@ -1,4 +1,4 @@ -import { memo, useMemo } from 'react'; +import { memo, useMemo, useRef } from 'react'; import { useAtomValue } from 'jotai'; import { useRecoilValue } from 'recoil'; import { useForm } from 'react-hook-form'; @@ -38,6 +38,7 @@ import MessagesView from './Messages/MessagesView'; import Presentation from './Presentation'; import ChatForm from './Input/ChatForm'; import { TraceSurface } from './Trace'; +import Lia from '~/components/Lia'; import Landing from './Landing'; import Header from './Header'; import { cn } from '~/utils'; @@ -88,6 +89,9 @@ function ChatView({ /** Room an open composer popover needs below the composer; see the atom. */ const composerLift = useAtomValue(composerLiftFamily(index)); + /** Lia, the welcome screen mascot, stands on the composer band's top edge. */ + const composerBandRef = useRef(null); + const methods = useForm({ defaultValues: { text: '' }, }); @@ -213,6 +217,7 @@ function ChatView({ } className={cn( 'flex flex-col', + isLandingPage && 'relative', isLandingPage ? /* The gutter is reserved once per state, wherever the centring happens. A conversation centres the composer @@ -242,6 +247,7 @@ function ChatView({ is a stacking context; keep it above positioned tool glyphs so they cannot paint through the approval preview. */}
}
+ {isLandingPage &&