tui: Settings screen — wire config read/write & live apply #92

Closed
opened 2026-04-12 13:24:36 +00:00 by claude-desktop · 0 comments
Collaborator

User Story

As a loom-tui user, I want the Settings screen to display and edit all configuration sections with changes applied immediately, so that I can configure backends, paths, AI features, and appearance without restarting.

Context

The Settings screen (#39) has 9 section stubs with a section selector. But fields are placeholders — no config values are read or written. This ticket wires all sections to loom-core's AppSettings and tui.toml.

Acceptance Criteria

Config Loading

  • All 9 sections read their current values from AppSettings and tui.toml on screen entry
  • Section fields are rendered as editable form fields (text inputs, dropdowns, toggles)

Config Writing

  • Changes are persisted immediately on field change (no Save button)
  • Destructive changes (e.g., delete backend, clear API key) show confirmation dialog
  • TUI-specific settings write to tui.toml; shared settings write to loom-core config

Sections

  • Backends: list plugins, enable/disable, configure URL + API key per plugin
  • Paths: model directory, output directory, cache directory (file path inputs)
  • Generation Defaults: default steps, CFG, sampler, scheduler, image size
  • AI Features: Ollama endpoint, model name, Claude Code toggle
  • NSFW: global toggle (hides NSFW content across CivitAI, model browser)
  • Appearance: image protocol override, theme, sidebar width, gallery columns
  • Sharing: Mastodon/Pixelfed instance + token, Bluesky handle + app password, CivitAI API key
  • Key Bindings: editable table of all actions → key combos; reset to defaults; key capture mode
  • System Prompts: editable system prompts for each AI enhancement type

Backend Connectivity Test

  • Ctrl+T on a backend row pings the backend and shows result (success/error) in notification bar

Tests

  • Unit test: config round-trip (read → modify → write → read)
  • Unit test: key capture mode produces valid KeyCombo

Out of Scope

  • Adding new backend plugin types (only configure existing ones)

References

  • Spec §4.6 (Settings Screen)
  • Existing code: src/screens/settings.rs, src/config.rs
  • Tracking issue: #47
## User Story As a **loom-tui user**, I want the Settings screen to display and edit all configuration sections with changes applied immediately, so that I can configure backends, paths, AI features, and appearance without restarting. ## Context The Settings screen (#39) has 9 section stubs with a section selector. But fields are placeholders — no config values are read or written. This ticket wires all sections to loom-core's `AppSettings` and `tui.toml`. ## Acceptance Criteria ### Config Loading - [ ] All 9 sections read their current values from `AppSettings` and `tui.toml` on screen entry - [ ] Section fields are rendered as editable form fields (text inputs, dropdowns, toggles) ### Config Writing - [ ] Changes are persisted immediately on field change (no Save button) - [ ] Destructive changes (e.g., delete backend, clear API key) show confirmation dialog - [ ] TUI-specific settings write to `tui.toml`; shared settings write to loom-core config ### Sections - [ ] **Backends**: list plugins, enable/disable, configure URL + API key per plugin - [ ] **Paths**: model directory, output directory, cache directory (file path inputs) - [ ] **Generation Defaults**: default steps, CFG, sampler, scheduler, image size - [ ] **AI Features**: Ollama endpoint, model name, Claude Code toggle - [ ] **NSFW**: global toggle (hides NSFW content across CivitAI, model browser) - [ ] **Appearance**: image protocol override, theme, sidebar width, gallery columns - [ ] **Sharing**: Mastodon/Pixelfed instance + token, Bluesky handle + app password, CivitAI API key - [ ] **Key Bindings**: editable table of all actions → key combos; reset to defaults; key capture mode - [ ] **System Prompts**: editable system prompts for each AI enhancement type ### Backend Connectivity Test - [ ] `Ctrl+T` on a backend row pings the backend and shows result (success/error) in notification bar ### Tests - [ ] Unit test: config round-trip (read → modify → write → read) - [ ] Unit test: key capture mode produces valid `KeyCombo` ## Out of Scope - Adding new backend plugin types (only configure existing ones) ## References - Spec §4.6 (Settings Screen) - Existing code: `src/screens/settings.rs`, `src/config.rs` - Tracking issue: #47
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom#92
No description provided.