diff --git a/apps/desktop/src/app/settings/appearance-settings.tsx b/apps/desktop/src/app/settings/appearance-settings.tsx index 90ae693ffb..2c46095ab5 100644 --- a/apps/desktop/src/app/settings/appearance-settings.tsx +++ b/apps/desktop/src/app/settings/appearance-settings.tsx @@ -432,6 +432,7 @@ export function AppearanceSettings({ subpage }: AppearanceSettingsProps = {}) { const embedAllowed = useStore($embedAllowed) const composerPopoutGesturesEnabled = useStore($composerPopoutGesturesEnabled) const fileBrowserOpen = useStore($fileBrowserOpen) + const fileBrowserShadowed = useStore($modeShadowed('fileBrowserOpen')) const translucency = useStore($translucency) const glassMode = translucency.mode === 'glass' && GLASS_SUPPORTED const userBubbleTransparency = useStore($userBubbleTransparency) @@ -927,11 +928,12 @@ export function AppearanceSettings({ subpage }: AppearanceSettingsProps = {}) { )} {/* The same state as the titlebar toggle / ⌘J, which persists across - launches — so this is the file browser's standing default. */} + launches — so this is the file browser's standing default. Simple + mode shadows it; a flip there only lasts the session, so say so. */} {show('window-layout') && ( { cleanup() - act(() => setFileBrowserOpen(false)) + act(() => { + $interfaceMode.set('advanced') + setFileBrowserOpen(false) + }) }) function fileBrowserSwitch() { @@ -51,4 +56,21 @@ describe('File Browser setting', () => { expect(toggle.getAttribute('aria-checked')).toBe('true') }) + + it('says a flip is session-only while Simple mode decides the value', () => { + const note = en.interfaceMode.sessionNote + + act(() => $interfaceMode.set('simple')) + const toggle = fileBrowserSwitch() + + expect(screen.getByText(content => content.includes(note))).toBeTruthy() + + // Simple shadows the preference: the click is a session reveal, not a new default. + fireEvent.click(toggle) + expect(toggle.getAttribute('aria-checked')).toBe('true') + + act(() => $interfaceMode.set('advanced')) + expect(screen.queryByText(content => content.includes(note))).toBeNull() + expect(toggle.getAttribute('aria-checked')).toBe('false') + }) })