Apply theme/custom CSS in popped-out standalone tabs (ticket 025)

StandalonePage now calls useSettingsPanel() so colour scheme and any
active custom theme CSS are applied on mount and stay in sync with
settings changes, matching the main window's NavMenu-driven behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
Hugh Kaznowski
2026-09-05 19:32:00 +01:00
co-authored by Claude Sonnet 5
parent e6e5bc8f50
commit 8579a925d7
+6
View File
@@ -19,6 +19,7 @@ import {
type TimelineBucket, type TimelineBucket,
} from './lib/api' } from './lib/api'
import { DocsNavProvider } from './lib/docsNav' import { DocsNavProvider } from './lib/docsNav'
import { useSettingsPanel } from './lib/useSettingsPanel'
const POLL_MS = 2000 const POLL_MS = 2000
@@ -34,7 +35,12 @@ function parsePopOutQuery(): { section: PopOutSectionId | null; range: TimeRange
return { section, range } return { section, range }
} }
// Popped-out routes render outside NavMenu, which is otherwise the only place that calls `useSettingsPanel()` and applies the
// colour scheme / custom theme CSS as a side effect. Calling it here (state unused) keeps standalone tabs themed the same as
// the main window, including staying live if settings change while the tab is open.
function StandalonePage({ children }: { children: ReactNode }) { function StandalonePage({ children }: { children: ReactNode }) {
useSettingsPanel()
return ( return (
<DocsNavProvider> <DocsNavProvider>
<div className="h-screen w-screen overflow-auto">{children}</div> <div className="h-screen w-screen overflow-auto">{children}</div>