diff --git a/Plans/03 File browsing/S039-relative-dates-settings.md b/Plans/03 File browsing/S039-relative-dates-settings.md new file mode 100644 index 0000000..61451f9 --- /dev/null +++ b/Plans/03 File browsing/S039-relative-dates-settings.md @@ -0,0 +1,24 @@ +# S039 — Relative dates, 12/24-hour clock and more settings + +> Category 03 File browsing · Model: Sonnet · Effort: medium · Depends on: S013 · Size: S · Human: no +> Files touched: crates/tunal/src/folder/format.rs, crates/tunal/src/config.rs, crates/tunal/ui/dialogs/settings.slint, crates/tunal/src/properties.rs, FEATURES.md + +## Goal +The user can't read the current `21 Oct 19:38` stamps and wants relative dates that turn into date and time once they get older, in a 12-hour clock (D-037). Make date display configurable and grow the Settings dialog. + +## Read +CLAUDE.md §3; D-037; `crates/tunal/src/folder/format.rs` (`date`), `crates/tunal/src/config.rs`, `crates/tunal/ui/dialogs/settings.slint`, S013's PROGRESS entry. + +## Steps +- [ ] `format::date` with a style: **Relative** (default): `Just now` (< 1 min), `5 minutes ago`, `3 hours ago` (today), `Yesterday, 3:42 PM`, weekday within 7 days (`Monday, 3:42 PM`), then `Nov 3, 3:42 PM` this year and `Nov 3, 2024` before; **Absolute**: always date + time. Clock **12-hour** (default) or **24-hour**. Properties dialog uses absolute full date + time in the chosen clock. +- [ ] Config keys in `settings.toml` (`date_style`, `clock`) and a "Dates and times" group in Settings > General (radio/segmented, live update of open views without reload). +- [ ] Relative stamps refresh: one timer per window ticking once a minute only while a visible row shows a relative stamp under 1 hour; stopped otherwise (no idle repaint). +- [ ] FEATURES.md row; PROGRESS entry, INDEX line, commit `S039: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo fmt --check` pass. +- One screenshot of a scratch folder with files touched now, 2 h ago, yesterday, last week and last year (`touch -d`) shows the expected stamps in 12-hour format. + +## Pitfalls +- Use the system timezone (jiff) as `format::date` does today; no locale guessing beyond the clock setting. +- No new tests (D-013). diff --git a/Plans/INDEX.md b/Plans/INDEX.md index 57ced9d..03f7794 100644 --- a/Plans/INDEX.md +++ b/Plans/INDEX.md @@ -15,6 +15,7 @@ Tracker: https://claude.ai/artifact/4X8YCk3cQjUGyuyCqGuU7v - [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 - [x] [S038 — Expressive restyle (shapes, ripples, rounded surfaces)](02%20App%20skeleton/S038-expressive-restyle.md) · Opus high (runs after S013, before S014) +- [ ] [S039 — Relative dates, 12/24-hour clock and more settings](03%20File%20browsing/S039-relative-dates-settings.md) · Sonnet medium ## 03 File browsing diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 0220e13..b860a4f 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -38,3 +38,4 @@ D-033 — 2026-11-18 — View mode and list motion: `ViewMode { details, grid }` 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. +D-037 — 2026-11-18 — Dates: relative stamps by default (Just now, N minutes/hours ago, Yesterday/weekday with time, then date + time), 12-hour clock by default, both configurable (date style Relative/Absolute, clock 12/24-hour) — plan S039. The user expects a lot of configuration: every UI plan exposes its user-visible choices in Settings — user — S039, all UI plans.