S018: settings, palette, shortcuts, first run and backup

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-25 07:46:35 -06:00
commit f2199dfabd

View file

@ -150,5 +150,14 @@ Verified: `nice cargo test -j 2 -p medlar --test main` green (20, one with the r
Not done: Sign in and Network settings show Try again; Choose a folder and link are plain fields; no drop of links on Wayland (winit has none); ghosts and dragged cards show no bar. Not seen on a real GPU or by hand: the feel of the springs. Queues can't be made here. Changes of host and date filters move rows like others.
Seen: boxes 2 to 7 were ticked together after the tests, against rule 3. A release test build takes over 6 minutes beside two other sessions.
## S018 — Settings, colour, shortcuts and first run (2026-11-25)
Done: `views::{settings, palette, firstrun}`, `keys`; the app saves settings, sets the language and gives changes to the engine (`bridge.apply`), which now has `Sites` (logins, proxies). Sign in and Network settings do what they say. Choices: D-046 to D-048. Outside the plan's files: `app`, `bridge`, `views::{main, list, bar, rail}`, `ui::{field, menu}`, `theme::{seed, hue_of}`, settings `shortcuts`, shots, two icons.
Verified: `nice cargo test -j 2 -p medlar --test settings` green (26), all medlar tests and clippy; shots of every page, palette and first run seen at 1080×720 (dark) and 480×360 (light), some of them the other way round.
- A settings row: a line in `views/settings/rows.rs::ROWS` (page, heading, id, the `Settings` keys it changes, `Kind`), texts `set.<id>`, `set.<id>.why` (one line), `set.<id>.<option>`, `set.group.<heading>`. Kinds: Switch, Choice (up to 4), List, Number, Text (with `check`), Own (draws itself with `(View, Cx, Ui)`). Search, undo, palette and the tests take it from there. A page shows once it has a row; a new page is a variant of `Page` with id, icon and the text `page.<id>`. Every key of `Settings` needs a row, or `every_setting_has_a_row` fails.
- An action: a variant of `keys::Action`, a line in `keys::ALL` (id, icon, group, usual keys), the text `action.<id>`, an arm in `App::run`, `Main::run` or `List::perform`. Shortcuts page and palette show it. Tooltips and menus: `keys::label(Action::…)`; asking: `keys::pressed(ui, Action::…)`.
- `app.open_settings(Page::…)`; `main.wish = Some(Wish::…)` for what only the window can do; `bridge.save_login(Place, Login, commands after it)`, `forget_login`. `app.paths` is None in tests: nothing is written or read then. First run shows while `desktop_colors` is None.
Not done: notifications and power have no settings yet, so these pages are hidden until later plans add rows; no folder chooser (a plain field); the SFTP key of a site (S011) has no field; a site's old login is deleted from the keyring only when the settings screen closes; the toast's Undo puts all settings back, not only that change. Real keyring, real desktop scheme change and a real GPU not tried.
Seen: boxes 2 to 7 were ticked together after the tests, against rule 3.
## Later
-