Checkpoint: glass theme fix
This commit is contained in:
parent
bfe14f0d97
commit
1aae81ca04
1 changed files with 95 additions and 1 deletions
|
|
@ -1,4 +1,98 @@
|
||||||
# Checkpoint — Neon theme (2026-08-24)
|
# Checkpoint — Glass theme fix (2026-08-24)
|
||||||
|
|
||||||
|
A stopping point you can return to if this session is closed. Everything below was
|
||||||
|
verified green at the moment this file was written.
|
||||||
|
|
||||||
|
## Where things are
|
||||||
|
|
||||||
|
- Project: `/home/avi/Projects/Nostr_Keynctr`
|
||||||
|
- Git repo: `master` @ `bfe14f0` ("Fix glass theme: repair broken Default impl
|
||||||
|
that blocked all builds"). Before it: `db2d22f` (glass theme added),
|
||||||
|
`a01f258` (system theme removed), `c080a8d` (icon), `90d699c` (neon).
|
||||||
|
- Working tree: clean apart from this checkpoint update. Note: `concept3.svg`
|
||||||
|
still shows as deleted and `KeynectrAppIconPossibility02.jpeg` is untracked —
|
||||||
|
left exactly as the user had them, not committed.
|
||||||
|
|
||||||
|
## What was completed
|
||||||
|
|
||||||
|
1. **Root cause found: the repo did not compile since `a01f258`.** That commit
|
||||||
|
removed `Theme::System` from the enum but missed `Settings::default()`
|
||||||
|
(`src/settings.rs` still said `theme: Theme::System`). Every rebuild failed,
|
||||||
|
so the desktop app kept spawning an old `target/release/keynectr` binary
|
||||||
|
from before glass existed — which rejected `'glass'` on save ("nothing
|
||||||
|
happens") and explains the flaky "Rust backend exited unexpectedly"
|
||||||
|
launches.
|
||||||
|
2. **Fixes in `bfe14f0`:**
|
||||||
|
- `src/settings.rs`: default theme is now `Theme::Light`.
|
||||||
|
- `src/main.rs`: CLI error message lists `light, dark, glass, neon`
|
||||||
|
(no stale "system").
|
||||||
|
- `frontend/src/styles.css`: removed ~600 lines of garbage — 24 broken
|
||||||
|
`:root[data-theme='glass']` blocks nested *inside* the neon rule (a bad
|
||||||
|
edit had interleaved them). One clean neon block + one clean glass block
|
||||||
|
remain, values preserved.
|
||||||
|
- `frontend/src/state/AppProvider.tsx`: theme now applies reactively — a
|
||||||
|
`useEffect` watches `state.settings.theme` and calls `applyTheme()`,
|
||||||
|
replacing the mount-only `useThemeSync()` call, so picking Glass/Neon
|
||||||
|
updates `data-theme` on `<html>` immediately.
|
||||||
|
3. Rebuilt both artifacts the app actually runs: `cargo build --release`
|
||||||
|
(Electron spawns `target/release/keynectr`, see `electron/main.ts:82`) and
|
||||||
|
`npm run build` (renderer loads `dist/`).
|
||||||
|
|
||||||
|
## Commits added most recently
|
||||||
|
|
||||||
|
- `bfe14f0` Fix glass theme: repair broken Default impl that blocked all builds
|
||||||
|
|
||||||
|
## Verification commands run (all green)
|
||||||
|
|
||||||
|
Rust (repo root):
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo test # 113 passed; 0 failed
|
||||||
|
cargo clippy --all-targets # only pre-existing warnings in src/profiles.rs
|
||||||
|
cargo fmt --check # clean
|
||||||
|
cargo build --release # success
|
||||||
|
```
|
||||||
|
|
||||||
|
Frontend (`frontend/`):
|
||||||
|
|
||||||
|
```
|
||||||
|
npm test # 14 files, 92 tests passed
|
||||||
|
npm run typecheck # clean
|
||||||
|
npm run lint # 0 errors
|
||||||
|
npm run format:check # clean
|
||||||
|
npm run electron:build # tsc electron main success
|
||||||
|
npm run build # vite build success
|
||||||
|
```
|
||||||
|
|
||||||
|
## How to use / reproduce
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~/Projects/Nostr_Keynctr/frontend && npm start
|
||||||
|
```
|
||||||
|
|
||||||
|
Settings → Appearance → Theme → **Glass** applies immediately (dark panels,
|
||||||
|
cyan `#7fdbff` accents) and persists to settings.json. Neon/Light/Dark behave
|
||||||
|
the same way.
|
||||||
|
|
||||||
|
CLI:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
B=~/Projects/Nostr_Keynctr/target/release/keynectr
|
||||||
|
$B settings set theme glass
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes & next steps
|
||||||
|
|
||||||
|
- If themes ever seem ignored again, first check `cargo check` passes — a
|
||||||
|
broken build silently leaves the stale release binary in place.
|
||||||
|
- Pre-existing clippy warnings in `src/profiles.rs` remain untouched (user
|
||||||
|
asked for theme-only changes).
|
||||||
|
- Electron GPU/Wayland messages (`--ozone-platform=wayland ... Vulkan`) are
|
||||||
|
environmental noise on this laptop, not app errors.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Older checkpoint — Neon theme (2026-08-24)
|
||||||
|
|
||||||
A stopping point you can return to if this session is closed. Everything below was
|
A stopping point you can return to if this session is closed. Everything below was
|
||||||
verified green at the moment this file was written.
|
verified green at the moment this file was written.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue