Skip to content

feat(web): full color themes with separate light and dark picks - #102

Merged
nixuuu merged 1 commit into
devfrom
feat/full-themes
Nov 4, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/full-themes

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 4, 2026

Copy link
Copy Markdown
Member

Themes now recolor the whole app, not just the accent, and look like Canopy rather than T3 Code.

  • Palettes: each theme has light and dark sets for background and surfaces (sidebar, panels, cards, popovers, composer), borders, text and muted text, hover/selection, accent, focus rings and status colours, as CSS variables layered over the existing palette (shared kit and shell migrated to the tokens). Themes: Birch (chalk/blue), Fern (forest green), Lagoon (sea), Cedar (sand/wood), Heather (lilac/violet), Blossom (rose/mulberry). Lowest measured contrast: primary text 10.61:1, secondary 4.56:1, status 4.99:1 (table in docs/appearance.md).
  • Picker: mini previews of the app chrome per theme in two columns, Light and Dark (chosen over swatch strips and leaf labels after comparing options). Pick the light palette from one theme and the dark from another; the System/Light/Dark scheme decides which is shown. Both choices are marked and keyboard/screen-reader accessible (kit control, no native radios). Uses the compact settings rows from feat(web): make settings compact and easier to scan #96.
  • Persistence: light and dark picks saved per owner (additive contract), synced across devices; SSR emits both palettes before render (no flash); the desktop caches them for the window background and title-bar colours.

Checks: install, gen:check, typecheck, lint, format:check, check:tmp (1044 pass, 152 skip, 0 fail), web build. Every theme checked in light and dark, the mixed selection, and the main surfaces at desktop and phone widths. The native Electron title bar colours still need a look in the packaged app.

@nixuuu
nixuuu merged commit adf7fac into dev Nov 4, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/full-themes branch November 4, 2026 21:02
nixuuu added a commit that referenced this pull request Nov 21, 2026
## Changes

- Keep the saved Electron appearance on the loading screen when the
gateway cannot supply settings. A reload during an outage otherwise uses
the browser defaults and writes them to the desktop cache, which can
turn the next database startup screen white.
- Apply the cached color scheme and both palettes in the document head.
A gateway response still takes precedence when it contains appearance
settings.

Thanks to @mikuyeyu for reporting the startup flash.

Fixes: #102

## Verification

- Reproduced the white “Starting PostgreSQL…” screen in Electron on
nix-pc (Linux). The new live regression fails against the previous web
build because the offline reload replaces the saved Dark scheme with
System.
- On nix-pc, the production web build and the live Electron regression
passed. The regression covers explicit Dark and Light against the
opposite system preference, both System preferences, and persistence
across an offline reload. The same regression checks the palette on the
startup and migration screens after integrating the latest dev revision.
Desktop typecheck and targeted formatting and lint also passed.
- Checked the loading HTML in Chromium before the app initialized at
desktop and phone widths. Both palettes, System, and gateway settings
taking precedence rendered as expected.
- The Android native client was checked on an isolated emulator. It has
its own native launch and gateway connection screens. Electron’s
database startup screen does not exist on mobile.
- No UI copy changed. GitHub Actions runs the full repository checks.
nixuuu added a commit that referenced this pull request Nov 23, 2026
## Cause and fix

Windows and Linux use a renderer-drawn title bar. Opening Settings makes
the underlying page inert and removes its drag regions. The Settings
dialog has its own drag region, while the window's usual top strip has
none.

Keep a native drag strip at the top of the window while Settings is the
active modal. It ends before the window buttons and is suspended by
nested modals, popovers that normally suspend dragging, and fullscreen.
The dialog and backdrop still control input and focus.

Thanks to @mikuyeyu for reporting this.

Fixes: #102

## Verification

- Locally on Linux, Electron 45.4.1 with the Canopy renderer. Reproduced
on `3ecbde88`: dragging at the top did not move the window with Settings
open, while the dialog header moved it. On `2ab71386`, both areas move
the window and keep Settings open. Tested focus and Escape, nested
modal, backdrop dismissal, Close settings, and dragging, maximizing and
restoring after closing Settings.
- On the same Linux runtime, the renderer's Windows CSS path at 900 px
passed window movement and modal/close checks. Chrome without the
desktop bridge kept Settings modal and restored focus on Escape. Native
Windows behavior was not exercised.
- Web typecheck, targeted lint, formatting, and diff check passed
locally. The repository-wide gate runs in CI.

Co-authored-by: Damian Plewa <[email protected]>
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.

1 participant