Skip to content

Commit 54e713a

Browse files
Merge pull request #824 from Light-Heart-Labs/fix/sidebar-theme-compliance
fix(dashboard): replace hardcoded sidebar styles with theme-aware CSS custom properties
2 parents 08d2336 + a6e4181 commit 54e713a

File tree

2 files changed

+73
-26
lines changed

2 files changed

+73
-26
lines changed

dream-server/extensions/services/dashboard/src/components/Sidebar.jsx

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export default function Sidebar({ status, collapsed, onToggle }) {
1919
const [serviceTokens, setServiceTokens] = useState({})
2020
const [apiLinks, setApiLinks] = useState([])
2121
const [showAllQuickLinks, setShowAllQuickLinks] = useState(false)
22-
const dreamSidebarAccent = '#8a2cff'
23-
const dreamSidebarAccentSoft = '#b56dff'
2422

2523
useEffect(() => {
2624
fetch('/api/service-tokens')
@@ -90,28 +88,25 @@ export default function Sidebar({ status, collapsed, onToggle }) {
9088
<aside
9189
className={`fixed left-0 top-0 h-screen ${collapsed ? 'w-20' : 'w-64'} flex flex-col transition-all duration-200`}
9290
style={{
93-
background: `
94-
radial-gradient(circle at top left, rgba(138,44,255,0.2), transparent 28%),
95-
linear-gradient(180deg, #1a1722 0%, #17131f 58%, #110f17 100%)
96-
`,
97-
borderRight: '1px solid rgba(138,44,255,0.16)',
91+
background: `var(--sidebar-bg-glow), var(--sidebar-bg)`,
92+
borderRight: '1px solid var(--sidebar-border)',
9893
boxShadow: 'inset -1px 0 0 rgba(255,255,255,0.04)',
9994
}}
10095
>
10196
{/* Logo */}
102-
<div className="px-4 pt-6 pb-5 border-b overflow-hidden" style={{ borderColor: 'rgba(138,44,255,0.14)' }}>
97+
<div className="px-4 pt-6 pb-5 border-b overflow-hidden" style={{ borderColor: 'var(--sidebar-border)' }}>
10398
{collapsed ? (
10499
<div className="flex flex-col items-center">
105100
<div
106101
className="flex h-11 w-11 items-center justify-center rounded-xl border"
107102
style={{
108-
background: 'linear-gradient(180deg, rgba(138,44,255,0.18), rgba(138,44,255,0.06))',
109-
borderColor: 'rgba(181,109,255,0.24)',
103+
background: `linear-gradient(180deg, color-mix(in srgb, var(--sidebar-accent) 18%, transparent), color-mix(in srgb, var(--sidebar-accent) 6%, transparent))`,
104+
borderColor: `color-mix(in srgb, var(--sidebar-accent-soft) 24%, transparent)`,
110105
}}
111106
>
112-
<span className="text-lg font-black tracking-tight" style={{ color: dreamSidebarAccentSoft }}>DS</span>
107+
<span className="text-lg font-black tracking-tight" style={{ color: 'var(--sidebar-accent-soft)' }}>DS</span>
113108
</div>
114-
<p className="text-[8px] font-mono mt-2 tracking-[0.18em] uppercase" style={{ color: 'rgba(226,223,255,0.62)' }}>
109+
<p className="text-[8px] font-mono mt-2 tracking-[0.18em] uppercase" style={{ color: 'var(--sidebar-text-muted)' }}>
115110
v{status?.version || '...'}
116111
</p>
117112
</div>
@@ -130,10 +125,10 @@ export default function Sidebar({ status, collapsed, onToggle }) {
130125
\\__ \\ / _ \\ / ___/| | / // _ \\ / ___/
131126
___/ // __// / | |/ // __// /
132127
/____/ \\___//_/ |___/ \\___//_/`}</pre>
133-
<p className="text-[8px] font-mono tracking-[0.28em] mt-2.5 uppercase" style={{ color: dreamSidebarAccentSoft }}>
128+
<p className="text-[8px] font-mono tracking-[0.28em] mt-2.5 uppercase" style={{ color: 'var(--sidebar-accent-soft)' }}>
134129
LOCAL AI // SOVEREIGN INTELLIGENCE
135130
</p>
136-
<p className="text-[10px] mt-1" style={{ color: 'rgba(226,223,255,0.72)' }}>
131+
<p className="text-[10px] mt-1" style={{ color: 'var(--sidebar-text-secondary)' }}>
137132
{status?.tier || 'Minimal'} • v{status?.version || '...'}
138133
</p>
139134
</>
@@ -157,8 +152,8 @@ export default function Sidebar({ status, collapsed, onToggle }) {
157152
}
158153
style={({ isActive }) => isActive
159154
? {
160-
border: '1px solid rgba(181,109,255,0.2)',
161-
boxShadow: '0 12px 28px rgba(126,34,206,0.24)',
155+
border: '1px solid var(--sidebar-active-border)',
156+
boxShadow: 'var(--sidebar-active-shadow)',
162157
}
163158
: {
164159
background: 'transparent',
@@ -174,17 +169,17 @@ export default function Sidebar({ status, collapsed, onToggle }) {
174169

175170
{/* External Links — hidden when collapsed */}
176171
{!collapsed && (
177-
<div className="mt-4 pt-4 border-t" style={{ borderColor: 'rgba(181,109,255,0.14)' }}>
172+
<div className="mt-4 pt-4 border-t" style={{ borderColor: 'var(--sidebar-border)' }}>
178173
<div className="mb-2 flex items-center justify-between px-3">
179-
<p className="text-[10px] font-semibold uppercase tracking-[0.24em]" style={{ color: dreamSidebarAccentSoft }}>
174+
<p className="text-[10px] font-semibold uppercase tracking-[0.24em]" style={{ color: 'var(--sidebar-accent-soft)' }}>
180175
Quick Links
181176
</p>
182177
{externalLinks.length > 0 && (
183178
<button
184179
type="button"
185180
onClick={() => setShowAllQuickLinks(current => !current)}
186181
className="text-[9px] font-mono uppercase tracking-[0.18em] transition-colors hover:text-theme-text"
187-
style={{ color: dreamSidebarAccentSoft }}
182+
style={{ color: 'var(--sidebar-accent-soft)' }}
188183
>
189184
{showAllQuickLinks ? 'Show open' : 'View all'}
190185
</button>
@@ -203,15 +198,15 @@ export default function Sidebar({ status, collapsed, onToggle }) {
203198
? 'hover:bg-white/[0.03]'
204199
: 'text-theme-text-muted/40 cursor-not-allowed'
205200
}`}
206-
style={healthy ? { color: 'rgba(238,236,255,0.82)' } : undefined}
201+
style={healthy ? { color: 'var(--sidebar-text)' } : undefined}
207202
>
208-
<span className="mt-0.5" style={{ color: healthy ? dreamSidebarAccentSoft : 'rgba(161,161,170,0.3)' }}>
203+
<span className="mt-0.5" style={{ color: healthy ? 'var(--sidebar-accent-soft)' : 'var(--sidebar-inactive)' }}>
209204
<Icon size={15} />
210205
</span>
211206
<span className="text-[12px] leading-4">{label}</span>
212207
<span
213208
className="ml-auto text-[9px] font-mono uppercase tracking-[0.18em]"
214-
style={{ color: healthy ? dreamSidebarAccentSoft : 'rgba(161,161,170,0.3)' }}
209+
style={{ color: healthy ? 'var(--sidebar-accent-soft)' : 'var(--sidebar-inactive)' }}
215210
>
216211
{healthy ? 'OPEN' : '—'}
217212
</span>
@@ -229,25 +224,25 @@ export default function Sidebar({ status, collapsed, onToggle }) {
229224
onClick={cycleTheme}
230225
className="flex items-center justify-center p-2 rounded-lg text-theme-text-muted hover:text-theme-text transition-colors"
231226
title={`Theme: ${labels[theme]} (click to cycle)`}
232-
style={{ background: 'rgba(255,255,255,0.02)' }}
227+
style={{ background: 'var(--sidebar-hover-bg)' }}
233228
>
234229
<Palette size={18} />
235230
</button>
236231
{!collapsed && (
237-
<span className="text-xs" style={{ color: 'rgba(220,204,255,0.72)' }}>{labels[theme]}</span>
232+
<span className="text-xs" style={{ color: 'var(--sidebar-label)' }}>{labels[theme]}</span>
238233
)}
239234
<button
240235
onClick={onToggle}
241236
className={`${collapsed ? '' : 'ml-auto'} flex items-center justify-center p-2 rounded-lg text-theme-text-muted hover:text-theme-text transition-colors`}
242237
title={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}
243-
style={{ background: 'rgba(255,255,255,0.02)' }}
238+
style={{ background: 'var(--sidebar-hover-bg)' }}
244239
>
245240
{collapsed ? <ChevronRight size={18} /> : <ChevronLeft size={18} />}
246241
</button>
247242
</div>
248243

249244
{/* Status Footer */}
250-
<div className="p-4 border-t" style={{ borderColor: 'rgba(138,44,255,0.16)' }}>
245+
<div className="p-4 border-t" style={{ borderColor: 'var(--sidebar-border)' }}>
251246
{!collapsed && (
252247
<div className="flex items-center justify-between text-sm mb-2">
253248
<span className="text-theme-text-muted">Services</span>

dream-server/extensions/services/dashboard/src/index.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@
5050
--liquid-button-fill: linear-gradient(135deg, rgba(157, 0, 255, 0.98), rgba(120, 24, 216, 0.96));
5151
--liquid-nav-fill: linear-gradient(135deg, rgba(157, 0, 255, 0.96), rgba(120, 24, 216, 0.94));
5252
--liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
53+
--sidebar-bg: linear-gradient(180deg, #1a1722 0%, #17131f 58%, #110f17 100%);
54+
--sidebar-bg-glow: radial-gradient(circle at top left, rgba(157,0,255,0.2), transparent 28%);
55+
--sidebar-border: rgba(157,0,255,0.16);
56+
--sidebar-accent: #8a2cff;
57+
--sidebar-accent-soft: #b56dff;
58+
--sidebar-text: rgba(226,223,255,0.82);
59+
--sidebar-text-muted: rgba(226,223,255,0.62);
60+
--sidebar-text-secondary: rgba(226,223,255,0.72);
61+
--sidebar-label: rgba(220,204,255,0.72);
62+
--sidebar-active-border: rgba(181,109,255,0.2);
63+
--sidebar-active-shadow: 0 12px 28px rgba(126,34,206,0.24);
64+
--sidebar-hover-bg: rgba(255,255,255,0.02);
65+
--sidebar-inactive: rgba(161,161,170,0.3);
5366
}
5467

5568
/* Lemonade — warm parchment theme matching lemonade-server.ai branding */
@@ -95,6 +108,19 @@
95108
--liquid-button-fill: linear-gradient(135deg, rgba(245,197,24,0.92), rgba(226,178,15,0.9));
96109
--liquid-nav-fill: linear-gradient(135deg, rgba(245,197,24,0.92), rgba(226,178,15,0.88));
97110
--liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(0,0,0,0.04));
111+
--sidebar-bg: linear-gradient(180deg, #EFE4C6 0%, #E8DCBA 58%, #E2D5B0 100%);
112+
--sidebar-bg-glow: radial-gradient(circle at top left, rgba(245,197,24,0.15), transparent 28%);
113+
--sidebar-border: rgba(196,176,120,0.3);
114+
--sidebar-accent: #D4A810;
115+
--sidebar-accent-soft: #B8920D;
116+
--sidebar-text: #3D3626;
117+
--sidebar-text-muted: #8A8478;
118+
--sidebar-text-secondary: #6B665C;
119+
--sidebar-label: #8A8478;
120+
--sidebar-active-border: rgba(245,197,24,0.3);
121+
--sidebar-active-shadow: 0 12px 28px rgba(180,140,10,0.12);
122+
--sidebar-hover-bg: rgba(0,0,0,0.03);
123+
--sidebar-inactive: rgba(138,132,120,0.4);
98124
}
99125

100126
/* Light — clean modern futuristic light theme */
@@ -139,6 +165,19 @@
139165
--liquid-button-fill: linear-gradient(135deg, rgba(37,99,235,0.94), rgba(29,78,216,0.9));
140166
--liquid-nav-fill: linear-gradient(135deg, rgba(37,99,235,0.94), rgba(29,78,216,0.88));
141167
--liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.04));
168+
--sidebar-bg: linear-gradient(180deg, #EAEAEC 0%, #E4E4E7 58%, #DDDDE0 100%);
169+
--sidebar-bg-glow: radial-gradient(circle at top left, rgba(37,99,235,0.1), transparent 28%);
170+
--sidebar-border: rgba(161,161,170,0.3);
171+
--sidebar-accent: #2563EB;
172+
--sidebar-accent-soft: #3B82F6;
173+
--sidebar-text: #27272A;
174+
--sidebar-text-muted: #A1A1AA;
175+
--sidebar-text-secondary: #52525B;
176+
--sidebar-label: #A1A1AA;
177+
--sidebar-active-border: rgba(37,99,235,0.25);
178+
--sidebar-active-shadow: 0 12px 28px rgba(37,99,235,0.12);
179+
--sidebar-hover-bg: rgba(0,0,0,0.03);
180+
--sidebar-inactive: rgba(161,161,170,0.4);
142181
}
143182

144183
/* Arctic — cool light theme with ice blue accents */
@@ -183,6 +222,19 @@
183222
--liquid-button-fill: linear-gradient(135deg, rgba(14,165,233,0.94), rgba(2,132,199,0.9));
184223
--liquid-nav-fill: linear-gradient(135deg, rgba(14,165,233,0.94), rgba(2,132,199,0.88));
185224
--liquid-progress-track: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.04));
225+
--sidebar-bg: linear-gradient(180deg, #E4EEF8 0%, #DCE8F4 58%, #D4E2F0 100%);
226+
--sidebar-bg-glow: radial-gradient(circle at top left, rgba(14,165,233,0.12), transparent 28%);
227+
--sidebar-border: rgba(168,200,232,0.4);
228+
--sidebar-accent: #0EA5E9;
229+
--sidebar-accent-soft: #38BDF8;
230+
--sidebar-text: #1A2332;
231+
--sidebar-text-muted: #8AA0B8;
232+
--sidebar-text-secondary: #4A6178;
233+
--sidebar-label: #8AA0B8;
234+
--sidebar-active-border: rgba(14,165,233,0.25);
235+
--sidebar-active-shadow: 0 12px 28px rgba(14,165,233,0.12);
236+
--sidebar-hover-bg: rgba(0,0,0,0.03);
237+
--sidebar-inactive: rgba(138,160,184,0.4);
186238
}
187239

188240
/* ── Card styling (shadow + radius from theme) ──────────── */

0 commit comments

Comments
 (0)