fix(desktop): persist theme and favorites across restarts#174
Merged
nadaverell merged 3 commits intomainfrom Feb 18, 2026
Merged
fix(desktop): persist theme and favorites across restarts#174nadaverell merged 3 commits intomainfrom
nadaverell merged 3 commits intomainfrom
Conversation
Desktop app uses Port: 0 which assigns a random OS port each launch. Since localStorage is origin-scoped, user preferences (theme, pinned resource kinds) were lost on every restart. Add server-side settings file at ~/.radar/settings.json and sync frontend state via REST API.
Query xdg-desktop-portal D-Bus interface to detect system color scheme on Linux and set GTK_THEME so WebKitGTK's prefers-color-scheme works on GNOME 42+. Add Wails Linux options with ProgramName and GPU policy OnDemand (fixes default Never when Linux is nil). Set MaxWidth/MaxHeight to 7680x4320 to prevent Wails auto-detection from constraining window sizing on Wayland.
PUT /api/settings was decoding into a fresh struct, so saving theme would zero out pinnedKinds and vice versa. Now decodes into the existing settings so only provided fields are overwritten. Also add console.warn logging to frontend catch blocks and backend settings.Load() for non-NotExist errors to aid debugging.
nadaverell
added a commit
that referenced
this pull request
Feb 19, 2026
* fix(desktop): persist theme and favorites across restarts Desktop app uses Port: 0 which assigns a random OS port each launch. Since localStorage is origin-scoped, user preferences (theme, pinned resource kinds) were lost on every restart. Add server-side settings file at ~/.radar/settings.json and sync frontend state via REST API. * fix(desktop): detect Linux dark theme and fix window maximize Query xdg-desktop-portal D-Bus interface to detect system color scheme on Linux and set GTK_THEME so WebKitGTK's prefers-color-scheme works on GNOME 42+. Add Wails Linux options with ProgramName and GPU policy OnDemand (fixes default Never when Linux is nil). Set MaxWidth/MaxHeight to 7680x4320 to prevent Wails auto-detection from constraining window sizing on Wayland. * fix(desktop): merge settings on PUT to prevent data loss PUT /api/settings was decoding into a fresh struct, so saving theme would zero out pinnedKinds and vice versa. Now decodes into the existing settings so only provided fields are overwritten. Also add console.warn logging to frontend catch blocks and backend settings.Load() for non-NotExist errors to aid debugging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.radar/settings.jsonKey files
internal/settings/settings.go— Settings load/save with atomic writeinternal/server/server.go—GET/PUT /api/settingswith read-modify-write semanticscmd/desktop/theme_linux.go— D-Bus color-scheme query, setsGTK_THEMEfor WebKitGTKcmd/desktop/theme_other.go— No-op stub for macOS/Windowscmd/desktop/main.go—applySystemTheme()call, Linux Wails options, MaxWidth/MaxHeightweb/src/context/ThemeContext.tsx,web/src/hooks/useFavorites.ts— Server sync + error logging