Tunal/Plans/03 File browsing/S013-settings-context-menus.md
astar76 211b3561c7 S013: settings dialog, editable context menus (menus.toml), menu editor
Shared files actions.rs, app.slint, main.rs, shell/mod.rs carry S012 hunks and are committed with S012.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-18 18:46:11 -06:00

2 KiB

S013 — Settings dialog and editable context menus

Category 03 File browsing · Model: Sonnet · Effort: high · Depends on: S011 · Size: M · Human: no Files touched: crates/tunal/src/{menus.rs,config.rs}, crates/tunal/ui/dialogs/{settings,menu-editor}.slint

Goal

A settings dialog and context menus the user edits in the app (add, remove, reorder actions) per context.

Read

crates/tunal/src/{actions.rs,config.rs}; crates/tunal/ui/components/{dialog,menu,switch,list-row}.slint.

Steps

  • Settings dialog pages: General (hidden files, folders first, restore tabs), View (default view, sort, grouping), Previews (placeholder for S018), Motion (follow system / always reduce / never reduce), Context menus.
  • Menu model per context (file, folder, multiple items, empty area, trash): action ids + separators; defaults; stored in menus.toml.
  • Menu editor: add from available actions, remove, reorder by drag and by buttons (animated), reset to defaults.
  • Context menus are built from the model everywhere (views, sidebar entries).
  • PROGRESS entry, INDEX line, commit S013: …

End criteria

  • cargo build --workspace, cargo clippy --workspace --all-targets -- -D warnings and cargo fmt --check pass.
  • Smoke: reorder an action in the editor, restart, the context menu shows the new order (screenshot); config in the scratchpad.
  • grep -rnE '#[0-9a-fA-F]{6}|[0-9]+ms' crates/tunal/ui/components crates/tunal/ui/views crates/tunal/ui/shell crates/tunal/ui/dialogs 2>/dev/null finds no literal colour or duration outside theme.slint/motion.slint.

Pitfalls

  • Load the app-taste and animate skills before writing motion; tokens only, hover tint + press squeeze, interruptible, reduced motion honoured, nothing animates while idle.
  • No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12.

Handoff (→ PROGRESS.md)

How later plans add an action to the registry and to the default menus (tags, play, folder appearance, elevation).