From 3e11956c1521781ee6b0bc44cec5e20e682be2f3 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 25 Sep 2026 10:03:17 -0500 Subject: [PATCH] fix(desktop): mark the File Browser setting session-only in Simple mode Simple mode shadows fileBrowserOpen, so a flip on this row lands in the session reveal layer and never persists. Show the same Simple-mode note the other shadowed Appearance rows carry, so the row doesn't promise a standing default it can't keep. --- .../src/app/settings/appearance-settings.tsx | 6 +++-- .../settings/file-browser-setting.test.tsx | 24 ++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) 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') + }) })