plans: S038 expressive restyle (D-035), cost rules (D-036)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-18 18:43:03 -06:00
commit c872036b17
4 changed files with 36 additions and 0 deletions

View file

@ -10,6 +10,7 @@ Tunal is our own desktop file manager for Linux (Wayland and X11), written in Ru
4. **Stay in scope.** Out-of-scope ideas go to `docs/PROGRESS.md` (“Later”), not into the code.
5. **Invent nothing**: check the code/docs; if a fact is still missing, ask — the **orchestrator** if you were started by one (never the user directly), otherwise the user.
6. **End of session**: (a) end criteria verified **by commands**, not memory; (b) `docs/PROGRESS.md` entry (≤ 15 lines: done, not done, later); (c) `docs/DECISIONS.md` if a decision binds later plans; (d) tick your line in `Plans/INDEX.md` (no commentary); (e) commit `SNNN: …`; (f) short report: done, not done, what the user/orchestrator must do, and any instruction that cost more than it gave.
8. **Cost (D-036)**: first action of every session: invoke the `caveman:caveman` skill and keep it on (short replies, short reports). Read only what your plan names; don't re-read files; one smoke run or screenshot per end criterion, no extra variants.
7. **Languages**: answer in English. Code, comments, README.md and FEATURES.md in English. Internal docs (`CLAUDE.md`, `Plans/`, `PROGRESS.md`) in English.
## Tracker

View file

@ -0,0 +1,32 @@
# S038 — Expressive restyle (shapes, ripples, rounded surfaces)
> Category 02 App skeleton · Model: Opus · Effort: high · Depends on: S012, S013 · Size: L · Human: no
> Files touched: crates/tunal/ui/{theme,motion}.slint, crates/tunal/ui/components/**, crates/tunal/ui/shell/**, crates/tunal/ui/views/**, crates/tunal/ui/dialogs/**, crates/tunal/ui/app.slint, crates/tunal/ui/gallery.slint
## Goal
The user finds the current UI bland ("not enough rounded stuff, material icons, cookie shapes, no animations") and wants it closer to their old prototype's look (D-035). Restyle everything built so far to Material 3 Expressive: shaped glyph containers, rounded surface cards, ripples and morphing, visible motion. Behaviour and APIs stay; this is a visual pass.
## Read
CLAUDE.md §2 Design references, §3; D-027, D-028, D-035; the prototype (look only, never copy): `/home/astar76/Documents/Apps/tunal-files/tunal/widgets.py` (`shape_path`, `ShapeWidget`, `RippleButton`, `SegmentedButton`, `Breadcrumb`, `Snackbar`, `WavyProgress`, `PlayFab`), `theme.py` (radii, lines ~360–430), `panels.py`, `views.py`, `dialogs.py`; Damson `src/motion.rs`; `app-taste` and `animate` skills.
## Steps
- [ ] Shape tokens: larger radii (cards 24–28, controls full pill, menus 14 with 10 px item pills, text fields 12), `Theme` shape library for M3 Expressive shapes (circle, cookie4/6/9/12, clover, scallop, pill) as Slint `Path` commands generated at build time or by a Rust helper; a `Shape` component (shape, size, fill role, glyph, rotation) that can morph between two shapes.
- [ ] Ripple state layer: press ripple spreading from the pointer plus the existing hover tint and squeeze; selected/toggled states morph shape (e.g. circle → cookie9) and fill.
- [ ] Shell as rounded surfaces: sidebar on `surface-container` with pill place rows and a shaped glyph container per place; content pane as a rounded card with a gap from the window edge; tab bar of pills with a sliding indicator; breadcrumb crumbs as pills; toolbar buttons tonal circles; segmented view switch.
- [ ] Views: folder/file glyphs in shaped tonal containers (folder cookie, file by category), rounded row highlight with selection morph, grid tiles as rounded cards; item fade/slide-in on load (honour reduced motion, stop when idle).
- [ ] Dialogs, menus, toasts: shaped header glyph in dialogs (cookie6), menu item pills, snackbar with wavy progress for running jobs, card shadows from the design references.
- [ ] Gallery + screenshots light/dark of the shell, a music folder, grid view, a dialog and a menu; compare with the prototype's look by reading its code; tokens only (literal grep empty).
- [ ] PROGRESS entry, INDEX line, commit `S038: …`
## End criteria
- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo fmt --check` pass.
- Screenshots of shell (light, dark), grid view, dialog, menu taken and looked at; shaped containers, pills and rounded cards visible.
- `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` empty.
## Pitfalls
- No idle animation: ripples and morphs run only on input or state change; reduced motion turns them into instant changes.
- Slint `Path` with many commands per row can be slow at 10 000 rows: reuse one path per shape, size it with `viewbox`, keep rows virtualized.
- Never copy prototype code; port the idea. Never rename the app or its features.
## Handoff (→ PROGRESS.md)
`Shape` component API, shape names, new radii tokens, ripple API — later UI plans (S014+, S018, S021, S023, S029) build on them.

View file

@ -14,6 +14,7 @@ Tracker: https://claude.ai/artifact/4X8YCk3cQjUGyuyCqGuU7v
- [x] [S003 — Window, Theme and Motion globals, screenshot command](02%20App%20skeleton/S003-window-tokens.md) · Opus high
- [x] [S004 — Base animated controls](02%20App%20skeleton/S004-base-controls.md) · Opus high
- [x] [S005 — Menus, dialogs and toasts](02%20App%20skeleton/S005-menus-dialogs.md) · Opus high
- [ ] [S038 — Expressive restyle (shapes, ripples, rounded surfaces)](02%20App%20skeleton/S038-expressive-restyle.md) · Opus high (runs after S013, before S014)
## 03 File browsing

View file

@ -36,3 +36,5 @@ D-031 — 2026-11-18 — Floating surfaces don't use `PopupWindow` (it closes wi
D-032 — 2026-11-18 — Folder views use `folder::FolderModel` (one per view, `Rc`, a Slint `Model` of `DetailRow`s formatted on demand; worker results reach it through `upgrade_in_event_loop` + `as_any` downcast and carry a generation); selection is a set of raw names (`click`, `navigate`, `select_all`); sort menus are built in Rust as `[MenuItem]` and opened at window level (D-031); list rows set `StateLayer.focusable: false` and the view's `FocusScope` owns the keys; watch events are hints (unchanged stat is ignored: the local backend also reports reads) — S008 — S009–S015.
D-033 — 2026-11-18 — View mode and list motion: `ViewMode { details, grid }` (views/details-view.slint) lives in `folder::Settings::mode`, so one per `FolderModel` = per pane, carried over between folders like the sort, and reaches the views as `FolderState.mode` (`set_mode`); `.directory` view settings read and write that field. `FolderView` (views/view-switch.slint) stacks both views and cross-fades them; `ViewSwitch` is the segmented control. List changes (sort, filter, hidden, watch, playlist re-sort; not listing chunks) animate from Rust-computed per-row `from`/`to` offsets and leaving copies, drawn from one `MotionClock` (motion.slint, `animation-tick()` while running only), length `MotionPrefs.list-change` (0 under reduced motion = no transition); instant above 2000 rows. Opening with `open_travel(uri, Travel)` slides content from the right (into, forward) or left (up, back) — S009 — S010, S015, S018 (grid thumbnails in `GridCell`).
D-034 — 2026-11-18 — Window shell API: MainWindow holds `panes: [PaneData { rows, lines, folder, title, glyph }]` for the current tab and every folder-view callback takes the pane index first (`sort-by(int, SortColumn)`, `row-activated(int, int)`, `view-mode-selected(int, ViewMode)`, …); toolbar, breadcrumb, sort menu and status follow `active-pane`. Rust side: `shell::Shell` owns tabs/panes and binds those callbacks; one `FolderModel` per `shell::pane::Pane`, worker results routed by pane id; `folder::attach` is gone. Config goes through `config::{load, store}` (TOML in `$XDG_CONFIG_HOME/tunal/`), later settings are new fields on `config::Settings`; sidebar sections Devices/Network are filled with `Places::set_section` — S010 — S011–S015, S024–S029.
D-035 — 2026-11-18 — Visual direction: the user finds the current UI bland and wants it closer to their old prototype: Material 3 Expressive — shaped glyph containers (cookie/clover/scallop), pills and rounded surface cards, ripples, shape morphing, visible (token-driven) motion. New plan S038 restyles S003–S013 before S014; later UI plans build on its `Shape` component — user — S014+, S018, S021, S023, S029, S034, S035.
D-036 — 2026-11-18 — Cost: the user saw ~50 % of a day's credits go; every session runs the `caveman:caveman` skill (short replies and reports), reads only what its plan names, and skips extra verification variants; the orchestrator keeps look-ahead at 1–2 fresh sessions, avoids reusing long sessions when it can start a fresh one, and uses one-shot wake-ups at a usage-limit reset instead of a 30-minute heartbeat — user — all plans; overrides ORCHESTRATOR.md look-ahead 3.