Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(settings): add embedded mode to ThemeStudioPanel

Steven Enamakel6b484bb2060e
diff --git a/app/src/components/settings/panels/ThemeStudioPanel.tsx b/app/src/components/settings/panels/ThemeStudioPanel.tsx
index 78e724d73b..c3acf9822d 100644
--- a/app/src/components/settings/panels/ThemeStudioPanel.tsx
+++ b/app/src/components/settings/panels/ThemeStudioPanel.tsx
@@ -104,7 +104,12 @@ function importedBackdrop(parsed: Partial<Theme>): Theme['backdrop'] {
};
}
-const ThemeStudioPanel = () => {
+interface ThemeStudioPanelProps {
+ /** Render the sections only — the host draws the page header. */
+ embedded?: boolean;
+}
+
+const ThemeStudioPanel = ({ embedded = false }: ThemeStudioPanelProps = {}) => {
const { t } = useT();
const dispatch = useAppDispatch();
const families = selectThemeFamilies();
@@ -176,8 +181,8 @@ const ThemeStudioPanel = () => {
channelLuminance(readToken('content')) - channelLuminance(readToken('surface-canvas'))
) < 0.2;
- return (
- <SettingsPanel description={t('settings.theme.menuDesc', 'Customize colours and fonts.')}>
+ const body = (
+ <>
{/* ── Theme gallery: family tiles + one Light/Dark/Auto toggle ──── */}
<div>
<div className="mb-2 flex items-center justify-between px-1">
@@ -505,6 +510,20 @@ const ThemeStudioPanel = () => {
</Button>
</div>
</SettingsSection>
+ </>
+ );
+
+ // Embedded: the Appearance page owns the header and renders these sections
+ // among its own. That is the only host today — `/settings/theme` redirects to
+ // `/settings/appearance`, because a separate "Theme studio" page split one
+ // subject across two sidebar rows whose light/dark toggles wrote the same two
+ // slice fields (`setThemeMode` and `setThemeVariant` are identical). The
+ // unembedded branch is kept for a standalone host.
+ if (embedded) return body;
+
+ return (
+ <SettingsPanel description={t('settings.theme.menuDesc', 'Customize colours and fonts.')}>
+ {body}
</SettingsPanel>
);
};