Skip to content

Add dark mode with persistent preference storage - #8

Closed
ClaytonWas with Copilot wants to merge 5 commits into
mainfrom
copilot/add-dark-mode-support
Closed

ClaytonWas with Copilot wants to merge 5 commits into
mainfrom
copilot/add-dark-mode-support

Conversation

Copilot AI commented Feb 1, 2026 •

Copy link
Copy Markdown

Implements system-wide dark mode toggle with preference persistence via Rust backend, maintaining architectural consistency with existing settings infrastructure.

Implementation

Backend (Rust)

  • Extended AppSettings struct with dark_mode: bool field
  • Added Tauri commands: get_dark_mode(), set_dark_mode()
  • Persists to settings.json alongside other app preferences

Frontend (React)

  • New "Appearance" section in Settings with toggle control
  • Applies .dark class to root element, activating Tailwind dark: variants
  • Auto-initializes on app launch from stored preference

Theme

  • Extended glass morphism aesthetic to dark palette
  • Comprehensive CSS coverage: backgrounds, borders, text, scrollbars, hover states
  • All 8 React components support both themes via dark: class variants
// Typical component pattern
<div className="bg-white dark:bg-slate-800 
                text-gray-900 dark:text-gray-100
                border-gray-200 dark:border-slate-700">

Architecture Note

Uses Rust backend for consistency with existing settings (download_directory, auto_extract_tarballs, relay_server_url). Alternative localStorage approach would work but deviates from established pattern.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits February 1, 2026 18:13
Co-authored-by: ClaytonWas <142272828+ClaytonWas@users.noreply.github.com>
Co-authored-by: ClaytonWas <142272828+ClaytonWas@users.noreply.github.com>
Co-authored-by: ClaytonWas <142272828+ClaytonWas@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dark mode support to application Add dark mode support Feb 1, 2026
Copilot AI requested a review from ClaytonWas February 1, 2026 18:28
Copilot AI changed the title Add dark mode support Add dark mode with persistent preference storage Feb 1, 2026
@ClaytonWas

Copy link
Copy Markdown
Owner

@copilot why cant i run this code locally?

Copilot AI commented Feb 1, 2026

Copy link
Copy Markdown
Author

@copilot why cant i run this code locally?

The dark mode changes are frontend code that works fine, but Tauri apps require system dependencies to run locally. The most common issue is missing WebKit2GTK libraries.

Quick fix based on your OS:

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev

macOS:

xcode-select --install

Windows:

  • Install Visual Studio C++ Build Tools
  • Install WebView2 Runtime

Then run:

npm install
npm run tauri dev

Common errors:

  • failed to run custom build command for 'glib-sys' → Missing Linux dependencies above
  • cargo: command not found → Install Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • WebView2 not found (Windows) → Install WebView2 Runtime

See the Tauri prerequisites guide for detailed setup instructions for your platform.

@ClaytonWas
ClaytonWas marked this pull request as ready for review February 1, 2026 19:07
@ClaytonWas ClaytonWas closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants