Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(ui): persist system theme selection across reloads

cyh27134be7eeaf
diff --git a/ui/src/context/ThemeContext.tsx b/ui/src/context/ThemeContext.tsx
index 7c1f05eb8..895bbad08 100644
--- a/ui/src/context/ThemeContext.tsx
+++ b/ui/src/context/ThemeContext.tsx
@@ -77,11 +77,10 @@ export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({ childre
setModeState(nextMode);
try {
- if (nextMode === 'system') {
- window.localStorage.removeItem(STORAGE_KEY);
- } else {
- window.localStorage.setItem(STORAGE_KEY, nextMode);
- }
+ // Persist all modes including "system" so the choice survives reloads;
+ // removing the key would let readStoredTheme() fall back to the dark
+ // default and silently drop system-follow behavior.
+ window.localStorage.setItem(STORAGE_KEY, nextMode);
} catch {
// Ignore storage issues.
}