feat(settings): light mode toggle + manual update check - #24
Merged
Conversation
Adds two Settings controls that were on the TODO list:
**Appearance — Light Mode toggle.** Theme-aware tokens (autonomi-dark /
surface / border / text / muted) are now resolved through CSS custom
properties. Dark values live in the Tailwind fallback so the default
palette is unchanged; adding `light` to <html> activates the overrides
defined in assets/css/main.css. Zero component markup changes — every
existing `bg-autonomi-dark`, `text-autonomi-text`, etc. remaps at
runtime. A small `useTheme` composable watches settings and keeps
<html>.classList and AppKit's themeMode in sync. The preference
persists via the existing load_config / save_config Tauri commands
(new `theme_mode` field on AppConfig, defaults to "dark" via
#[serde(default)] so existing config.toml files upgrade cleanly).
**Software — Check for Updates.** Previously the updater only ran
once on app launch, so long-running sessions never saw new releases.
Settings now has a Software block with the current app version and a
manual "Check for Updates" button that calls `updaterStore.check-
ForUpdate()` on demand. `checkForUpdate()` now tracks `checking` /
`lastCheckedAt` state and returns a CheckResult so callers can toast
appropriately ("Update available", "You're on the latest version",
or the error). The sidebar's existing "Update Available" button and
the shared UpdateDialog continue to work unchanged.
Known limitation: no visual browser test — UI logic is covered by
Nuxt typecheck, the Vitest suite (19/19), a full Nuxt prod build,
and `cargo check` for the Rust config change. First paint in light
mode will briefly show dark (until loadConfig resolves); acceptable
as a follow-up.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only `data_map_file` previously had the attribute. If any of `name`, `size_bytes`, `address`, `cost`, or `uploaded_at` is ever renamed, removed, or migrates to a new required field, deserializing an older `upload_history.json` would fail the whole file and silently wipe the user's entire upload history on upgrade. Applying #[serde(default)] to every field makes the struct fully forward-compatible: missing fields in an on-disk entry now parse as their type's default (empty String, 0, None) rather than erroring out the whole load. Individual entries with missing required-feeling fields will still look incomplete in the UI, but the rest of the history survives, which is the right tradeoff for a user-facing log.
Nic-dorman
force-pushed
the
feat/settings-appearance-and-updates
branch
from
April 16, 2026 19:07
2083d86 to
dac05b3
Compare
This was referenced Apr 16, 2026
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.
Rebased onto main (
32e7a94, post PR #22 merge). Closes two TODO-list items fromMEMORY.md, plus a small robustness fix.Summary
1. Appearance — Light Mode toggle
autonomi-*Tailwind tokens now resolve through CSS custom properties; dark is the fallback (nolightclass on<html>), light-mode values live inassets/css/main.cssunder:root.lightbg-autonomi-dark,text-autonomi-text, etc. remaps at runtimeload_config/save_config(newtheme_modefield,#[serde(default)]so existing configs upgrade cleanly)useThemecomposable keeps<html>.classListand AppKit'sthemeModein sync2. Software — Check for Updates
app.vuemount — long-running sessions never saw new releasesupdaterStore.checkForUpdate()now trackschecking/lastCheckedAt, returns aCheckResultso the button can toast "Update available", "You're on the latest version", or the errorUpdateDialogkeep working unchanged3. Config robustness — retrofit
#[serde(default)]acrossUploadHistoryEntry(second commit)data_map_filehad the attribute. Every other field (name,size_bytes,address,cost,uploaded_at) lacked it.upload_history.jsonwould fail to deserialize and user's history gets silently wiped on upgrade.Test plan
Automated:
npx nuxi typecheck— cleannpm run test:run— 19/19 passingcargo check(src-tauri) — compiles cleanManual (pre-merge):
upload_history.json(missingdata_map_file) — history loads, rows show with empty datamap linkNotes
loadConfigresolves. Acceptable for v1; can be fixed later with a localStorage mirror.🤖 Generated with Claude Code