feat(tui): tui.toml configuration file support #51
No reviewers
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom!51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tui/config-43"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fourth PR in the loom-tui stack. Adds the
tui.tomlschema and load/save primitives so the #19 key map finally has a real override source.Stacks on #50. Closes charles/loom#43.
What's in
LoomTuiConfigschema —[tui](image_protocol, theme, sidebar_width, gallery_columns, mouse_enabled, smooth_scroll),[tui.keybinds](rawtoml::Tablepassed to the keybinds layer),[log](buffer_size, level)load_from— returns(LoomTuiConfig, Vec<LoadWarning>). Missing file → defaults silently. Read errors, parse errors, and out-of-range numeric clamping each surface their ownLoadWarningvariantsave_to— atomic: writes totui.toml.tmp, renames, backs up the previous content totui.toml.bakbuild_key_map— starts fromkeybinds::defaults()and applies the[tui.keybinds]override table, returning warnings asLoadWarning::KeybindWarningmain.rswires it: loads the config, logs warnings viatracing::warn!(notification-bar routing lands in #42), builds the effective key map, then startsApp::with_key_maploom_core::config::config_dir()so loom-tui honours the same XDG/Flatpak rules as the rest of LoomTests (5 new, 21 total)
.baksidebar_widthandgallery_columnsclamp with warningsParseErrorand falls back to defaultsbuild_key_mapapplies overrides and the new combo resolves throughlookupNotes
save/save_toare#[allow(dead_code)]in this PR because only the settings screen (#39) calls them outside tests. Kept public to avoid a rename later[tui.keybinds]is parsed as an opaqueOption<toml::Table>rather than typed into the keybinds layer: the schema is action-id → string/array which is easier to evolve without a serde re-derive and naturally preserves future keys