From bccc827dbfb7f026cb5c628b6839206449902bf3 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Tue, 14 Jul 2026 16:59:57 -0400 Subject: [PATCH] refactor(desktop): trim backdrop store to match tool-view style --- apps/desktop/src/store/backdrop.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/apps/desktop/src/store/backdrop.ts b/apps/desktop/src/store/backdrop.ts index 4d2ecb4381d8..cecc718026fe 100644 --- a/apps/desktop/src/store/backdrop.ts +++ b/apps/desktop/src/store/backdrop.ts @@ -1,21 +1,14 @@ -/** - * Chat backdrop image (the faint statue behind the transcript). One boolean, - * on by default. Purely presentational renderer state — the `Backdrop` - * component just skips rendering when it's off. - */ - import { atom } from 'nanostores' import { persistBoolean, storedBoolean } from '@/lib/storage' const KEY = 'hermes.desktop.backdrop.v1' -export const $backdrop = atom(typeof window === 'undefined' ? true : storedBoolean(KEY, true)) +/** Whether the faint statue image renders behind the chat transcript. */ +export const $backdrop = atom(storedBoolean(KEY, true)) -export function setBackdrop(on: boolean): void { +$backdrop.subscribe(on => persistBoolean(KEY, on)) + +export function setBackdrop(on: boolean) { $backdrop.set(on) } - -if (typeof window !== 'undefined') { - $backdrop.subscribe(on => persistBoolean(KEY, on)) -}