Commit graph

4 commits

Author SHA1 Message Date
danny
cde6e119c6 M1.10: light theme, live theme switching, editor tokens
- theme::LIGHT next to DARK with the 10 new tokens (editor selection,
  active line, cursor, gutter, match, font size, tab active/modified,
  notice); light fg-muted, accent and error darkened for WCAG AA
- theme.list, theme.systemPreference, themeChanged event when the
  resolved theme changes (settings.set/reset appearance.theme, or the
  OS preference in system mode)
- desktop init script and window background from the stored setting;
  system mode uses a prefers-color-scheme media query for the first frame
- ui/src/theme.ts applies tokens to :root and color-scheme live; editor,
  tabs and notice drop their var() fallbacks
- Vitest WCAG AA contrast check against a Rust-maintained snapshot,
  DOM tests, headless control-channel test
- docs: architecture Themes, parity rows, ui-parity, gaps, roadmaps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:49:23 +02:00
danny
f9357ee4b5 M1.9a: engine dirs and settings backend
EngineConfig and Engine::with_config; the desktop resolves Tauri's app
config and data dirs. Settings model (appearance.theme, editor.fontSize,
ui.language) with typed validation, persistence in settings.json via
write_atomic (1 MiB cap, unknown keys kept, corrupt file backed up with a
warning notification), settings.list/get/set/reset, settingsChanged and
notification events. Property test over random settings.json content,
control-channel test for persistence and corrupt-file recovery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:23:43 +02:00
danny
f1976c7d67 M1.3: engine workspace, file and buffer commands, event stream
State holds the open project (VFS project, watcher, watched directories)
and versioned buffers. New commands: project.open/close/children,
file.open/save/saveAll, buffer.get/edit/close. buffer.edit takes UTF-16
change sets based on a version and fails with the new stale_version code;
closing dirty buffers or projects without force fails with
unsaved_changes. Commands queue events (projectOpened, treeChanged,
bufferChanged, dirtyChanged, fileChangedOnDisk, ...) that the engine
returns in Outcome.events; Engine::pump_vfs maps changes on disk to
events and reloads clean buffers. project.children watches listed
directories, capped at 256 native / 32 polling, least recently listed
dropped first.

Control channel: events.subscribe streams {"event": ...} lines, with
bounded per-subscriber queues (lutra_control::Subscribers) and method docs
in methods.rs. testkit's EngineBackend and the desktop Host implement the
new Backend::subscribe. Verified with 14 engine integration tests, a TCP
events test and the running app over the control channel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:24:44 +02:00
danny
a3f83102f1 M0.7: control channel over JSON lines
lutra_control::start binds 127.0.0.1:PORT and serves app.ping,
engine.execute, engine.listCommands and ui.screenshot through the Backend
trait the host implements. Lines are capped at 16 MiB, every input gets a
well-formed response with a stable error code, and backend panics become
internal errors. Proptests cover arbitrary lines; a TCP integration test
uses the new testkit EngineBackend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 06:47:30 +02:00