🚉 feat: Open the Session Rail When Background Work Starts (#18546)

* 🚪 feat: Show the Session Rail When Work Starts Running

The rail now shows itself when work first starts running in a conversation,
on screens wide enough to dock it, so a reader does not have to notice the dot
on the header control. It takes no focus and never opens as the small-screen
sheet. Showing itself is not the reader's standing choice: it is not
remembered and ends with the conversation. Closing the rail is an answer, and
it is not shown again for that conversation, whatever starts later.

interface.sessionRailAutoOpen (default true) turns it off.

* 🚪 feat: Let a Reader Keep the Session Rail From Showing Itself

A rail that shows itself for every conversation's work is one a reader who
does not want it has to close every time. Two ways out, both the reader's:

Closing the rail is now remembered for that conversation in local storage, so
it is not shown again there on this visit or after coming back to it. The
memory is the last hundred conversations; opening the rail by hand takes a
conversation off it.

Settings > General gains "Open the session rail when work starts", on by
default and offered only where the deployment has the rail and lets it show
itself.
This commit is contained in:
Danny Avila 2026-11-19 22:06:15 -05:00 • committed by GitHub
parent 18621f525e
commit d41ff8e8c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 322 additions and 10 deletions

View file

@ -149,6 +149,7 @@ function Header({
conversationId={routeConversationId ?? Constants.NEW_CONVO}
agentId={conversation?.agent_id}
isSubmitting={isSubmitting}
autoOpen={interfaceConfig.sessionRailAutoOpen !== false}
/>
)}
{startupConfig != null && !sessionRail && !isNewChat && parentConversationId == null && (

View file

@ -1,9 +1,18 @@
import { memo, useCallback, useState } from 'react';
import { memo, useCallback, useEffect, useRef, useState } from 'react';
import { ListTodo } from 'lucide-react';
import { createPortal } from 'react-dom';
import { useAtom, useAtomValue } from 'jotai';
import { TooltipAnchor } from '@librechat/client';
import { SESSION_RAIL_ID, SESSION_TOGGLE_ID, sessionRailOpen, sessionRailSlot } from './state';
import { Constants } from 'librechat-data-provider';
import {
SESSION_RAIL_ID,
sessionRailOpen,
sessionRailSlot,
SESSION_TOGGLE_ID,
sessionRailAutoOpen,
sessionRailDismissed,
SESSION_RAIL_DISMISSED_LIMIT,
} from './state';
import { ARTIFACTS_SHEET_MAX_WIDTH } from '~/utils/breakpoints';
import useBackgroundTasks from '../BackgroundTasks/useTasks';
import useScaledMaxWidth from '~/hooks/useScaledMaxWidth';
@ -16,15 +25,21 @@ import { cn } from '~/utils';
* The chat header's session control and the rail it opens. It is always offered, so a reader
* learns one place to look, and it is the single reader of the conversation's tasks: the dot on
* the control and the rows in the rail cannot disagree.
*
* With `autoOpen`, work that starts running shows the rail without being asked. That costs the
* thread one re-wrap and no render: the rail's column narrows it, and nothing outside this
* component and the rail reads whether the rail is open.
*/
function Session({
conversationId,
agentId,
isSubmitting,
autoOpen = true,
}: {
conversationId: string;
agentId?: string | null;
isSubmitting: boolean;
autoOpen?: boolean;
}) {
const localize = useLocalize();
const slot = useAtomValue(sessionRailSlot);
@ -32,15 +47,55 @@ function Session({
const [docked, setDocked] = useAtom(sessionRailOpen);
/** A sheet covers the conversation, so it never reopens itself from a remembered choice. */
const [sheetOpen, setSheetOpen] = useState(false);
const open = sheet ? sheetOpen : docked;
/**
* Shown for this conversation because work started in it. That is not the reader's standing
* choice, so it is not remembered as one and it ends with the conversation. Closing the rail
* is an answer: it is not shown again for the same conversation, whatever starts later and
* however often the reader comes back to it. An unsaved chat has no identity to remember
* that under, so its answer lasts as long as this control does.
*/
const [summoned, setSummoned] = useState(false);
const wanted = useAtomValue(sessionRailAutoOpen);
const [dismissedIds, setDismissedIds] = useAtom(sessionRailDismissed);
const dismissedUnsaved = useRef(false);
const saved = conversationId !== '' && conversationId !== Constants.NEW_CONVO;
const dismissed = saved && dismissedIds.includes(conversationId);
const open = sheet ? sheetOpen : docked || summoned;
const [now, setNow] = useState(() => Date.now());
const view = useBackgroundTasks({ conversationId, isSubmitting, now, details: open });
const { activeCount, awaitingCount, failedCount, incomplete } = view;
useTaskExpiry(view.rows, setNow);
/** Never as a sheet: that would cover the conversation the reader is in the middle of. */
const working = activeCount > 0;
useEffect(() => {
if (autoOpen && wanted && working && !sheet && !dismissed && !dismissedUnsaved.current) {
setSummoned(true);
}
}, [autoOpen, wanted, working, sheet, dismissed]);
const setOpen = useCallback(
(next: boolean) => (sheet ? setSheetOpen(next) : setDocked(next)),
[sheet, setDocked],
(next: boolean) => {
if (sheet) {
setSheetOpen(next);
return;
}
setSummoned(false);
setDocked(next);
if (!saved) {
dismissedUnsaved.current = !next;
return;
}
/** Closing is remembered for this conversation; opening it by hand takes that back. */
setDismissedIds((ids) => {
const others = ids.filter((id) => id !== conversationId);
if (next) {
return others.length === ids.length ? ids : others;
}
return [...others, conversationId].slice(-SESSION_RAIL_DISMISSED_LIMIT);
});
},
[conversationId, saved, sheet, setDismissedIds, setDocked],
);
const close = useCallback(
(restoreFocus = true) => {

View file

@ -7,10 +7,15 @@ import { ContentTypes, QueryKeys, dataService } from 'librechat-data-provider';
import { activeSubagentPanel, ParentSubagentsProvider } from '@librechat/chat/react';
import type { ParentSubagentSummary, BackgroundTaskIndex, TMessage } from 'librechat-data-provider';
import type { JotaiStore } from 'test/harness';
import {
sessionRailOpen,
sessionRailAutoOpen,
sessionRailDismissed,
SESSION_RAIL_DISMISSED_LIMIT,
} from '../state';
import { AgentsMapContext } from '~/Providers/AgentsMapContext';
import { SubagentIndexHostProvider } from 'test/streamHost';
import { ChatSurfaceHarness } from 'test/harness';
import { sessionRailOpen } from '../state';
import SessionRailSlot from '../Slot';
import Session from '../Session';
@ -122,11 +127,20 @@ const renderSession = ({
children = [],
remembered,
id = conversationId,
autoOpen = false,
wanted,
dismissed,
}: {
children?: ParentSubagentSummary[];
/** The reader's stored choice for the docked rail. */
remembered?: boolean;
id?: string;
/** Off unless a test is about the rail showing itself, so the others open it by hand. */
autoOpen?: boolean;
/** The reader's own setting for the rail showing itself. */
wanted?: boolean;
/** Conversations the reader has already closed the rail in. */
dismissed?: string[];
} = {}) => {
jest.spyOn(dataService, 'getSubagentThread').mockImplementation(() => new Promise(() => {}));
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
@ -142,6 +156,8 @@ const renderSession = ({
seed={(store) => {
atoms = store;
if (remembered != null) store.set(sessionRailOpen, remembered);
if (wanted != null) store.set(sessionRailAutoOpen, wanted);
if (dismissed != null) store.set(sessionRailDismissed, dismissed);
}}
>
<RecoilRoot>
@ -150,7 +166,7 @@ const renderSession = ({
<SubagentIndexHostProvider>
<ParentSubagentsProvider conversationId={id} enabled>
<header>
<Session conversationId={id} isSubmitting={false} />
<Session conversationId={id} isSubmitting={false} autoOpen={autoOpen} />
</header>
<SessionRailSlot />
</ParentSubagentsProvider>
@ -165,6 +181,7 @@ const renderSession = ({
queryClient,
getSelection: () => atoms.get(activeSubagentPanel),
isRemembered: () => atoms.get(sessionRailOpen),
dismissedIn: () => atoms.get(sessionRailDismissed),
};
};
@ -471,6 +488,125 @@ describe('Session', () => {
expect(rail).not.toContainElement(document.activeElement as HTMLElement);
});
describe('showing itself when work starts', () => {
it('opens for running work without being asked, and without that becoming the remembered choice', async () => {
jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(index());
const { isRemembered } = renderSession({ autoOpen: true });
const rail = await screen.findByTestId('session-rail');
await waitFor(() => expect(within(rail).getAllByTestId('session-row')).toHaveLength(2));
expect(toggle()).toHaveAttribute('aria-expanded', 'true');
/** Focus stays where the reader had it. */
expect(rail).not.toContainElement(document.activeElement as HTMLElement);
expect(isRemembered()).toBe(false);
});
it('stays closed for a conversation that only has finished work to list', async () => {
jest
.spyOn(dataService, 'getBackgroundTasks')
.mockResolvedValue(index({ tasks: [index().tasks[1]] }));
renderSession({ autoOpen: true });
await waitFor(() => expect(toggle()).toHaveAccessibleName('com_ui_session_label_pending'));
expect(screen.queryByTestId('session-rail')).toBeNull();
});
it('takes closing as an answer for the conversation, whatever starts next', async () => {
const running = index();
const getTasks = jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(running);
const { queryClient, isRemembered } = renderSession({ autoOpen: true });
const rail = await screen.findByTestId('session-rail');
await userEvent.click(within(rail).getByRole('button', { name: 'com_ui_session_close' }));
expect(screen.queryByTestId('session-rail')).toBeNull();
expect(isRemembered()).toBe(false);
/** Everything finishes, then something new starts running. */
getTasks.mockResolvedValue(index({ tasks: [running.tasks[1]] }));
await queryClient.refetchQueries([QueryKeys.backgroundTasks, conversationId]);
await waitFor(() => expect(toggle()).toHaveAccessibleName('com_ui_session_label_pending'));
getTasks.mockResolvedValue(
index({ tasks: [{ ...running.tasks[0], taskId: 'task-later', toolCallId: 'call-later' }] }),
);
await queryClient.refetchQueries([QueryKeys.backgroundTasks, conversationId]);
await waitFor(() => expect(toggle()).toHaveAccessibleName('com_ui_session_label_running'));
expect(screen.queryByTestId('session-rail')).toBeNull();
});
it('remembers that answer when the reader leaves the conversation and comes back', async () => {
jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(index());
const first = renderSession({ autoOpen: true });
const rail = await screen.findByTestId('session-rail');
await userEvent.click(within(rail).getByRole('button', { name: 'com_ui_session_close' }));
expect(first.dismissedIn()).toEqual([conversationId]);
first.unmount();
/** A fresh visit: nothing of the first is left but what was stored. */
const second = renderSession({ autoOpen: true });
await waitFor(() =>
expect(toggle()).toHaveAccessibleName(
'com_ui_session_label_running; com_ui_session_label_pending',
),
);
expect(screen.queryByTestId('session-rail')).toBeNull();
second.unmount();
/** It was an answer for that conversation, not for every one. */
renderSession({ autoOpen: true, id: 'convo-2' });
expect(await screen.findByTestId('session-rail')).toBeInTheDocument();
});
it('takes the answer back when the reader opens the rail by hand', async () => {
jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(index());
const { dismissedIn } = renderSession({
autoOpen: true,
dismissed: ['convo-0', conversationId],
});
await waitFor(() => expect(toggle()).not.toHaveAccessibleName('com_ui_session'));
expect(screen.queryByTestId('session-rail')).toBeNull();
await userEvent.click(toggle());
expect(await screen.findByTestId('session-rail')).toBeInTheDocument();
expect(dismissedIn()).toEqual(['convo-0']);
});
it('keeps a bounded memory of where it was closed, dropping the oldest', async () => {
jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(index());
const earlier = Array.from(
{ length: SESSION_RAIL_DISMISSED_LIMIT },
(_, position) => `earlier-${position}`,
);
const { dismissedIn } = renderSession({ autoOpen: true, dismissed: earlier });
const rail = await screen.findByTestId('session-rail');
await userEvent.click(within(rail).getByRole('button', { name: 'com_ui_session_close' }));
expect(dismissedIn()).toHaveLength(SESSION_RAIL_DISMISSED_LIMIT);
expect(dismissedIn()[0]).toBe('earlier-1');
expect(dismissedIn()[SESSION_RAIL_DISMISSED_LIMIT - 1]).toBe(conversationId);
});
it('stays out of the way of a reader who turned this off in their settings', async () => {
jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(index());
renderSession({ autoOpen: true, wanted: false });
await waitFor(() => expect(toggle()).not.toHaveAccessibleName('com_ui_session'));
expect(screen.queryByTestId('session-rail')).toBeNull();
/** The control still opens it. */
await userEvent.click(toggle());
expect(await screen.findByTestId('session-rail')).toBeInTheDocument();
});
it('does not cover the conversation on a small screen', async () => {
mockSheet.current = true;
jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(index());
renderSession({ autoOpen: true });
await waitFor(() => expect(toggle()).not.toHaveAccessibleName('com_ui_session'));
expect(screen.queryByTestId('session-rail')).toBeNull();
expect(screen.queryByRole('dialog')).toBeNull();
});
it('leaves the rail to the control when the deployment turns this off', async () => {
jest.spyOn(dataService, 'getBackgroundTasks').mockResolvedValue(index());
renderSession({ autoOpen: false });
await waitFor(() => expect(toggle()).not.toHaveAccessibleName('com_ui_session'));
expect(screen.queryByTestId('session-rail')).toBeNull();
});
});
describe('on a small screen', () => {
beforeEach(() => {
mockSheet.current = true;

View file

@ -10,5 +10,19 @@ export const sessionRailOpen = createStorageAtom<boolean>('sessionRailOpen', fal
*/
export const sessionRailSlot = atom<HTMLElement | null>(null);
/**
* The reader's own switch for the rail showing itself when work starts. The deployment's comes
* first: where it has turned this off, the reader is not offered the switch.
*/
export const sessionRailAutoOpen = createStorageAtom<boolean>('sessionRailAutoOpen', true);
/**
* The conversations whose rail the reader closed, oldest first. The rail is not shown again by
* itself for one of these, on this visit or after coming back to it, and the list is bounded so
* it cannot grow with every conversation a reader ever closes it in.
*/
export const sessionRailDismissed = createStorageAtom<string[]>('sessionRailDismissed', []);
export const SESSION_RAIL_DISMISSED_LIMIT = 100;
export const SESSION_RAIL_ID = 'session-rail';
export const SESSION_TOGGLE_ID = 'session-rail-toggle';

View file

@ -139,6 +139,15 @@ describe('Header stacking', () => {
expect(backgroundTasks).not.toHaveBeenCalled();
});
test('lets the rail show itself unless the deployment says otherwise', () => {
render(<Header />);
expect(session.mock.calls[0][0]).toMatchObject({ autoOpen: true });
session.mockClear();
mockStartupConfig.current = { interface: { sessionRailAutoOpen: false } };
render(<Header />);
expect(session.mock.calls[0][0]).toMatchObject({ autoOpen: false });
});
test('offers the session control on a chat that has not been saved yet', () => {
mockRoute.current = undefined;
render(<Header />);

View file

@ -24,6 +24,7 @@ const ctx: SettingsContextValue = {
allowAccountDeletion: true,
aboutEnabled: false,
mascotAllowed: true,
sessionRailAutoOpenAllowed: true,
engineSTT: 'browser',
engineTTS: 'browser',
langfuseConnectionAccess: false,

View file

@ -117,3 +117,30 @@ describe('useSettingsContext connected accounts', () => {
expect(hasConnect()).toBe(false);
});
});
describe('useSettingsContext session rail auto-open', () => {
afterEach(() => {
mockStartup = undefined;
});
const allowed = (): boolean =>
renderHook(() => useSettingsContext(), { wrapper }).result.current.sessionRailAutoOpenAllowed;
it('withholds the switch until the deployment has answered', () => {
mockStartup = undefined;
expect(allowed()).toBe(false);
});
it('offers the switch by default', () => {
mockStartup = { interface: {} } as Partial<TStartupConfig>;
expect(allowed()).toBe(true);
});
it.each([{ sessionRail: false }, { sessionRailAutoOpen: false }])(
'withholds the switch when the deployment sets %o',
(ui) => {
mockStartup = { interface: ui } as Partial<TStartupConfig>;
expect(allowed()).toBe(false);
},
);
});

View file

@ -26,6 +26,7 @@ const settingsContext: SettingsContextValue = {
allowAccountDeletion: true,
aboutEnabled: false,
mascotAllowed: true,
sessionRailAutoOpenAllowed: true,
engineSTT: 'browser',
engineTTS: 'browser',
langfuseConnectionAccess: false,
@ -76,6 +77,12 @@ describe('settings registry', () => {
expect(entry?.show?.({ ...settingsContext, analyticsConfigured: true })).toBe(true);
});
it('offers the session rail switch only where the deployment lets the rail show itself', () => {
const entry = registry.find((e) => e.id === 'sessionRailAutoOpen');
expect(entry?.show?.(settingsContext)).toBe(true);
expect(entry?.show?.({ ...settingsContext, sessionRailAutoOpenAllowed: false })).toBe(false);
});
describe('setting applicability', () => {
it.each(['usernameDisplay', 'saveBadgesState'])(
'does not offer the obsolete %s control',

View file

@ -52,6 +52,10 @@ export function useSettingsContext(): SettingsContextValue {
const aboutEnabled = startupConfig?.interface?.buildInfo !== false;
/* Offered only once the deployment has answered, so an operator's opt-out never flashes the row. */
const mascotAllowed = startupConfig != null && startupConfig.interface?.mascot !== false;
const sessionRailAutoOpenAllowed =
startupConfig != null &&
startupConfig.interface?.sessionRail !== false &&
startupConfig.interface?.sessionRailAutoOpen !== false;
/* Offered only once the deployment has answered, matching the capability hook the alerts
read: before then a toggle could store a preference, or raise the browser's permission
prompt, for a capability the operator turns off. */
@ -95,6 +99,7 @@ export function useSettingsContext(): SettingsContextValue {
allowAccountDeletion,
aboutEnabled,
mascotAllowed,
sessionRailAutoOpenAllowed,
engineSTT,
engineTTS,
langfuseConnectionAccess,
@ -124,6 +129,7 @@ export function useSettingsContext(): SettingsContextValue {
allowAccountDeletion,
aboutEnabled,
mascotAllowed,
sessionRailAutoOpenAllowed,
engineSTT,
engineTTS,
langfuseConnectionAccess,

View file

@ -33,6 +33,7 @@ import { ArchiveAllChats } from '../SettingsTabs/Data/ArchiveAllChats';
import { toggleControl, ThemeSetting, LangSetting } from './controls';
import BackupCodesItem from '../SettingsTabs/Account/BackupCodesItem';
import UiScaleSelector from '../SettingsTabs/General/UiScaleSelector';
import { sessionRailAutoOpen } from '~/components/Chat/Session/state';
import FontSizeSelector from '../SettingsTabs/Chat/FontSizeSelector';
import ChatTitleInTab from '../SettingsTabs/General/ChatTitleInTab';
import AdvancedPrompts from '../SettingsTabs/Chat/AdvancedPrompts';
@ -184,6 +185,20 @@ export const registry: SettingEntry[] = [
switchId: 'showScrollButton',
}),
},
{
id: 'sessionRailAutoOpen',
tab: GENERAL,
section: 'layout',
labelKey: 'com_nav_session_rail_auto_open',
keywords: ['session', 'rail', 'background', 'tasks', 'subagents', 'sidebar', 'panel'],
show: (ctx) => ctx.sessionRailAutoOpenAllowed,
Component: toggleControl({
stateAtom: sessionRailAutoOpen,
localizationKey: 'com_nav_session_rail_auto_open',
switchId: 'sessionRailAutoOpen',
hoverCardText: 'com_nav_info_session_rail_auto_open',
}),
},
{
id: 'mobileDrawerStrip',
tab: GENERAL,

View file

@ -58,6 +58,8 @@ export interface SettingsContextValue {
allowAccountDeletion: boolean;
aboutEnabled: boolean;
mascotAllowed: boolean;
/** The deployment has the session rail and lets it show itself. */
sessionRailAutoOpenAllowed: boolean;
engineSTT: string;
engineTTS: string;
langfuseConnectionAccess: boolean;

View file

@ -1207,6 +1207,8 @@
"com_nav_setting_speech": "Speech",
"com_nav_settings": "Settings",
"com_nav_shared_links": "Shared chats",
"com_nav_session_rail_auto_open": "Open the session rail when work starts",
"com_nav_info_session_rail_auto_open": "Shows the session rail beside the chat when a subagent or background task starts running. If you close it, it stays closed for that chat.",
"com_nav_show_lia": "Show Lia on the Welcome Screen",
"com_nav_show_thinking": "Open Thinking Dropdowns by Default",
"com_nav_slash_command": "/-Command",

View file

@ -284,9 +284,11 @@ test.describe('detached subagent activity', () => {
);
expect(response.ok()).toBeTruthy();
/** The children outlive the parent's turn, and the control counts them from the header. */
/** The children outlive the parent's turn. The control counts them from the header, and
* the rail shows itself for them: it was closed above, but for the unsaved chat. */
await expect(toggle).toHaveAccessibleName(/^Session, 2 running/, { timeout: 30_000 });
await toggle.click();
await expect(rail).toBeVisible();
await expect(toggle).toHaveAttribute('aria-expanded', 'true');
const rows = rail.getByTestId('session-row');
await expect(rows).toHaveCount(2);
for (const childName of childNames) {
@ -324,9 +326,16 @@ test.describe('detached subagent activity', () => {
await expect(rail.getByRole('button', { name: /^Stop/ })).toHaveCount(0);
await expect(rail.getByTestId('session-row-now')).toHaveCount(0);
/** The docked rail is a layout choice: it is still there after a reload. */
/** Showing itself for running work is not a remembered choice: after a reload nothing
* is running, and the rail is closed. Opened by hand it is a layout choice, and it is
* still there after the next one. */
await panel.getByRole('button', { name: 'Close' }).click();
await page.reload();
await expect(toggle).toHaveAccessibleName('Session');
await expect(rail).toHaveCount(0);
await toggle.click();
await expect(rows).toHaveCount(2);
await page.reload();
await expect(rail).toBeVisible();
await expect(rows).toHaveCount(2);
await rail.getByRole('button', { name: 'Close session' }).click();

View file

@ -334,6 +334,9 @@ interface:
# List a conversation's subagents and background tasks in a rail beside the chat, opened
# from the chat header. Set false to list them in a header popover instead. Default: true.
sessionRail: true
# Show the session rail by itself when work starts running in a conversation (desktop only;
# closing it keeps it closed for that conversation). Default: true.
sessionRailAutoOpen: true
# Ask each viewer before loading Google Tag Manager (ANALYTICS_GTM_ID).
# Set false when the deployment settles consent itself, e.g. internal use. Default: true.
# analyticsConsent: true

View file

@ -3572,6 +3572,11 @@ export const interfaceSchema = z
* background tasks, opened from the chat header. Enabled by default; false restores
* the header button that lists them in a popover and appears only once there are any. */
sessionRail: z.boolean().optional(),
/** Shows the session rail by itself when work starts running in a conversation, on
* screens wide enough to dock it. Enabled by default; false leaves the rail to the
* header control, as it was. A reader who closes it is not shown it again for that
* conversation either way. */
sessionRailAutoOpen: z.boolean().optional(),
/** Asks each viewer for consent before Google Tag Manager (`ANALYTICS_GTM_ID`)
* loads. A deployment that settles consent itself, such as an internal one
* covered by its own policy, can set false to load the container without the
@ -3817,6 +3822,7 @@ export const interfaceSchema = z
artifactUndocking: true,
sideChat: true,
sessionRail: true,
sessionRailAutoOpen: true,
feedback: true,
peoplePicker: {
users: true,

View file

@ -272,6 +272,24 @@ describe('loadDefaultInterface', () => {
expect(interfaceConfig?.sessionRail).toBe(true);
});
it('carries a disabled session rail auto-open flag to the clients', async () => {
const interfaceConfig = await loadDefaultInterface({
config: { interface: { sessionRailAutoOpen: false } },
configDefaults: getConfigDefaults(),
});
expect(interfaceConfig?.sessionRailAutoOpen).toBe(false);
});
it('opens the session rail by itself by default', async () => {
const interfaceConfig = await loadDefaultInterface({
config: {},
configDefaults: getConfigDefaults(),
});
expect(interfaceConfig?.sessionRailAutoOpen).toBe(true);
});
it('carries a disabled analytics consent prompt to the clients', async () => {
const interfaceConfig = await loadDefaultInterface({
config: { interface: { analyticsConsent: false } },

View file

@ -104,6 +104,7 @@ export async function loadDefaultInterface({
artifactUndocking: interfaceConfig?.artifactUndocking ?? defaults.artifactUndocking,
sideChat: interfaceConfig?.sideChat ?? defaults.sideChat,
sessionRail: interfaceConfig?.sessionRail ?? defaults.sessionRail,
sessionRailAutoOpen: interfaceConfig?.sessionRailAutoOpen ?? defaults.sessionRailAutoOpen,
analyticsConsent: interfaceConfig?.analyticsConsent,
contextCost: interfaceConfig?.contextCost ?? defaults.contextCost,
feedback: interfaceConfig?.feedback ?? defaults.feedback,