Skip to content

refactor(ui): modular views + themed appearance setting - #2

Merged
Arylmera merged 1 commit into
mainfrom
claude/ui-refactor-themes-ridfvu
Jul 16, 2026
Merged

refactor(ui): modular views + themed appearance setting#2
Arylmera merged 1 commit into
mainfrom
claude/ui-refactor-themes-ridfvu

Conversation

@Arylmera

Copy link
Copy Markdown
Owner

What

UI refactor

src/App.tsx (1,580 lines) is split into focused modules with no intended behavior change:

  • src/views/ — one file per tab: FlowView, StatusView, CardsView, FoldersView, ActivityView, SettingsView
  • src/components/ — shared form primitives (Field, Group, CsvField, RegexField, DestField), the shared NamingForm modal, and the new ThemePicker
  • src/lib/ — list/format helpers and the template worked-example functions
  • App.tsx keeps only the shell: top bar, tabs, Save, progress strip, event subscriptions, naming-modal dispatch

Themes

A new Appearance section in Settings offers seven options, each a token set in src/theme.css keyed off a data-theme attribute set by src/theme.ts:

Theme Look
System Follows the OS light/dark setting live (default)
Daylight The existing light look
Midnight The existing dark look
Darkroom Safelight red on black — night-vision friendly for late culls
Fjord Muted nordic blues
Paper Warm print-archive sepia
Graphite Light monochrome, color reserved for state

The choice is a per-machine UI preference in localStorage — applied before first paint (no flash), switching instantly without dirtying the Save flow, and never written into the TOML rule config. No Rust changes.

Cleanup (per PRODUCT.md's restraint principles)

  • Primary buttons and the drive badge lose their gradients for a solid accent; --on-accent keeps button text legible per theme.
  • All remaining hardcoded colors (flow badges, modal backdrop) are tokenized so every theme covers them.
  • index.html title fixed from the Tauri + React + Typescript boilerplate to FileFlow.

Verification

  • tsc --noEmit and vite build pass.
  • Drove the UI in Chromium against vite dev (the frontend renders standalone via the non-Tauri IPC fallback): all six tabs render; adding/editing drive & folder rules flips the Save button to dirty; the invalid-regex badge still fires; each theme applies to the real computed background, persists across reload, and System follows emulated OS dark/light changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UXjyz1PRH26JLiJfSDcPHc


Generated by Claude Code

…setting

Split the 1,580-line App.tsx into focused modules: one file per tab view
(views/), shared form primitives and the naming modal (components/), and
formatting/template-example helpers (lib/). No behavior change intended.

Add a theme system: color tokens move to theme.css keyed off a data-theme
attribute, with six themes — Daylight, Midnight, Darkroom (safelight red
for night vision), Fjord, Paper, Graphite — plus System, which follows the
OS light/dark setting live. The choice is a per-machine UI preference
stored in localStorage, applied before first paint, picked from a new
Appearance section in Settings with swatch previews; it never touches the
saved rule config.

UI cleanup along the way, per PRODUCT.md's restraint principles: primary
buttons and the drive badge lose their gradients for a solid accent, badge
and modal-backdrop colors are tokenized so every theme covers them, and
index.html gets a real title instead of the template boilerplate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UXjyz1PRH26JLiJfSDcPHc
@Arylmera
Arylmera marked this pull request as ready for review July 16, 2026 16:17
@Arylmera
Arylmera merged commit 960f0a3 into main Jul 16, 2026
2 checks passed
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