Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(ui): hide theme and ambient buttons when sidebar is collapsed

Adam Eivy7c2da9ca1318
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index 4f0d406f34..64fd627f53 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -608,7 +608,7 @@ export default function Layout() {
<div className="flex items-center gap-1">
<NavLink
to="/ambient"
- className={`p-1.5 rounded-lg transition-colors ${
+ className={`p-1.5 rounded-lg transition-colors ${collapsed ? 'lg:hidden' : ''} ${
isActive('/ambient')
? 'text-port-accent'
: 'text-gray-500 hover:text-white'
@@ -618,7 +618,7 @@ export default function Layout() {
>
<Monitor size={18} />
</NavLink>
- <ThemeSwitcher />
+ <ThemeSwitcher className={collapsed ? 'lg:hidden' : ''} />
<NotificationDropdown
notifications={notifications}
unreadCount={unreadCount}
diff --git a/client/src/components/ThemeSwitcher.jsx b/client/src/components/ThemeSwitcher.jsx
index 9b199cd8a5..5638382e48 100644
--- a/client/src/components/ThemeSwitcher.jsx
+++ b/client/src/components/ThemeSwitcher.jsx
@@ -2,7 +2,7 @@ import { useState, useRef, useEffect } from 'react';
import { Palette } from 'lucide-react';
import { useThemeContext } from './ThemeContext';
-export default function ThemeSwitcher({ position = 'above' }) {
+export default function ThemeSwitcher({ position = 'above', className = '' }) {
const { themeId, themes, setTheme } = useThemeContext();
const [open, setOpen] = useState(false);
const containerRef = useRef(null);
@@ -28,7 +28,7 @@ export default function ThemeSwitcher({ position = 'above' }) {
}, [open]);
return (
- <div ref={containerRef} className="relative">
+ <div ref={containerRef} className={`relative ${className}`}>
<button
onClick={() => setOpen(!open)}
className="p-1.5 text-gray-500 hover:text-port-accent transition-colors"