diff --git a/CLAUDE.md b/CLAUDE.md index 814e251..4aca2e3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,20 +43,20 @@ Never modify: `PROMPT.md` (the user's brief), the reference app checkout (`/home ## 2. Facts - **Reference app**: the repository URL in PROMPT.md §Project, cloned (shallow) to `/home/astar76/Projects/Tunal-reference` when a plan needs it. Use it to learn *features and behaviour only*. Never copy its code, strings, names, icons or branding (it is GPL). Never write its name, its desktop's name or any other file manager's name in code, identifiers, UI text, binaries, README, FEATURES.md or commit messages; say “the reference app” in internal docs. -- **Toolchain**: rustc/cargo 1.99.1 on Arch Linux. GUI: **Slint 1.19**. Own components on a `Theme` global (colour/shape/type tokens) and a `Motion` global (durations, easings, reduced-motion flag); std-widgets only for scrollbars and text input, style `material`. +- **Toolchain**: rustc/cargo 1.99.1 on Arch Linux. License GPL-3.0-or-later (D-015). GUI: **Slint 1.19**. Own components on a `Theme` global (colour/shape/type tokens) and a `Motion` global (durations, easings, reduced-motion flag); std-widgets only for scrollbars and text input, style `material`. - **Theme**: `org.freedesktop.portal.Settings` → `org.freedesktop.appearance` `accent-color` (rgb doubles) and `color-scheme` (0 none, 1 dark, 2 light) via `zbus` blocking API, plus `SettingChanged` for live re-theme. Schemes from `material-colors` 0.5 (`ThemeBuilder::with_source`, tonal spot). Fixed fallback seed when no accent. - **Icons**: Material Symbols Rounded, from `/usr/share/fonts/TTF/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf` (package `ttf-material-symbols-variable`, Apache-2.0; license in `/usr/share/licenses/ttf-material-symbols-variable/`). Copy font + license into `assets/fonts/`; draw glyphs by codepoint (folder `e2c7`, home `e88a`). App icon: `assets/tunal.svg` / `.png` / `.ico`. - **Crates already chosen**: `slint` 1.19, `zbus` (blocking), `material-colors` 0.5, `lofty` (tags), `russh` + `russh-sftp` (SFTP, preferred). Later option: `rusty-chromaprint` (AcoustID). - **MusicBrainz / Cover Art Archive**: no API key; ≤ 1 request/s across the whole app; User-Agent `Tunal/ ( https://archlinux.tail7c4f5e.ts.net/git/astar76/Tunal )`. -- **C libraries need the user's OK first** (orchestrator relays it, 🧑): video frames (FFmpeg vs GStreamer), audio output (`cpal` → ALSA), iOS (`idevice` → system `usbmuxd`), MTP (pure Rust over `nusb` vs `libmtp`), drag-out to other apps (own Wayland/X11 code). Any other non-Rust dependency: ask too. -- **User validates personally (🧑)**: UI milestones visually (end of phases 2, 3 and 6), the sudo prompt flow with a real password, real iPhone/Android devices. Plans that need these stop at that step and report. -- **Motion rules** (`app-taste` skill): tokens only, hover tint and press squeeze on every control, interruptible motion, honour reduced motion, no idle animation, repaint only while something moves. Build new motion with the `animate` skill; at each UI milestone run `/unslop` and `/improve-animations` (there is no `/review-animations`). +- **Native dependencies (decided, D-004–D-007, D-014, D-016, D-019)**: video frames via the `ffmpeg` CLI subprocess; audio `cpal` (alsa-lib) + symphonia; iOS `idevice` over system `usbmuxd`; MTP own pure-Rust client on `nusb`; native DnD via Slint's libwayland connection and `x11rb`; TLS/SSH crypto rustls + ring. No new system packages: optional tools missing → that feature off, no error. Any other non-Rust dependency: ask first. +- **User validates personally (🧑)**, all in phase 12 (D-009): visual review (S035), the polkit password prompt, real iPhone/Android devices, native drag/clipboard with other apps, a real SFTP host (S036). Plans that need these stop at that step and report. +- **Motion rules** (`app-taste` skill): tokens only, hover tint and press squeeze on every control, interruptible motion, honour reduced motion, no idle animation, repaint only while something moves. Build new motion with the `animate` skill; `/unslop` and `/improve-animations` run in phase 12 (S034, S035; there is no `/review-animations`). - No Forgejo remote yet: the user wants local-only git for now. ## 3. Code rules - Write like the neighbouring code. KISS, DRY, YAGNI; no abstraction without ≥ 2 uses. -- New pure logic gets a test; a bug fix gets a regression test when feasible. +- Phases 1–11: no new tests (D-013); verify with build, clippy, fmt and a smoke run or screenshot. Phase 12 writes the tests; from then on a bug fix gets a regression test when feasible. - All Rust, pure-Rust crates preferred. `cargo fmt` and `cargo clippy --workspace --all-targets -- -D warnings` clean before commit. - Back-end crates (`tunal-core`, `-theme`, `-dirmeta`, …) have no Slint dependency; the app crate adapts them to the UI. - Views talk only to the location layer in `tunal-core` (a trait for list/stat/read/write/copy/move/rename/delete/trash). Local, device and SFTP backends implement it; views never know which protocol they show. diff --git a/PLAN.md b/PLAN.md index af8f61a..716200c 100644 --- a/PLAN.md +++ b/PLAN.md @@ -7,20 +7,24 @@ A fast, fully animated desktop file manager for Linux (Wayland and X11), written Nothing built yet: the brief (PROMPT.md), the app icons in `assets/` and this workflow scaffold. Rust 1.99.1 installed; Material Symbols font installed system-wide. ## Phases +Feature phases 1–11 build without new tests (D-013); phase 12 tests the solid app. 1. **Workspace** — Cargo workspace with the crates in CLAUDE.md §1, README, FEATURES.md (feature map), font + license in `assets/fonts/`. -2. **App skeleton** — window, theme from the portal with live re-theme, `Theme` / `Motion` token globals, base animated components (button, icon button, row, tab, chip, menu, dialog), screenshot harness. 🧑 visual review. -3. **File browsing** — tabs, split view, editable breadcrumbs, back/forward/up, places sidebar, sorting, grouping, hidden files, copy path / copy / cut / paste / rename / delete / trash / properties, editable context menus, animated list inserts/removals/reorders. 🧑 visual review. +2. **App skeleton** — window, theme from the portal with live re-theme, `Theme` / `Motion` token globals, base animated components (button, icon button, row, tab, chip, menu, dialog, toast), screenshot command. +3. **File browsing** — location layer + ops engine + trash, details and icon grid views, type-to-filter, tabs, split view, editable breadcrumbs, back/forward/up, places sidebar, sorting, grouping, hidden files, copy path / copy / cut / paste / rename / delete / trash / properties, Open / Open with, settings, editable context menus, in-app drag and drop with a drop menu, animated list changes. 4. **`.directory` support** — read folder icon, display name and view settings; edit them from the app. -5. **Sudo elevation** — password prompt when an operation needs root; secret never logged, never in argv, zeroed. 🧑 real-password test. -6. **Thumbnails** — images, video frame at a chosen timestamp, embedded album art; plain Material icons when previews are off. 🧑 visual review. -7. **Tag editor** — read/write tags with `lofty`, MusicBrainz lookup, Cover Art Archive covers, embed results. -8. **Audio player** — quick player with a waveform seek bar. -9. **Device sharing** — iOS over AFC, then Android over MTP, as locations. 🧑 real devices. +5. **Elevation** — pkexec/polkit root helper; Tunal never sees the password (D-018). +6. **Thumbnails** — images, video frame at a chosen timestamp (ffmpeg CLI), embedded album art; plain Material icons when previews are off. +7. **Tag editor** — read/write tags with `lofty` for one or many files, MusicBrainz lookup, Cover Art Archive covers, embed results. +8. **Audio player** — quick player (symphonia + cpal) with a waveform seek bar. +9. **Device sharing** — iOS over AFC (idevice/usbmuxd), then Android over MTP (own client on nusb), as locations. 10. **Network** — SFTP locations (`russh` + `russh-sftp`), saved connections in places, agent/key/password auth, known_hosts checking with unknown-host prompt, hosts from `~/.ssh/config`. +11. **Native drag and drop** — drag files to/from other apps and file clipboard interop, Wayland then X11 (D-014). +12. **Testing** — automated tests, screenshot matrix + `/unslop`, `/improve-animations` + 🧑 visual review, 🧑 real-world checks (password, devices, other apps, SFTP host). +13. **Packaging** — desktop entry, install script, final README/FEATURES. ## Out of scope - Copying any code, names, strings, icons or branding from the reference app; naming it or other file managers in the UI, binaries or docs. - Non-Linux platforms for now (Windows/macOS packaging). - Protocols other than local, AFC, MTP and SFTP (the location layer must allow them later). -- AcoustID fingerprinting (later option), drag-out to other apps unless the user approves the extra platform code. +- AcoustID fingerprinting (later option), removable drives (UDisks), recursive search. - Pushing to a remote or publishing releases until the user asks. diff --git a/Plans/01 Workspace/.gitkeep b/Plans/01 Workspace/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/01 Workspace/S001-workspace-scaffold.md b/Plans/01 Workspace/S001-workspace-scaffold.md new file mode 100644 index 0000000..f456ed0 --- /dev/null +++ b/Plans/01 Workspace/S001-workspace-scaffold.md @@ -0,0 +1,32 @@ +# S001 — Workspace, crates, README and feature map + +> Category 01 Workspace · Model: Sonnet · Effort: medium · Depends on: — · Size: M · Human: no +> Files touched: Cargo.toml, crates/*/Cargo.toml, crates/*/src/**, assets/fonts/**, README.md, FEATURES.md, .gitignore + +## Goal +Phase 1: the Cargo workspace with every crate from CLAUDE.md §1 building, the icon font bundled, README.md, and FEATURES.md mapping the reference app's features to our planned implementation (plan ids). + +## Read +CLAUDE.md; PLAN.md §Phases; PROMPT.md §Core file manager features through §Network connections; docs/DECISIONS.md. Reference app: only its top-level layout and user docs, to list features. + +## Steps +- [ ] Workspace `Cargo.toml`: resolver 3, edition 2024, `members = ["crates/*"]`, `[workspace.package]` version 0.1.0, license `GPL-3.0-or-later` (D-015), `publish = false`; `[workspace.dependencies]` only for crates used now (`slint = "1.19"`). +- [ ] Create the 10 crates of CLAUDE.md §1: `tunal` (bin) opens a minimal Slint window titled Tunal with `assets/tunal.png` as icon; the 9 libraries contain a crate doc comment only. +- [ ] Copy `MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf` and its license from `/usr/share/licenses/ttf-material-symbols-variable/` into `assets/fonts/`; check with `fc-query`. +- [ ] Shallow-clone the reference app (URL in PROMPT.md §Project) to `/home/astar76/Projects/Tunal-reference` (outside the repo) if missing. +- [ ] Write FEATURES.md: one table per PROMPT.md section — feature · status (planned) · plan id · crate/module — plus the reference app's features we do not plan (marked Later/Out of scope). Never name the reference app. +- [ ] Write README.md: what Tunal is, build/run (`cargo run -p tunal`), crate layout, runtime requirements (D-016: optional ffmpeg, usbmuxd, polkit), font license note, GPL-3.0-or-later. +- [ ] PROGRESS entry, INDEX line, commit `S001: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `ls assets/fonts` shows the font and its license. +- `grep -riE 'dolphin|kde' README.md FEATURES.md crates` finds nothing. + +## Pitfalls +- Font file name contains `[ ]`: quote it in shell and in Slint imports. +- Don't add dependencies the crate doesn't use yet (YAGNI). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Crate names and the font path; FEATURES.md is the table later plans update (status → done) when they ship a feature. diff --git a/Plans/02 App skeleton/.gitkeep b/Plans/02 App skeleton/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/02 App skeleton/S002-theme-portal.md b/Plans/02 App skeleton/S002-theme-portal.md new file mode 100644 index 0000000..d8815c2 --- /dev/null +++ b/Plans/02 App skeleton/S002-theme-portal.md @@ -0,0 +1,33 @@ +# S002 — Portal theme and Material schemes + +> Category 02 App skeleton · Model: Opus · Effort: high · Depends on: S001 · Size: M · Human: no +> Files touched: crates/tunal-theme/**, Cargo.toml + +## Goal +`tunal-theme`: read accent colour, colour scheme and the system animation setting from the XDG Settings portal, watch them live, and build light/dark Material palettes with `material-colors` 0.5. + +## Read +CLAUDE.md §2 Theme, §4; docs/DECISIONS.md D-012. + +## Steps +- [ ] Portal reader with `zbus` blocking API (no tokio; features for blocking only): `ReadOne`, falling back to the older `Read` (doubly wrapped variant); parse `accent-color` (ddd; out-of-range = no accent) and `color-scheme` (u32: 0 none → light, 1 dark, 2 light). +- [ ] Reduced motion: read `org.gnome.desktop.interface` `enable-animations` when the portal offers it, else `None`. +- [ ] Watcher thread: subscribe to `SettingChanged` for both namespaces and call back with a new `Appearance { accent, scheme, animations }`. +- [ ] Palette: `ThemeBuilder::with_source(seed)` tonal spot → light and dark schemes exported as a plain struct of the M3 roles used by the UI (ARGB u32); fixed fallback seed chosen here and recorded in DECISIONS.md. +- [ ] No portal / no session bus / no accent: return defaults, never panic, log one line. +- [ ] Example `cargo run -p tunal-theme --example dump` prints the appearance and a few roles. +- [ ] PROGRESS entry, INDEX line, commit `S002: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `cargo run -p tunal-theme --example dump` prints the same accent as the `busctl` command in CLAUDE.md §5. +- `DBUS_SESSION_BUS_ADDRESS=unix:path=/nonexistent cargo run -p tunal-theme --example dump` prints the fallback and exits 0. + +## Pitfalls +- zbus 5 needs the `blocking-api` feature; keep the default async executor internal (no tokio). +- The portal on niri is backed by gnome/gtk portals: accent may be absent → fallback. +- `material-colors` API names differ between minor versions: check the 0.5 docs in ~/.cargo/registry, invent nothing. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +`Appearance`, `Palette`, `watch()` signatures; the fallback seed. diff --git a/Plans/02 App skeleton/S003-window-tokens.md b/Plans/02 App skeleton/S003-window-tokens.md new file mode 100644 index 0000000..1a39248 --- /dev/null +++ b/Plans/02 App skeleton/S003-window-tokens.md @@ -0,0 +1,33 @@ +# S003 — Window, Theme and Motion globals, screenshot command + +> Category 02 App skeleton · Model: Opus · Effort: high · Depends on: S002 · Size: M · Human: no +> Files touched: crates/tunal/** (build.rs, src/main.rs, src/theme_bridge.rs, src/screenshot.rs, ui/app.slint, ui/theme.slint, ui/motion.slint, ui/components/icon.slint), CLAUDE.md §5 + +## Goal +The app window themed from the portal with live re-theme, the `Theme` and `Motion` token globals every component uses, the icon glyph component, and a `--screenshot` command for agents to see the UI. + +## Read +CLAUDE.md §2 Theme/Icons/Motion rules, §3, §4; `app-taste` skill; crates/tunal-theme public API. + +## Steps +- [ ] `build.rs` with `slint-build`, std-widgets style `material`; import the bundled Material Symbols font in Slint. +- [ ] `Theme` global: colour roles, shape (corner radii xs…xl, full), type scale, spacing grid (4 px), state-layer opacities. `Motion` global: M3 durations and easings, `reduced` flag; a helper so durations become 0 when reduced. +- [ ] Theme bridge: apply the palette at start; watcher → `invoke_from_event_loop` → update `Theme`; env overrides `TUNAL_SEED=#rrggbb`, `TUNAL_SCHEME=light|dark`, `TUNAL_REDUCED_MOTION=1` for agents. +- [ ] `Icon` component: glyph by codepoint, size, weight, fill (check which variable axes Slint 1.19 can set; fall back to the default instance). +- [ ] Window: title, `assets/tunal.png` icon, minimum size (choose and record in DECISIONS.md), placeholder layout (sidebar + content). +- [ ] `tunal --screenshot [--dark] [--size WxH]`: render offscreen with the software renderer to PNG and exit. Add its row to CLAUDE.md §5 (single PNG; the full state matrix comes in phase 12). +- [ ] PROGRESS entry, INDEX line, commit `S003: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot ` (light and `--dark`) renders the new UI; you looked at both PNGs. +- `DBUS_SESSION_BUS_ADDRESS=unix:path=/nonexistent tunal --screenshot x.png` still renders. + +## Pitfalls +- Slint globals can't run `animate`; colour transitions belong on the components that read the tokens. +- Software renderer screenshots need a custom platform (`slint::platform::software_renderer`); don't open a real window for `--screenshot`. +- 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) +Token names (list them in PROGRESS), env overrides, the screenshot command. diff --git a/Plans/02 App skeleton/S004-base-controls.md b/Plans/02 App skeleton/S004-base-controls.md new file mode 100644 index 0000000..d745c0b --- /dev/null +++ b/Plans/02 App skeleton/S004-base-controls.md @@ -0,0 +1,32 @@ +# S004 — Base animated controls + +> Category 02 App skeleton · Model: Opus · Effort: high · Depends on: S003 · Size: L · Human: no +> Files touched: crates/tunal/ui/components/{state-layer,button,icon-button,chip,list-row,tab,text-field,switch}.slint, crates/tunal/ui/gallery.slint, crates/tunal/src/main.rs + +## Goal +Own controls on the token globals: every control has hover tint, press squeeze, focus ring and a disabled state. A gallery screen shows them for screenshots. + +## Read +CLAUDE.md §2 Motion rules, §3; `app-taste` and `animate` skills; crates/tunal/ui/theme.slint, motion.slint. + +## Steps +- [ ] `StateLayer`: hover/press/focus tint and press squeeze shared by all controls; force-state properties for screenshots. +- [ ] `Button` (filled, tonal, outlined, text, with optional icon) and `IconButton` (standard, toggle) with tooltip text. +- [ ] `Chip` (filter with animated check, assist) and `Switch` (thumb slides, track tints). +- [ ] `ListRow` (leading icon, title, supporting text, trailing slot, animated selection indicator) and `Tab` (label, icon, close button; active indicator owned by a `TabBar` so it slides). +- [ ] `TextField`: std `LineEdit` styled through tokens (label, error, clear button). +- [ ] Gallery: `tunal --gallery --screenshot ` renders every control in rest, hover, pressed, focused, disabled. +- [ ] PROGRESS entry, INDEX line, commit `S004: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Gallery PNGs in light and dark rendered and looked at. +- `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. +- Press squeeze scales from the centre; keep the layout size fixed so neighbours don't move. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Component names and their properties/callbacks (one line each in PROGRESS). diff --git a/Plans/02 App skeleton/S005-menus-dialogs.md b/Plans/02 App skeleton/S005-menus-dialogs.md new file mode 100644 index 0000000..173313c --- /dev/null +++ b/Plans/02 App skeleton/S005-menus-dialogs.md @@ -0,0 +1,31 @@ +# S005 — Menus, dialogs and toasts + +> Category 02 App skeleton · Model: Opus · Effort: high · Depends on: S004 · Size: M · Human: no +> Files touched: crates/tunal/ui/components/{menu,dialog,toast,tooltip,overlay}.slint, crates/tunal/ui/gallery.slint + +## Goal +Surfaces with entry and exit motion: a popup menu (icons, shortcuts, separators, one submenu level), a modal dialog with scrim, a toast stack with progress and action, and tooltips. + +## Read +CLAUDE.md §2 Motion rules; `animate` skill; crates/tunal/ui/components/*.slint from S004. + +## Steps +- [ ] Overlay layer in the window for menus/dialogs/toasts (Slint `PopupWindow` closes instantly, so exit motion needs our own layer); clamp to window edges. +- [ ] `Menu`: opens scaled from the anchor, keyboard navigation (arrows, Enter, Esc), submenu, disabled items, closes on outside click. +- [ ] `Dialog`: scrim fade, surface scale-in, title/body/actions slots, Esc and default button, focus stays inside. +- [ ] `Toast` stack: message, progress bar (determinate/indeterminate), action and cancel; slide in/out, re-stack animated. `Tooltip` after hover delay. +- [ ] Gallery states for menu open, dialog open, two toasts; screenshots. +- [ ] PROGRESS entry, INDEX line, commit `S005: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Gallery PNGs with menu, dialog and toasts in light and dark looked at. +- `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. +- Exit animations must be interruptible: reopening during a close reverses, not restarts. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Overlay API (how app code opens a menu/dialog/toast). diff --git a/Plans/03 File browsing/.gitkeep b/Plans/03 File browsing/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/03 File browsing/S006-location-layer.md b/Plans/03 File browsing/S006-location-layer.md new file mode 100644 index 0000000..8d43031 --- /dev/null +++ b/Plans/03 File browsing/S006-location-layer.md @@ -0,0 +1,31 @@ +# S006 — Location layer and local backend + +> Category 03 File browsing · Model: Opus · Effort: medium · Depends on: S001 · Size: M · Human: no +> Files touched: crates/tunal-core/** + +## Goal +The protocol-neutral location layer every view talks to, plus the local backend: URIs, entries, errors, the `Location` trait, a scheme registry and folder watching. + +## Read +CLAUDE.md §3 (location layer rule), §4; PROMPT.md §Network connections (last bullet). + +## Steps +- [ ] Types: `Uri` (scheme, authority, path as bytes; `file://` paths keep `OsString`), `Entry` (raw name + lossy display name, kind incl. symlink target and target kind, size, mtime, mode, uid/gid, hidden), `Error` (NotFound, PermissionDenied, Exists, NotEmpty, Unsupported, Cancelled, Io, Remote) with `needs_elevation()`. +- [ ] `Location` trait (`Send + Sync`): chunked `list`, `stat`, `open_read`, `open_write`, `mkdir`, `rename`, `delete`, `trash`, `symlink`, `capabilities()`, `watch()`; unsupported operations default to `Unsupported`. +- [ ] `Locations` registry: scheme → backend; resolve a `Uri` to its backend. +- [ ] Local backend: `lstat`-based listing (symlinks not followed, target kind resolved), permission-denied folders return an error, non-UTF-8 names intact; watching with `notify` (inotify), debounced. +- [ ] Mime guess by extension (`mime_guess`); folders/symlinks typed. +- [ ] Example `cargo run -p tunal-core --example ls -- ` prints entries and timing. +- [ ] PROGRESS entry, INDEX line, commit `S006: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- On a scratch dir with a non-UTF-8 name, a broken symlink, a `chmod 000` folder and 10 000 files, `--example ls` lists everything (the 000 folder reports PermissionDenied) in under 1 s. + +## Pitfalls +- Never touch the real home in smoke runs: use the scratchpad. +- Keep the trait object-safe; backends for MTP/AFC/SFTP will implement it later. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Trait signatures and the URI format (`file://`, later `trash:///`, `ios://`, `mtp://`, `sftp://`). diff --git a/Plans/03 File browsing/S007-file-ops-engine.md b/Plans/03 File browsing/S007-file-ops-engine.md new file mode 100644 index 0000000..09ac426 --- /dev/null +++ b/Plans/03 File browsing/S007-file-ops-engine.md @@ -0,0 +1,31 @@ +# S007 — File operations engine and trash + +> Category 03 File browsing · Model: Opus · Effort: medium · Depends on: S006 · Size: L · Human: no +> Files touched: crates/tunal-core/src/ops/**, crates/tunal-core/src/trash.rs + +## Goal +Background jobs for copy, move, delete, trash, restore, empty trash, mkdir, rename and link across any backends: progress, cancel, conflicts, partial failures, and freedesktop trash with a `trash:///` location. + +## Read +CLAUDE.md §4 (file ops, trash); crates/tunal-core/src/lib.rs and the trait from S006. + +## Steps +- [ ] Job model: kinds, `JobHandle` with progress (bytes/files/current name), cancel flag, conflict requests (Skip/Overwrite/Rename/auto-rename + apply to all), error requests (Retry/Skip/Abort; PermissionDenied flagged for elevation). +- [ ] Scan pass for totals; worker queue; copy through `open_read`/`open_write` streams (cross-backend), local fast paths (rename for same-filesystem move, `copy_file_range`); move across devices = copy + delete; keep mtime/mode where supported. +- [ ] Auto-rename naming `name (2).ext`; never copy a folder into itself. +- [ ] Trash per the freedesktop spec: `$XDG_DATA_HOME/Trash` and `$topdir/.Trash-$uid` (mounts from `/proc/self/mountinfo`), `.trashinfo` with encoded path and DeletionDate, collision-free names. +- [ ] `trash:///` backend: list (original path, date), restore (with conflict), delete permanently, empty. +- [ ] Example `--example ops` runs a copy with a conflict and a trash/restore round trip in the scratchpad (with `XDG_DATA_HOME` pointed there). +- [ ] PROGRESS entry, INDEX line, commit `S007: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `--example ops` output shows progress, a resolved conflict, and a file trashed and restored, all inside the scratchpad. + +## Pitfalls +- Tests and smoke runs never use the real trash: override `XDG_DATA_HOME`. +- Partial failures must not stop the rest of the job; collect them for the UI. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Job API, progress/conflict message types, trash URI format. diff --git a/Plans/03 File browsing/S008-folder-model-details.md b/Plans/03 File browsing/S008-folder-model-details.md new file mode 100644 index 0000000..46d008b --- /dev/null +++ b/Plans/03 File browsing/S008-folder-model-details.md @@ -0,0 +1,33 @@ +# S008 — Folder model and details view + +> Category 03 File browsing · Model: Opus · Effort: medium · Depends on: S006, S005 · Size: L · Human: no +> Files touched: crates/tunal/src/folder/**, crates/tunal/src/icons.rs, crates/tunal/ui/views/details-view.slint, crates/tunal/src/main.rs, crates/tunal/ui/app.slint + +## Goal +A folder model fed from the location layer off the UI thread (sorting, grouping, hidden files, type-to-filter, live updates, selection) shown in a virtualized details view. + +## Read +CLAUDE.md §3, §4; crates/tunal-core trait; crates/tunal/ui/components/list-row.slint, menu.slint. + +## Steps +- [ ] `FolderModel`: load off-thread in chunks, apply watch diffs (insert/remove/change) keeping selection; a Slint `Model` that stays fast at 10 000+ rows. +- [ ] Sorting (natural name order, size, type, modified; folders first toggle; asc/desc) and grouping (none, type, modified date buckets, size buckets) with group header rows. +- [ ] Hidden files toggle (dot files) and type-to-filter (typing filters by substring, a filter chip shows the text, Esc clears). +- [ ] Mime → Material Symbols glyph map (folder, image, audio, video, text, code, archive, PDF, executable, generic, symlink badge). +- [ ] Details view: `ListView` rows on `ListRow`, column header with click-to-sort and animated indicator, empty/loading/error states. +- [ ] Selection: click, Ctrl, Shift range, Ctrl+A, arrows/Home/End/PageUp/PageDown, Enter on a folder opens it. Temporary: `tunal ` opens that folder. +- [ ] PROGRESS entry, INDEX line, commit `S008: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot` renders in light and dark; you looked at both. +- `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 +- Never build the whole row list on the UI thread for big folders. +- Natural sort must handle non-UTF-8 names (sort on lossy display name, keep raw name). +- 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) +FolderModel API (open, sort, group, filter, selection) used by grid view, tabs and actions. diff --git a/Plans/03 File browsing/S009-grid-and-list-motion.md b/Plans/03 File browsing/S009-grid-and-list-motion.md new file mode 100644 index 0000000..2f60520 --- /dev/null +++ b/Plans/03 File browsing/S009-grid-and-list-motion.md @@ -0,0 +1,32 @@ +# S009 — Icon grid view and list motion + +> Category 03 File browsing · Model: Opus · Effort: high · Depends on: S008 · Size: M · Human: no +> Files touched: crates/tunal/ui/views/{grid-view,details-view,view-switch}.slint, crates/tunal/src/folder/** + +## Goal +The second view mode (icon grid), the switch between views, and motion for list changes and folder navigation. + +## Read +CLAUDE.md §2 Motion rules, §4; `animate` skill; crates/tunal/ui/views/details-view.slint; crates/tunal/src/folder/ (model API). + +## Steps +- [ ] Grid view: virtualized rows of N cells from the width (reflow on resize), two-line elided labels, animated selection indicator, same selection/keyboard model as details. +- [ ] View switch (segmented control) with a cross-fade; mode stored per pane. +- [ ] List motion: insert (fade + grow), remove (fade + collapse), reorder after sort (slide); fall back to instant above a size threshold; stable keys per entry. +- [ ] Navigation transition: content slides/fades in the direction of travel (into folder, up, back). +- [ ] Reduced motion makes all of it instant. +- [ ] PROGRESS entry, INDEX line, commit `S009: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot ` (light and `--dark`) renders the new UI; you looked at both PNGs. (grid view and details view) +- `TUNAL_REDUCED_MOTION=1` run shows no transition (check the code path). +- `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 +- Slint positions `ListView` rows itself: animate an offset per row, not the row position. +- 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) +View mode enum and where it lives (needed by `.directory` view settings). diff --git a/Plans/03 File browsing/S010-navigation-shell.md b/Plans/03 File browsing/S010-navigation-shell.md new file mode 100644 index 0000000..3d761c2 --- /dev/null +++ b/Plans/03 File browsing/S010-navigation-shell.md @@ -0,0 +1,32 @@ +# S010 — Tabs, split view, breadcrumbs, history and places + +> Category 03 File browsing · Model: Opus · Effort: medium · Depends on: S008 · Size: L · Human: no +> Files touched: crates/tunal/src/{config.rs,shell/**}, crates/tunal/ui/shell/{tab-bar,pane,breadcrumb,sidebar,toolbar,status-bar}.slint, crates/tunal/ui/app.slint + +## Goal +The navigation shell: tabs, split view, editable breadcrumb path bar, back/forward/up history, places sidebar with bookmarks, and the config directory. + +## Read +CLAUDE.md §3; docs/DECISIONS.md D-012; crates/tunal/src/folder/ API; crates/tunal/ui/components/{tab,list-row,text-field}.slint. + +## Steps +- [ ] Config module: `$XDG_CONFIG_HOME/tunal/*.toml` with serde, atomic writes; `settings.toml` (later plans add fields) and session restore of open tabs. +- [ ] Pane = location + back/forward stacks + folder model + view mode; tab = one or two panes; split view toggle; active pane indicator. +- [ ] Tab bar: new/close/switch, middle-click close, drag to reorder, animated add/close/reorder; Ctrl+T/Ctrl+W/Ctrl+Tab. +- [ ] Breadcrumb: segment chips navigate; Ctrl+L or click on empty space edits the path with folder completion; Enter goes, Esc reverts; accepts URIs (`trash:///`, later others). +- [ ] Back/forward/up buttons, Alt+Left/Right/Up, mouse back/forward buttons. +- [ ] Places sidebar: XDG user dirs (from `user-dirs.dirs`), Trash, Bookmarks (`places.toml`: add current folder, rename, remove, reorder); empty Devices/Network sections with an API for later plans; collapse animated. Status bar: item count and selection size. +- [ ] PROGRESS entry, INDEX line, commit `S010: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot ` (light and `--dark`) renders the new UI; you looked at both PNGs. with two tabs, split view and the sidebar (`tunal --split `). +- `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 +- Use the scratchpad as `XDG_CONFIG_HOME` in smoke runs. +- 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) +Places API for Devices/Network sections; config module; how to open a URI in a new tab. diff --git a/Plans/03 File browsing/S011-file-op-actions.md b/Plans/03 File browsing/S011-file-op-actions.md new file mode 100644 index 0000000..849bac6 --- /dev/null +++ b/Plans/03 File browsing/S011-file-op-actions.md @@ -0,0 +1,31 @@ +# S011 — File operation actions + +> Category 03 File browsing · Model: Sonnet · Effort: high · Depends on: S007, S010 · Size: M · Human: no +> Files touched: crates/tunal/src/actions.rs, crates/tunal/src/jobs_bridge.rs, crates/tunal/ui/dialogs/{conflict,confirm,errors}.slint, crates/tunal/ui/views/*.slint (inline rename), crates/tunal/ui/shell/toolbar.slint + +## Goal +Users can copy path, copy, cut, paste, rename, create folders, trash, delete, and restore from trash, with progress, conflict and error UI. + +## Read +crates/tunal-core/src/ops/ (job API); crates/tunal/src/folder/, src/shell/; crates/tunal/ui/components/{menu,dialog,toast}.slint. + +## Steps +- [ ] Action registry: id, label, glyph, shortcut, enabled(selection, location capabilities); used by toolbar, shortcuts and a fixed default context menu (made editable in S013). +- [ ] Internal clipboard: copy/cut/paste (cut items dimmed), Copy path (Ctrl+Shift+C) as text on the system clipboard. +- [ ] Inline rename (F2, base name preselected) and new folder (Ctrl+Shift+N) inline. +- [ ] Trash (Del), delete permanently (Shift+Del, confirm dialog), restore/delete/empty in `trash:///`. +- [ ] Jobs bridge: progress toasts with cancel, conflict dialog (both sides' size/date, apply to all), partial-failure error list. +- [ ] PROGRESS entry, INDEX line, commit `S011: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Smoke: in a scratch dir, run `tunal`, paste a file into a folder that already holds it → conflict dialog shown (screenshot), trash and restore a file (screenshot of `trash:///`). +- `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 +- Use the scratchpad for `XDG_DATA_HOME`/`XDG_CONFIG_HOME` in smoke runs. +- Keep a hook for PermissionDenied → elevation (S016). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Action ids list (context menu editor and other plans add actions here). diff --git a/Plans/03 File browsing/S012-properties-open-with.md b/Plans/03 File browsing/S012-properties-open-with.md new file mode 100644 index 0000000..7e51cd0 --- /dev/null +++ b/Plans/03 File browsing/S012-properties-open-with.md @@ -0,0 +1,28 @@ +# S012 — Properties, Open and Open with + +> Category 03 File browsing · Model: Sonnet · Effort: medium · Depends on: S011 · Size: M · Human: no +> Files touched: crates/tunal/src/{open.rs,desktop_apps.rs,properties.rs}, crates/tunal/ui/dialogs/{properties,open-with}.slint + +## Goal +Properties dialog; files open in their default app; an Open with chooser lists apps from .desktop files. + +## Read +crates/tunal/src/actions.rs; crates/tunal/ui/components/dialog.slint; crates/tunal-core trait. + +## Steps +- [ ] Properties: name, type, location, size (recursive count off-thread with live update), dates, permissions as text and rwx grid, owner/group names, symlink target; multi-selection summary. Read only (editing → Later). +- [ ] Open: Enter/double-click on a file → portal `OpenURI` via zbus; fallback spawn `xdg-open` without a shell. +- [ ] Desktop apps: parse `.desktop` files from `XDG_DATA_DIRS/applications` and `mimeapps.list` (defaults, added/removed associations); app icons from the icon theme with a glyph fallback. +- [ ] Open with dialog: apps for the mime type, other apps, set as default (writes `$XDG_CONFIG_HOME/mimeapps.list`); launch with Exec field codes (%f %F %u %U), no shell. +- [ ] PROGRESS entry, INDEX line, commit `S012: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Smoke: properties dialog and Open with dialog screenshots for a scratch file; `XDG_CONFIG_HOME` in the scratchpad when testing set-as-default. + +## Pitfalls +- Exec lines: implement field-code expansion and quoting per the desktop entry spec; never `sh -c`. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Desktop-entry/icon-theme helpers (S015 reuses icon theme lookup). diff --git a/Plans/03 File browsing/S013-settings-context-menus.md b/Plans/03 File browsing/S013-settings-context-menus.md new file mode 100644 index 0000000..f2b783e --- /dev/null +++ b/Plans/03 File browsing/S013-settings-context-menus.md @@ -0,0 +1,29 @@ +# 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). diff --git a/Plans/03 File browsing/S014-in-app-dnd.md b/Plans/03 File browsing/S014-in-app-dnd.md new file mode 100644 index 0000000..ef7e45d --- /dev/null +++ b/Plans/03 File browsing/S014-in-app-dnd.md @@ -0,0 +1,30 @@ +# S014 — In-app drag and drop + +> Category 03 File browsing · Model: Opus · Effort: medium · Depends on: S011 · Size: M · Human: no +> Files touched: crates/tunal/src/dnd.rs, crates/tunal/ui/components/drop-menu.slint, crates/tunal/ui/views/*.slint, crates/tunal/ui/shell/{sidebar,tab-bar,breadcrumb,pane}.slint + +## Goal +Drag files inside Tunal between panes, tabs, folders, breadcrumbs and places; a Move/Copy/Link/Cancel menu on drop (D-014). + +## Read +docs/DECISIONS.md D-014; Slint 1.19 `DragArea`/`DropArea` docs and `~/.cargo/registry/src/*/slint-1.19.0/tests/native_drag.rs`; crates/tunal/src/actions.rs. + +## Steps +- [ ] Drag source from the selection in both views (drag image with count badge); payload as a `text/uri-list` string so S030/S031 can hand it to other apps. +- [ ] Drop targets: folder rows/cells, pane background, tabs (hover switches after a delay), breadcrumb segments, places entries; animated drop highlight. +- [ ] Drop menu Move / Copy / Link / Cancel at the pointer; Shift = move, Ctrl = copy, Ctrl+Shift = link skip the menu; refuse drops into self or descendants. +- [ ] Sidebar: drop a folder on the bookmarks section to add it; drag bookmarks to reorder. +- [ ] PROGRESS entry, INDEX line, commit `S014: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Smoke screenshot with the drop menu open over a folder row. +- `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 +- Check the real 1.19 API in the registry sources before using it; invent nothing. +- 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) +Drag payload format and the drop-menu entry point (native DnD calls the same code). diff --git a/Plans/04 Directory metadata/.gitkeep b/Plans/04 Directory metadata/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/04 Directory metadata/S015-directory-metadata.md b/Plans/04 Directory metadata/S015-directory-metadata.md new file mode 100644 index 0000000..0b983ef --- /dev/null +++ b/Plans/04 Directory metadata/S015-directory-metadata.md @@ -0,0 +1,30 @@ +# S015 — `.directory` folder metadata + +> Category 04 Directory metadata · Model: Sonnet · Effort: high · Depends on: S009, S010 · Size: M · Human: no +> Files touched: crates/tunal-dirmeta/**, crates/tunal/src/folder/**, crates/tunal/ui/dialogs/folder-appearance.slint + +## Goal +Read `.directory` files for folder icon, display name and view settings, apply them, and let the user edit them. + +## Read +CLAUDE.md §4 (.directory); docs/DECISIONS.md D-017; crates/tunal/src/folder/ API; crates/tunal/src/desktop_apps.rs (icon theme lookup). + +## Steps +- [ ] Lossless parser/writer: keeps comments, blank lines, unknown groups/keys, localized keys (`Name[de]`); get/set API. +- [ ] Keys (D-017): `[Desktop Entry]` `Icon` (theme name or absolute path) and `Name` (localized by `LANG`); our view settings in `[X-Tunal]` (view mode, sort, sort order, grouping, hidden files, previews) and `Glyph` for a Material glyph. +- [ ] Apply: child folder icons and names in views (read lazily off-thread, cached by mtime); opening a folder applies its view settings; the display name shows in breadcrumb/sidebar with the real name as tooltip. +- [ ] Folder appearance dialog (context menu action): icon picker (Material glyphs, theme `folder-*` icons, image file), display name, 'remember view settings for this folder'. +- [ ] Write failure with PermissionDenied → error with the elevation hook (S016). +- [ ] PROGRESS entry, INDEX line, commit `S015: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Round trip: edit `Icon` in a sample file with comments and unknown keys; `diff` shows only that line changed. +- Smoke screenshot: a folder with a custom icon and display name. + +## Pitfalls +- Never write the reference app's group name; only read standard keys and our `[X-Tunal]` group. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +dirmeta API; which settings are per folder. diff --git a/Plans/05 Elevation/.gitkeep b/Plans/05 Elevation/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/05 Elevation/S016-pkexec-elevation.md b/Plans/05 Elevation/S016-pkexec-elevation.md new file mode 100644 index 0000000..0f18936 --- /dev/null +++ b/Plans/05 Elevation/S016-pkexec-elevation.md @@ -0,0 +1,33 @@ +# S016 — Root operations through pkexec + +> Category 05 Elevation · Model: Opus · Effort: high · Depends on: S011 · Size: L · Human: no +> Files touched: crates/tunal-elevate/**, crates/tunal/src/{main.rs,actions.rs,jobs_bridge.rs}, assets/polkit/** + +## Goal +When an operation fails with PermissionDenied, offer 'Retry as administrator': polkit's agent asks for the password (Tunal never sees it, D-018) and a root helper runs the operation. + +## Read +docs/DECISIONS.md D-018; CLAUDE.md §3 (secrets); crates/tunal-core trait and ops job API; crates/tunal/src/jobs_bridge.rs. + +## Steps +- [ ] Protocol: length-prefixed serde messages over stdin/stdout: requests (copy, move, delete, mkdir, rename, write file, symlink) and replies (progress, done, error); version handshake. +- [ ] Helper mode `tunal --elevated-helper` handled first in `main` before any UI; absolute paths only, no shell, exits on EOF. +- [ ] Launcher: `pkexec --elevated-helper`; exit codes 126/127 → 'cancelled' / 'not authorized'; no polkit agent → clear error. +- [ ] `ElevatedLocal` backend implementing `Location` through the helper, so the ops engine reruns the failed items through it. +- [ ] UI: PermissionDenied error → 'Retry as administrator'; `.directory` writes use the same path. +- [ ] Polkit policy `assets/polkit/.policy` (exec path annotation, `auth_admin_keep`) — installed by S037; without it pkexec's generic action applies. +- [ ] Smoke: drive the helper as the normal user (no pkexec) with a small example against the scratchpad. +- [ ] PROGRESS entry, INDEX line, commit `S016: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Helper smoke example copies and deletes in the scratchpad and exits on EOF. +- `grep -rn 'sh -c' crates/tunal-elevate crates/tunal/src` finds nothing. + +## Pitfalls +- pkexec clears the environment: the helper must not need env vars or a display. +- The real password test happens in phase 12 (S036), not here. +- 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 to call the elevated backend; policy file id. diff --git a/Plans/06 Thumbnails/.gitkeep b/Plans/06 Thumbnails/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/06 Thumbnails/S017-thumbnail-crate.md b/Plans/06 Thumbnails/S017-thumbnail-crate.md new file mode 100644 index 0000000..97a2981 --- /dev/null +++ b/Plans/06 Thumbnails/S017-thumbnail-crate.md @@ -0,0 +1,29 @@ +# S017 — Thumbnail generation and cache + +> Category 06 Thumbnails · Model: Sonnet · Effort: high · Depends on: S001 · Size: M · Human: no +> Files touched: crates/tunal-thumbs/** + +## Goal +`tunal-thumbs`: thumbnails for images, SVG, embedded album art and video frames (ffmpeg CLI, D-004) in the shared freedesktop cache. + +## Read +docs/DECISIONS.md D-004, D-012, D-016; freedesktop thumbnail spec (summarize from memory only what you're sure of; check `~/.cache/thumbnails` layout). + +## Steps +- [ ] Cache per the spec: normal 128 / large 256 / x-large 512, MD5 of the file URI, PNG with `Thumb::URI` and `Thumb::MTime` (and `Thumb::Size`), fail entries under `fail/tunal-`. +- [ ] Generators: raster images via `image`, SVG via `resvg`, audio cover via `lofty`, video via `ffmpeg -ss -i -frames:v 1` to PNG on stdout with timeout; timestamp as percent or seconds (default 10%, duration from `ffprobe`). ffmpeg missing → no video thumbnail. +- [ ] Worker pool with priority and cancel; size limit; local files only by default (remote allowed by setting). +- [ ] Example `--example thumb -- ` prints the cache path. +- [ ] PROGRESS entry, INDEX line, commit `S017: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `--example thumb` makes thumbnails for a PNG, an SVG, an MP3 with cover and a video generated with ffmpeg in the scratchpad, with `XDG_CACHE_HOME` in the scratchpad. + +## Pitfalls +- Never thumbnail files inside the thumbnail cache itself. +- Kill ffmpeg on timeout/cancel; no shell. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Request/cancel API and result type. diff --git a/Plans/06 Thumbnails/S018-thumbnails-in-views.md b/Plans/06 Thumbnails/S018-thumbnails-in-views.md new file mode 100644 index 0000000..bdc51c6 --- /dev/null +++ b/Plans/06 Thumbnails/S018-thumbnails-in-views.md @@ -0,0 +1,29 @@ +# S018 — Thumbnails in the views + +> Category 06 Thumbnails · Model: Opus · Effort: medium · Depends on: S017, S009 · Size: M · Human: no +> Files touched: crates/tunal/src/thumbs_bridge.rs, crates/tunal/ui/views/*.slint, crates/tunal/ui/dialogs/settings.slint + +## Goal +Previews on/off; thumbnails requested only for visible items, faded in on arrival; plain Material icons when off. + +## Read +crates/tunal-thumbs API; crates/tunal/ui/views/*.slint; crates/tunal/src/folder/. + +## Steps +- [ ] Previews toggle in the toolbar, default in settings, per folder through `.directory` view settings. +- [ ] Request from row/cell `init` (ListView only instantiates visible delegates), cancel when the delegate goes away; in-memory LRU of `slint::Image`. +- [ ] Fade-in on arrival; sizes per view (details small, grid large). +- [ ] Settings Previews page: video timestamp (percent/seconds), maximum file size, previews on remote locations (off by default). +- [ ] PROGRESS entry, INDEX line, commit `S018: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot ` (light and `--dark`) renders the new UI; you looked at both PNGs. of a scratch folder with images, audio with cover and a video, previews on and off. +- `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) +— diff --git a/Plans/07 Tag editor/.gitkeep b/Plans/07 Tag editor/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/07 Tag editor/S019-tag-model.md b/Plans/07 Tag editor/S019-tag-model.md new file mode 100644 index 0000000..7dcf3e0 --- /dev/null +++ b/Plans/07 Tag editor/S019-tag-model.md @@ -0,0 +1,28 @@ +# S019 — Tag model with lofty + +> Category 07 Tag editor · Model: Sonnet · Effort: medium · Depends on: S001 · Size: M · Human: no +> Files touched: crates/tunal-tags/src/{lib,model,io}.rs, crates/tunal-tags/Cargo.toml + +## Goal +Read and write music tags for one or many files, merge many files into one editable set, embed covers. + +## Read +docs/DECISIONS.md D-011; lofty docs in ~/.cargo/registry. + +## Steps +- [ ] `TrackTags`: title, artist, album, album artist, track no/total, disc no/total, date, genre, composer, comment, MusicBrainz ids, pictures. +- [ ] Read/write with lofty, preserving fields we don't edit. +- [ ] `TagSet` for many files: each field Same(v) or Mixed; edits with Keep semantics. +- [ ] Cover: set/replace/remove the front cover (JPEG/PNG). +- [ ] Example `--example tags -- ` dumps and writes a field on fixtures generated with ffmpeg in the scratchpad (mp3, flac, ogg, m4a). +- [ ] PROGRESS entry, INDEX line, commit `S019: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `--example tags` writes a title and a cover to each fixture and reads them back. + +## Pitfalls +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Model types used by the MusicBrainz client and the editor UI. diff --git a/Plans/07 Tag editor/S020-musicbrainz-client.md b/Plans/07 Tag editor/S020-musicbrainz-client.md new file mode 100644 index 0000000..1edac4e --- /dev/null +++ b/Plans/07 Tag editor/S020-musicbrainz-client.md @@ -0,0 +1,30 @@ +# S020 — MusicBrainz and Cover Art Archive client + +> Category 07 Tag editor · Model: Sonnet · Effort: high · Depends on: S019 · Size: M · Human: no +> Files touched: crates/tunal-tags/src/{http,mb,caa}.rs, crates/tunal-tags/Cargo.toml + +## Goal +Search releases and recordings on MusicBrainz, fetch release details and front covers from the Cover Art Archive, within 1 request/s across the app. + +## Read +CLAUDE.md §2 MusicBrainz; docs/DECISIONS.md D-019 (TLS). + +## Steps +- [ ] HTTP: `ureq` with rustls + ring (D-019), User-Agent from CLAUDE.md, base URLs overridable for mocks; one global limiter (≥ 1 s between requests to either service); 503 → back off and retry. +- [ ] MusicBrainz: release search (artist, album, track count), recording search, release lookup with recordings, artist credits, release group, genres; JSON → our types. +- [ ] Cover Art Archive: front cover (500 px) for a release, following redirects. +- [ ] Track matching helper: map files to release tracks by disc/position, then duration and title similarity. +- [ ] Example against a local mock (canned JSON served from the scratchpad with `python -m http.server`). +- [ ] PROGRESS entry, INDEX line, commit `S020: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Example against the local mock returns a release with tracks and a cover; two calls are ≥ 1 s apart (timestamps in output). + +## Pitfalls +- Never hit the real service in smoke runs (CLAUDE.md §4). +- Check that rustls's ring provider is selected, not aws-lc-rs (`cargo tree -i aws-lc-rs` empty). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Client API. diff --git a/Plans/07 Tag editor/S021-tag-editor-ui.md b/Plans/07 Tag editor/S021-tag-editor-ui.md new file mode 100644 index 0000000..1dc10d6 --- /dev/null +++ b/Plans/07 Tag editor/S021-tag-editor-ui.md @@ -0,0 +1,29 @@ +# S021 — Tag editor UI + +> Category 07 Tag editor · Model: Opus · Effort: medium · Depends on: S020, S013 · Size: L · Human: no +> Files touched: crates/tunal/src/tags_bridge.rs, crates/tunal/ui/dialogs/{tag-editor,tag-lookup}.slint, crates/tunal/src/actions.rs + +## Goal +Edit tags of one or many audio files, look up metadata and covers, and embed them. + +## Read +crates/tunal-tags API; crates/tunal/src/{actions.rs,menus.rs}; crates/tunal/ui/components/{dialog,text-field,list-row}.slint. + +## Steps +- [ ] 'Edit tags' action on audio files (single and multi) added to the registry and default menus. +- [ ] Editor: fields with 'Keep' placeholder for mixed values, cover area (current, replace from file, remove, drop an image), save off-thread with progress. +- [ ] Lookup: search prefilled from tags → candidate releases (title, artist, date, country, track count, cover) → file ↔ track mapping (auto, editable) → preview of changes → apply and embed cover. +- [ ] Errors (offline, rate limited, not found) shown plainly. +- [ ] PROGRESS entry, INDEX line, commit `S021: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot ` (light and `--dark`) renders the new UI; you looked at both PNGs. of the editor (multi-file) and the lookup step, using the local mock base URL. +- `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) +— diff --git a/Plans/08 Audio player/.gitkeep b/Plans/08 Audio player/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/08 Audio player/S022-player-backend.md b/Plans/08 Audio player/S022-player-backend.md new file mode 100644 index 0000000..2e5957b --- /dev/null +++ b/Plans/08 Audio player/S022-player-backend.md @@ -0,0 +1,29 @@ +# S022 — Audio player backend + +> Category 08 Audio player · Model: Opus · Effort: medium · Depends on: S001 · Size: M · Human: no +> Files touched: crates/tunal-player/** + +## Goal +Play audio files with symphonia + cpal (D-005): play, pause, seek, volume, position events, and waveform peaks. + +## Read +docs/DECISIONS.md D-005; symphonia and cpal docs in ~/.cargo/registry. + +## Steps +- [ ] Decode thread (symphonia: mp3, flac, vorbis, aac/mp4, wav) → lock-free ring buffer → cpal output on the default device; resample with `rubato` when rates differ. +- [ ] Controls and events: play/pause/stop/seek/volume; position ~10×/s only while playing; ended; error. +- [ ] Waveform: decode off-thread into N min/max buckets, cancelable, cached by path + mtime. +- [ ] Example `--example play -- ` at volume 0 prints positions and bucket count. +- [ ] PROGRESS entry, INDEX line, commit `S022: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `--example play` on an ffmpeg-generated fixture prints advancing positions and the waveform bucket count. + +## Pitfalls +- Formats symphonia can't decode (e.g. opus) → plain 'unsupported' error. +- Stop the output stream when paused/stopped (no idle work). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Player API. diff --git a/Plans/08 Audio player/S023-player-ui.md b/Plans/08 Audio player/S023-player-ui.md new file mode 100644 index 0000000..a93a0d7 --- /dev/null +++ b/Plans/08 Audio player/S023-player-ui.md @@ -0,0 +1,28 @@ +# S023 — Quick player with waveform seek bar + +> Category 08 Audio player · Model: Opus · Effort: medium · Depends on: S022, S010 · Size: M · Human: no +> Files touched: crates/tunal/src/player_bridge.rs, crates/tunal/ui/shell/player-bar.slint, crates/tunal/src/actions.rs + +## Goal +A quick player bar: Space or 'Play' on an audio file, waveform seek bar with scrubbing. + +## Read +crates/tunal-player API; crates/tunal/src/actions.rs; `animate` skill. + +## Steps +- [ ] Play action (Space on selected audio, context menu) and a player bar that slides in at the bottom: play/pause, title/artist (tags crate), time, volume, close. +- [ ] Waveform seek bar: bars from peaks (downsampled to width), played part tinted, hover line, click/drag seek, ←/→ keys. +- [ ] Repaint only while playing or scrubbing. +- [ ] PROGRESS entry, INDEX line, commit `S023: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot ` (light and `--dark`) renders the new UI; you looked at both PNGs. with the player bar open on a fixture. +- `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) +— diff --git a/Plans/09 Devices/.gitkeep b/Plans/09 Devices/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/09 Devices/S024-ios-afc.md b/Plans/09 Devices/S024-ios-afc.md new file mode 100644 index 0000000..9bbc842 --- /dev/null +++ b/Plans/09 Devices/S024-ios-afc.md @@ -0,0 +1,29 @@ +# S024 — iOS devices over AFC + +> Category 09 Devices · Model: Opus · Effort: high · Depends on: S007, S010 · Size: L · Human: no +> Files touched: crates/tunal-devices/src/ios/**, crates/tunal-devices/Cargo.toml, crates/tunal/src/devices_bridge.rs, crates/tunal/ui/shell/sidebar.slint + +## Goal +Browse and transfer files on iPhones as an `ios://` location through the `idevice` crate and the system usbmuxd (D-006). + +## Read +docs/DECISIONS.md D-006, D-016; `idevice` crate docs in ~/.cargo/registry (check the real API first); crates/tunal-core trait; places API from S010. + +## Steps +- [ ] usbmuxd connection, device list and attach/detach listening; usbmuxd missing → iOS support hidden, no error. +- [ ] Lockdown with the pair record from usbmuxd; unpaired → start pairing and show 'Unlock the iPhone and tap Trust'. +- [ ] AFC service: list, stat, read/write streaming, mkdir, rename, delete (permanent, with confirm) as the `ios:///` `Location`. +- [ ] Device entries in the places Devices section (name, eject = close), opening a tab at its root. +- [ ] Smoke without a device: discovery returns nothing, no panic, app runs. +- [ ] PROGRESS entry, INDEX line, commit `S024: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Smoke: app and example run with no device attached and with usbmuxd stopped-or-absent path simulated (bad socket path env). + +## Pitfalls +- Real-device checks happen in phase 12 (S036). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Device events API shared with MTP. diff --git a/Plans/09 Devices/S025-mtp-protocol.md b/Plans/09 Devices/S025-mtp-protocol.md new file mode 100644 index 0000000..8e68d07 --- /dev/null +++ b/Plans/09 Devices/S025-mtp-protocol.md @@ -0,0 +1,29 @@ +# S025 — MTP protocol over nusb + +> Category 09 Devices · Model: Opus · Effort: high · Depends on: S001 · Size: L · Human: no +> Files touched: crates/tunal-devices/src/mtp/{transport,container,session,ops}.rs, crates/tunal-devices/Cargo.toml + +## Goal +A pure-Rust MTP/PTP client (D-007) over a transport trait with an `nusb` implementation. + +## Read +docs/DECISIONS.md D-007; `nusb` docs in ~/.cargo/registry. + +## Steps +- [ ] Transport trait (bulk in/out, interrupt in) and the nusb implementation: find the MTP interface (class 6/1/1 or vendor interface named 'MTP'), claim it. +- [ ] Containers: command/data/response/event encode/decode, transaction ids, packet boundaries and zero-length packets, PTP strings (UCS-2 with length) and dates. +- [ ] Session: OpenSession/CloseSession, GetDeviceInfo, GetStorageIDs, GetStorageInfo. +- [ ] Objects: GetObjectHandles, GetObjectInfo, GetObjectPropList when supported, GetObject/GetPartialObject64 streamed, SendObjectInfo + SendObject streamed, DeleteObject, MoveObject, CopyObject, rename via SetObjectPropValue(ObjectFileName); response codes → errors. +- [ ] Replay transport and an example running a scripted session against it. +- [ ] PROGRESS entry, INDEX line, commit `S025: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Example against the replay transport lists, downloads, uploads and renames objects. + +## Pitfalls +- Stream large transfers in chunks; never hold a whole file in memory. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Session API. diff --git a/Plans/09 Devices/S026-mtp-location.md b/Plans/09 Devices/S026-mtp-location.md new file mode 100644 index 0000000..23a2f69 --- /dev/null +++ b/Plans/09 Devices/S026-mtp-location.md @@ -0,0 +1,28 @@ +# S026 — Android devices over MTP + +> Category 09 Devices · Model: Opus · Effort: high · Depends on: S025, S007, S010 · Size: M · Human: no +> Files touched: crates/tunal-devices/src/mtp/{location,hotplug}.rs, crates/tunal/src/devices_bridge.rs, crates/tunal/ui/shell/sidebar.slint + +## Goal +Android phones as `mtp://` locations with hotplug and places entries. + +## Read +crates/tunal-devices/src/mtp/ session API; crates/tunal/src/devices_bridge.rs (from S024); places API. + +## Steps +- [ ] `mtp:////` `Location`: path ↔ handle cache, invalidated by MTP events; list/stat/read/write/mkdir/rename/delete (permanent, confirm). +- [ ] nusb hotplug watch; device and its storages in places Devices. +- [ ] Clear messages: interface busy (another program holds the phone), no USB permission, phone locked / not in file transfer mode (no storages). +- [ ] Smoke without a device. +- [ ] PROGRESS entry, INDEX line, commit `S026: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- App runs with no device attached; Devices section empty without errors. + +## Pitfalls +- Real-device checks happen in phase 12 (S036). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/10 Network/.gitkeep b/Plans/10 Network/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/10 Network/S027-ssh-config-known-hosts.md b/Plans/10 Network/S027-ssh-config-known-hosts.md new file mode 100644 index 0000000..73a7c51 --- /dev/null +++ b/Plans/10 Network/S027-ssh-config-known-hosts.md @@ -0,0 +1,29 @@ +# S027 — ssh config and known_hosts + +> Category 10 Network · Model: Sonnet · Effort: high · Depends on: S001 · Size: M · Human: no +> Files touched: crates/tunal-net/src/{ssh_config,known_hosts}.rs + +## Goal +Hosts from `~/.ssh/config` and host-key checking against `known_hosts` plus Tunal's own accepted-keys file (D-020). + +## Read +docs/DECISIONS.md D-020; CLAUDE.md §1 (never modify ~/.ssh). + +## Steps +- [ ] Config parser: Host (concrete aliases listed; wildcards/negations used only for matching), HostName, Port, User, IdentityFile (`~` expansion, several), IdentitiesOnly, Include (globs, relative to ~/.ssh); Match blocks skipped; ProxyJump/ProxyCommand flagged unsupported. +- [ ] Resolve an alias with first-match-wins semantics. +- [ ] known_hosts: plain and hashed (`|1|` HMAC-SHA1) entries, `[host]:port`, `@revoked`; `@cert-authority` ignored; result Match / Mismatch / Unknown / Revoked. +- [ ] Accepted keys are appended to `$XDG_CONFIG_HOME/tunal/known_hosts` (never ~/.ssh), read together with `~/.ssh/known_hosts`. +- [ ] Example parsing sample files in the scratchpad (HOME overridden). +- [ ] PROGRESS entry, INDEX line, commit `S027: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Example lists hosts from a sample config with an Include and checks a hashed and a plain entry. + +## Pitfalls +- Never write under ~/.ssh. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +API for the SFTP backend and the UI. diff --git a/Plans/10 Network/S028-sftp-location.md b/Plans/10 Network/S028-sftp-location.md new file mode 100644 index 0000000..bd1330a --- /dev/null +++ b/Plans/10 Network/S028-sftp-location.md @@ -0,0 +1,32 @@ +# S028 — SFTP location + +> Category 10 Network · Model: Opus · Effort: high · Depends on: S027, S007 · Size: L · Human: no +> Files touched: crates/tunal-net/src/{sftp,session,auth}.rs, crates/tunal-net/Cargo.toml + +## Goal +`sftp://user@host:port/path` as a `Location` via `russh` + `russh-sftp`: agent, key and password auth, host-key checks, connection reuse. + +## Read +docs/DECISIONS.md D-019, D-020; CLAUDE.md §3 (secrets); crates/tunal-core trait; russh/russh-sftp docs in ~/.cargo/registry. + +## Steps +- [ ] Own tokio runtime on a background thread inside `tunal-net`; blocking `Location` API on top; russh crypto features on ring (D-019), not aws-lc-rs. +- [ ] Connection manager per (user, host, port): reuse, keepalive, reconnect, idle close. +- [ ] Auth chain: agent (`SSH_AUTH_SOCK`) → identity files (passphrase callback) → password / keyboard-interactive callback; secrets in `secrecy`/`zeroize` types only. +- [ ] Host key via known_hosts: Unknown → callback (SHA256 fingerprint), Mismatch → hard error. +- [ ] Location ops: readdir, stat/lstat, readlink, pipelined read/write, mkdir, rename (posix-rename extension when offered), delete; trash Unsupported (permanent delete with confirm). +- [ ] Example `--example sftp-ls -- ` (only against a server the user names; otherwise build-only). +- [ ] PROGRESS entry, INDEX line, commit `S028: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `cargo tree -p tunal-net -i aws-lc-rs` is empty. +- `grep -rnE 'password|passphrase' crates/tunal-net/src | grep -iE 'log|println|debug!'` finds nothing. + +## Pitfalls +- Never connect through proxies; ProxyJump hosts show 'unsupported'. +- Real-server checks happen in phase 12. +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Callback API for prompts (host key, password, passphrase). diff --git a/Plans/10 Network/S029-sftp-ui.md b/Plans/10 Network/S029-sftp-ui.md new file mode 100644 index 0000000..e7d8dd9 --- /dev/null +++ b/Plans/10 Network/S029-sftp-ui.md @@ -0,0 +1,29 @@ +# S029 — SFTP connections in the UI + +> Category 10 Network · Model: Opus · Effort: high · Depends on: S028, S010 · Size: M · Human: no +> Files touched: crates/tunal/src/net_bridge.rs, crates/tunal/ui/dialogs/{connection,host-key,secret-prompt}.slint, crates/tunal/ui/shell/sidebar.slint + +## Goal +Saved connections and ssh-config hosts in places; prompts for unknown hosts, passwords and passphrases. + +## Read +crates/tunal-net API; places API; crates/tunal/ui/components/{dialog,text-field}.slint; CLAUDE.md §3 (secrets). + +## Steps +- [ ] `connections.toml`: name, host, port, user, start folder, auth (agent / key path / password — the password itself is never saved); add/edit/remove dialog. +- [ ] Network section in places: saved connections and ssh-config hosts ('save as connection'); opening one opens a tab at its `sftp://` URI; breadcrumb accepts `sftp://`. +- [ ] Prompts: unknown host (fingerprint; accept once / always), mismatch warning, password and passphrase (secret field moved into a secret type at once, field cleared). +- [ ] Connection state and errors with retry; disconnect action. +- [ ] PROGRESS entry, INDEX line, commit `S029: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `tunal --screenshot ` (light and `--dark`) renders the new UI; you looked at both PNGs. of the connection dialog and the host-key prompt (rendered from the gallery). +- `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) +— diff --git a/Plans/11 Native drag and drop/S030-native-dnd-wayland.md b/Plans/11 Native drag and drop/S030-native-dnd-wayland.md new file mode 100644 index 0000000..30891e0 --- /dev/null +++ b/Plans/11 Native drag and drop/S030-native-dnd-wayland.md @@ -0,0 +1,30 @@ +# S030 — Native drag and drop and file clipboard on Wayland + +> Category 11 Native drag and drop · Model: Opus · Effort: high · Depends on: S014 · Size: L · Human: no +> Files touched: crates/tunal/src/native/{mod,wayland}.rs, crates/tunal/src/{dnd.rs,clipboard.rs}, crates/tunal/Cargo.toml + +## Goal +Drag files from Tunal into other apps (e.g. Discord) and from other apps into Tunal with the drop menu; copy/paste files with other apps (D-014). + +## Read +docs/DECISIONS.md D-014, D-016; crates/tunal/src/dnd.rs; Slint 1.19 winit accessor and `i-slint-core` drag code in ~/.cargo/registry. + +## Steps +- [ ] Spike, then record the approach in DECISIONS.md: get `wl_display`/`wl_surface` from Slint's winit window (raw-window-handle), wrap the foreign display with `wayland-backend` (`client_system`), bind `wl_data_device_manager` and our own `wl_pointer`/`wl_keyboard` for serials; dispatch our queue on a thread. +- [ ] Drag out: when an in-app drag leaves the window, start `wl_data_device.start_drag` with the press serial; offer `text/uri-list`, `text/plain;charset=utf-8` and an internal type; drag icon surface; finish reports the action. +- [ ] Drag in: data offers on our surface → hit-test the Slint drop target under the pointer (choose: Slint's internal native-drag path pinned to 1.19, or our own hit test) → highlight → drop menu → ops job. +- [ ] File clipboard: copy/cut set `text/uri-list` + `x-special/gnome-copied-files`; paste reads them from other apps. +- [ ] X11 or no Wayland: code path disabled cleanly. +- [ ] PROGRESS entry, INDEX line, commit `S030: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- App still runs under `WAYLAND_DISPLAY` unset (X11 fallback) and with Wayland; a drag that leaves the window doesn't crash (log line shows start_drag). + +## Pitfalls +- libwayland is already loaded by Slint/winit; no new system package (D-016). +- Real-app checks (Discord, browser) happen in phase 12 (S036). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +Native module API reused by X11. diff --git a/Plans/11 Native drag and drop/S031-native-dnd-x11.md b/Plans/11 Native drag and drop/S031-native-dnd-x11.md new file mode 100644 index 0000000..e5e1721 --- /dev/null +++ b/Plans/11 Native drag and drop/S031-native-dnd-x11.md @@ -0,0 +1,28 @@ +# S031 — Native drag and drop and file clipboard on X11 + +> Category 11 Native drag and drop · Model: Opus · Effort: high · Depends on: S030 · Size: M · Human: no +> Files touched: crates/tunal/src/native/x11.rs, crates/tunal/Cargo.toml + +## Goal +The same as S030 on X11 with XDND and the CLIPBOARD selection via `x11rb` (pure Rust). + +## Read +crates/tunal/src/native/{mod,wayland}.rs; docs/DECISIONS.md (S030 entry). + +## Steps +- [ ] Window id from raw-window-handle; own `x11rb` connection; XdndAware on our window. +- [ ] Drag out: XDND source (XdndEnter/Position/Drop/Finished, selection `XdndSelection` with uri-list). +- [ ] Drag in: XDND target mapped to the same hit test and drop menu. +- [ ] Clipboard: own CLIPBOARD for file copy/cut, read other apps' uri-list on paste. +- [ ] PROGRESS entry, INDEX line, commit `S031: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- App runs with `WAYLAND_DISPLAY` unset on Xwayland; drag out logs XdndEnter sent. + +## Pitfalls +- Real-app checks happen in phase 12 (S036). +- No new tests in this plan (D-013): verify with build, clippy and the smoke run; tests come in phase 12. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/12 Testing/S032-tests-core.md b/Plans/12 Testing/S032-tests-core.md new file mode 100644 index 0000000..f7458ac --- /dev/null +++ b/Plans/12 Testing/S032-tests-core.md @@ -0,0 +1,30 @@ +# S032 — Automated tests: core, ops, trash, dirmeta, elevation protocol + +> Category 12 Testing · Model: Sonnet · Effort: high · Depends on: S031, S029, S026, S024, S023, S021, S018, S016, S015 · Size: L · Human: no +> Files touched: crates/tunal-core/tests/**, crates/tunal-core/src/**/tests, crates/tunal-dirmeta/tests/**, crates/tunal-elevate/tests/** + +## Goal +Test the pure logic and filesystem code of the solid app (D-013): location layer, ops engine, trash, `.directory`, elevation protocol. + +## Read +CLAUDE.md §3, §4; docs/PROGRESS.md (known bugs); the public APIs of these crates. + +## Steps +- [ ] tunal-core: URIs, listing edge cases (non-UTF-8, symlinks, permission denied, 10 000 entries), watch diffs — temp dirs only. +- [ ] Ops: copy/move/delete with conflicts (each resolution, apply to all), cancel mid-job, partial failures, cross-device move, copy into self refused, auto-rename. +- [ ] Trash: trash/restore/empty with `XDG_DATA_HOME` in a temp dir, `.trashinfo` encoding, name collisions. +- [ ] dirmeta: byte-exact round trips with comments/unknown keys/localized names. +- [ ] Elevation protocol: encode/decode, helper driven without pkexec in a temp dir. +- [ ] Fix bugs the tests find (regression test each) or log them in PROGRESS. +- [ ] PROGRESS entry, INDEX line, commit `S032: …` + +## End criteria +- `cargo test --workspace` green. +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. + +## Pitfalls +- Tests never touch the real home. +- Fix only bugs the tests find; no refactors. + +## Handoff (→ PROGRESS.md) +Bugs found and fixed; anything left. diff --git a/Plans/12 Testing/S033-tests-media-net-devices.md b/Plans/12 Testing/S033-tests-media-net-devices.md new file mode 100644 index 0000000..fc8d08c --- /dev/null +++ b/Plans/12 Testing/S033-tests-media-net-devices.md @@ -0,0 +1,30 @@ +# S033 — Automated tests: thumbs, tags, MusicBrainz, player, ssh, SFTP, MTP + +> Category 12 Testing · Model: Sonnet · Effort: high · Depends on: S032 · Size: L · Human: no +> Files touched: crates/{tunal-thumbs,tunal-tags,tunal-player,tunal-net,tunal-devices}/tests/**, small fixtures under each crate's tests/fixtures/ + +## Goal +Tests for the media, network and device crates with fixtures, a local mock HTTP server and an in-process SFTP server. + +## Read +CLAUDE.md §4 (network tests); the public APIs of these crates. + +## Steps +- [ ] Fixtures: tiny audio/video/image files (generated once with ffmpeg, committed, a few KB). +- [ ] thumbs: cache naming/metadata, each generator, ffmpeg-missing path (PATH without ffmpeg). +- [ ] tags: read/write/merge/Keep/cover on each fixture format; MusicBrainz: mock server responses, rate limiter spacing, 503 backoff, track matching. +- [ ] player: decode and waveform buckets on fixtures (no audio device needed). +- [ ] net: ssh config/known_hosts parsing; SFTP against an in-process russh server (temp dir root): auth paths, ops, host-key unknown/mismatch. +- [ ] MTP: container encode/decode and session flows on the replay transport. +- [ ] Fix bugs found (regression test each) or log them in PROGRESS. +- [ ] PROGRESS entry, INDEX line, commit `S033: …` + +## End criteria +- `cargo test --workspace` green. +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. + +## Pitfalls +- No real network, Tor or proxies; mock servers on localhost only. + +## Handoff (→ PROGRESS.md) +Bugs found and fixed; anything left. diff --git a/Plans/12 Testing/S034-ui-review.md b/Plans/12 Testing/S034-ui-review.md new file mode 100644 index 0000000..24cd699 --- /dev/null +++ b/Plans/12 Testing/S034-ui-review.md @@ -0,0 +1,28 @@ +# S034 — Screenshot matrix and UI review + +> Category 12 Testing · Model: Opus · Effort: high · Depends on: S032 · Size: L · Human: no +> Files touched: crates/tunal/src/screenshot.rs, crates/tunal/ui/**, CLAUDE.md §5 + +## Goal +The full screenshot matrix (D-003 checks moved here by D-013) and an `/unslop` pass over every screen. + +## Read +CLAUDE.md §2 Motion rules, §5; `app-taste` skill; PROMPT.md §Appearance and motion. + +## Steps +- [ ] Extend `--screenshot` into a matrix command: every screen × light/dark × hover/pressed × empty/full × minimum window size; update its CLAUDE.md §5 row. +- [ ] Render the matrix and look at every PNG; list issues. +- [ ] Run `/unslop` on the screens; apply its fixes in token/component code. +- [ ] Re-render; check tokens-only with the grep from earlier plans. +- [ ] PROGRESS entry, INDEX line, commit `S034: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Matrix renders without errors; before/after PNGs saved in the scratchpad and listed in PROGRESS. +- `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 +- Fix design issues in tokens/components, not per screen. + +## Handoff (→ PROGRESS.md) +Matrix command; remaining design issues. diff --git a/Plans/12 Testing/S035-motion-audit.md b/Plans/12 Testing/S035-motion-audit.md new file mode 100644 index 0000000..7f45c32 --- /dev/null +++ b/Plans/12 Testing/S035-motion-audit.md @@ -0,0 +1,28 @@ +# S035 — Motion audit and visual sign-off + +> Category 12 Testing · Model: Opus · Effort: high · Depends on: S034 · Size: M · Human: 🧑 visual review +> Files touched: crates/tunal/ui/** + +## Goal +`/improve-animations` audit of the whole app, fixes applied, then the user's visual review. + +## Read +CLAUDE.md §2 Motion rules; `improve-animations` and `animate` skills. + +## Steps +- [ ] Run `/improve-animations`; save its report under `docs/` (motion-audit.md). +- [ ] Apply the fixes (interruptible, reduced motion, no idle repaint, timings from tokens). +- [ ] Check idle: with the app idle for 10 s, no frames are rendered (frame counter log behind an env var). +- [ ] Render the matrix and send the key PNGs to the user; 🧑 stop and report for the visual review; apply the user's feedback in a follow-up if they ask. +- [ ] PROGRESS entry, INDEX line, commit `S035: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Idle frame count is 0 over 10 s. +- User's verdict recorded in PROGRESS. + +## Pitfalls +- Stop at the 🧑 step; don't guess the verdict. + +## Handoff (→ PROGRESS.md) +User feedback still open. diff --git a/Plans/12 Testing/S036-real-world-checks.md b/Plans/12 Testing/S036-real-world-checks.md new file mode 100644 index 0000000..f71c1e5 --- /dev/null +++ b/Plans/12 Testing/S036-real-world-checks.md @@ -0,0 +1,30 @@ +# S036 — Real-world checks with the user + +> Category 12 Testing · Model: Opus · Effort: high · Depends on: S033, S035 · Size: M · Human: 🧑 password, devices, apps, server +> Files touched: docs/real-world-checks.md, fixes in the crates involved + +## Goal +The checks only the user can do (D-003, D-013): real pkexec password prompt, iPhone, Android phone, native drag/clipboard with other apps on Wayland and X11, SFTP against a real host. + +## Read +docs/DECISIONS.md D-003, D-013, D-014, D-018; docs/PROGRESS.md (known bugs). + +## Steps +- [ ] Write `docs/real-world-checks.md`: a short checklist per area with exact steps and what to look for; send it to the user. +- [ ] 🧑 Elevation: user retries a root-owned operation and types the password into the polkit prompt. +- [ ] 🧑 Devices: iPhone (pair, browse, copy both ways) and Android (browse, copy both ways). +- [ ] 🧑 Native DnD and clipboard: drag a file into Discord and a browser, drop from them into Tunal, copy/paste with another app — on Wayland and X11. +- [ ] 🧑 SFTP: a host from ~/.ssh/config and a saved connection (agent, key, password; unknown host prompt). +- [ ] Fix what fails (small fixes here; larger ones logged as new plans in PROGRESS 'Later'). +- [ ] PROGRESS entry, INDEX line, commit `S036: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- Every checklist line marked pass/fail with the user's words in PROGRESS. + +## Pitfalls +- Never type the user's password or connect to hosts the user didn't name. +- Logs must not contain secrets: grep them after the elevation and SFTP checks. + +## Handoff (→ PROGRESS.md) +Failures left and their plans. diff --git a/Plans/13 Packaging/S037-install-final.md b/Plans/13 Packaging/S037-install-final.md new file mode 100644 index 0000000..1f9cfeb --- /dev/null +++ b/Plans/13 Packaging/S037-install-final.md @@ -0,0 +1,28 @@ +# S037 — Desktop entry, install script and final pass + +> Category 13 Packaging · Model: Sonnet · Effort: medium · Depends on: S036 · Size: S · Human: no +> Files touched: assets/tunal.desktop, scripts/install.sh, README.md, FEATURES.md, docs/STATUS.md + +## Goal +Install Tunal for daily use and close the project docs. + +## Read +README.md; FEATURES.md; assets/polkit/; docs/DECISIONS.md D-016, D-018. + +## Steps +- [ ] `assets/tunal.desktop` (MimeType `inode/directory`, icon, Exec with %U). +- [ ] `scripts/install.sh`: `cargo build --release`, install binary, desktop entry and icons under `~/.local` by default (PREFIX overridable); the polkit policy needs root, so print the one `sudo install` line instead of running it. +- [ ] README: install section, runtime requirements (D-016), shortcuts; FEATURES.md: every row's final status. +- [ ] Full checks: build, clippy, fmt, tests; STATUS.md → done. +- [ ] PROGRESS entry, INDEX line, commit `S037: …` + +## End criteria +- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass. +- `cargo test --workspace` green. +- `bash scripts/install.sh` with `PREFIX` in the scratchpad installs binary, desktop entry and icon there; `desktop-file-validate assets/tunal.desktop` passes (if installed). + +## Pitfalls +- Don't run the install against the real ~/.local or /usr; the user does that. + +## Handoff (→ PROGRESS.md) +How to install; what's left in 'Later'. diff --git a/Plans/INDEX.md b/Plans/INDEX.md index 1bc9bfa..b85068a 100644 --- a/Plans/INDEX.md +++ b/Plans/INDEX.md @@ -6,20 +6,76 @@ Tracker: https://claude.ai/artifact/4X8YCk3cQjUGyuyCqGuU7v ## 01 Workspace +- [ ] [S001 — Workspace, crates, README and feature map](01%20Workspace/S001-workspace-scaffold.md) · Sonnet medium + ## 02 App skeleton +- [ ] [S002 — Portal theme and Material schemes](02%20App%20skeleton/S002-theme-portal.md) · Opus high +- [ ] [S003 — Window, Theme and Motion globals, screenshot command](02%20App%20skeleton/S003-window-tokens.md) · Opus high +- [ ] [S004 — Base animated controls](02%20App%20skeleton/S004-base-controls.md) · Opus high +- [ ] [S005 — Menus, dialogs and toasts](02%20App%20skeleton/S005-menus-dialogs.md) · Opus high + ## 03 File browsing +- [ ] [S006 — Location layer and local backend](03%20File%20browsing/S006-location-layer.md) · Opus medium +- [ ] [S007 — File operations engine and trash](03%20File%20browsing/S007-file-ops-engine.md) · Opus medium +- [ ] [S008 — Folder model and details view](03%20File%20browsing/S008-folder-model-details.md) · Opus medium +- [ ] [S009 — Icon grid view and list motion](03%20File%20browsing/S009-grid-and-list-motion.md) · Opus high +- [ ] [S010 — Tabs, split view, breadcrumbs, history and places](03%20File%20browsing/S010-navigation-shell.md) · Opus medium +- [ ] [S011 — File operation actions](03%20File%20browsing/S011-file-op-actions.md) · Sonnet high +- [ ] [S012 — Properties, Open and Open with](03%20File%20browsing/S012-properties-open-with.md) · Sonnet medium +- [ ] [S013 — Settings dialog and editable context menus](03%20File%20browsing/S013-settings-context-menus.md) · Sonnet high +- [ ] [S014 — In-app drag and drop](03%20File%20browsing/S014-in-app-dnd.md) · Opus medium + ## 04 Directory metadata +- [ ] [S015 — `.directory` folder metadata](04%20Directory%20metadata/S015-directory-metadata.md) · Sonnet high + ## 05 Elevation +- [ ] [S016 — Root operations through pkexec](05%20Elevation/S016-pkexec-elevation.md) · Opus high + ## 06 Thumbnails +- [ ] [S017 — Thumbnail generation and cache](06%20Thumbnails/S017-thumbnail-crate.md) · Sonnet high +- [ ] [S018 — Thumbnails in the views](06%20Thumbnails/S018-thumbnails-in-views.md) · Opus medium + ## 07 Tag editor +- [ ] [S019 — Tag model with lofty](07%20Tag%20editor/S019-tag-model.md) · Sonnet medium +- [ ] [S020 — MusicBrainz and Cover Art Archive client](07%20Tag%20editor/S020-musicbrainz-client.md) · Sonnet high +- [ ] [S021 — Tag editor UI](07%20Tag%20editor/S021-tag-editor-ui.md) · Opus medium + ## 08 Audio player +- [ ] [S022 — Audio player backend](08%20Audio%20player/S022-player-backend.md) · Opus medium +- [ ] [S023 — Quick player with waveform seek bar](08%20Audio%20player/S023-player-ui.md) · Opus medium + ## 09 Devices +- [ ] [S024 — iOS devices over AFC](09%20Devices/S024-ios-afc.md) · Opus high +- [ ] [S025 — MTP protocol over nusb](09%20Devices/S025-mtp-protocol.md) · Opus high +- [ ] [S026 — Android devices over MTP](09%20Devices/S026-mtp-location.md) · Opus high + ## 10 Network + +- [ ] [S027 — ssh config and known_hosts](10%20Network/S027-ssh-config-known-hosts.md) · Sonnet high +- [ ] [S028 — SFTP location](10%20Network/S028-sftp-location.md) · Opus high +- [ ] [S029 — SFTP connections in the UI](10%20Network/S029-sftp-ui.md) · Opus high + +## 11 Native drag and drop + +- [ ] [S030 — Native drag and drop and file clipboard on Wayland](11%20Native%20drag%20and%20drop/S030-native-dnd-wayland.md) · Opus high +- [ ] [S031 — Native drag and drop and file clipboard on X11](11%20Native%20drag%20and%20drop/S031-native-dnd-x11.md) · Opus high + +## 12 Testing + +- [ ] [S032 — Automated tests: core, ops, trash, dirmeta, elevation protocol](12%20Testing/S032-tests-core.md) · Sonnet high +- [ ] [S033 — Automated tests: thumbs, tags, MusicBrainz, player, ssh, SFTP, MTP](12%20Testing/S033-tests-media-net-devices.md) · Sonnet high +- [ ] [S034 — Screenshot matrix and UI review](12%20Testing/S034-ui-review.md) · Opus high +- [ ] [S035 — Motion audit and visual sign-off](12%20Testing/S035-motion-audit.md) · Opus high 🧑 +- [ ] [S036 — Real-world checks with the user](12%20Testing/S036-real-world-checks.md) · Opus high 🧑 + +## 13 Packaging + +- [ ] [S037 — Desktop entry, install script and final pass](13%20Packaging/S037-install-final.md) · Sonnet medium diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index f3114ab..2d2213d 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -5,3 +5,20 @@ D-001 — 2026-11-18 — Brief decisions adopted as binding: name Tunal / binary `tunal`; Slint 1.19 with own components on Theme + Motion globals; zbus blocking portal + material-colors 0.5; Material Symbols Rounded by codepoint; MusicBrainz + Cover Art Archive (1 req/s, User-Agent); lofty; russh + russh-sftp preferred — PROMPT.md §Decisions — all plans. D-002 — 2026-11-18 — Workflow: at most 2 parallel sessions, look-ahead 3, Sonnet medium by default and Opus high for theming/motion, elevation, devices and SFTP; git local only (no remote, no push) — user's answers at setup — all plans. D-003 — 2026-11-18 — 🧑 checkpoints: visual review at end of phases 2, 3, 6; real-password sudo test (phase 5); real devices (phase 9); every C library before it is added — user's answers at setup — phases 2, 3, 5, 6, 8, 9. +D-004 — 2026-11-18 — Video frame thumbnails: run the installed `ffmpeg`/`ffprobe` CLI as a subprocess (no linking); missing ffmpeg → plain icon — user, plan-generate — S017, S018. +D-005 — 2026-11-18 — Audio: symphonia decoding (pure Rust) + cpal output (links alsa-lib, approved) — user — S022, S023. +D-006 — 2026-11-18 — iOS: `idevice` crate over the system usbmuxd socket (approved); usbmuxd missing → iOS hidden — user — S024. +D-007 — 2026-11-18 — Android: own pure-Rust MTP/PTP client on `nusb` (no libmtp) — user — S025, S026. +D-008 — 2026-11-18 — Extras in scope: Open / Open with (portal OpenURI, .desktop apps), details + icon grid views, type-to-filter (no recursive search), desktop entry + install script — user — S008, S009, S012, S037. +D-009 — 2026-11-18 — Phases restructured: 11 Native drag and drop, 12 Testing, 13 Packaging added; 🧑 checks of D-003 all move to phase 12 (S035 visual, S036 password/devices/apps/server) — user ("testing after there's a solid app") — all plans; supersedes the timing in D-003. +D-010 — 2026-11-18 — Models: D-002 categories get Opus high; other design-heavy plans (location layer, ops, views, shell, DnD, tag UI, player) Opus medium; well-specified work Sonnet — plan-generate — all plans. +D-011 — 2026-11-18 — Tag editor edits one or many files (mixed values shown as Keep); lookup applies per release — user — S019–S021. +D-012 — 2026-11-18 — Planner defaults: config in `$XDG_CONFIG_HOME/tunal/*.toml`; own bookmarks file seeded from XDG user dirs; shared freedesktop thumbnail cache; trash browsable as `trash:///`; video frame at 10% of duration by default; delete on devices/SFTP is permanent with confirm; reduced motion follows portal `enable-animations` with an app override; removable drives (UDisks) and recursive search are Later — plan-generate, shown to user — S002, S003, S007, S010, S013, S017, S024–S029. +D-013 — 2026-11-18 — Less testing while building: feature plans (phases 1–11) add no tests and verify with build, clippy, fmt and a smoke run/screenshot; automated tests, the screenshot matrix, /unslop, /improve-animations and all 🧑 checks run in phase 12 once the app is solid — user — all plans; supersedes CLAUDE.md §3 "new pure logic gets a test" for phases 1–11. +D-014 — 2026-11-18 — Drag and drop: in-app (S014) plus native in/out with other apps on Wayland (wl_data_device on Slint's own libwayland connection, our own wl_pointer/wl_keyboard for serials) and X11 (XDND via x11rb); Move/Copy/Link/Cancel menu on drop, Shift = move, Ctrl = copy, Ctrl+Shift = link; file clipboard interop in the same plans. Slint 1.19's winit backend has no native DnD, hence own code — user — S014, S030, S031, S036. +D-015 — 2026-11-18 — License: GPL-3.0-or-later — user — S001. +D-016 — 2026-11-18 — No extra system packages: all crates compile into the `tunal` binary; only libraries a desktop already has are used (libwayland/libX11 via Slint, fontconfig, alsa-lib); optional runtime tools (ffmpeg, usbmuxd, polkit agent) disable only their feature when missing, without errors — user — all plans. +D-017 — 2026-11-18 — `.directory`: standard `[Desktop Entry]` `Icon` and `Name`; our view settings and Material glyph in an `[X-Tunal]` group; never write another app's groups — plan-generate — S015. +D-018 — 2026-11-18 — Elevation via pkexec/polkit: `tunal --elevated-helper` over stdin/stdout pipes; the polkit agent asks for the password, Tunal never sees it; policy file in assets/polkit, installed by the install script (needs root, printed not run) — user — S016, S036, S037. +D-019 — 2026-11-18 — TLS and SSH crypto on rustls + ring (no aws-lc-rs, no OpenSSL) — user — S020, S028. +D-020 — 2026-11-18 — Accepted SSH host keys go to `$XDG_CONFIG_HOME/tunal/known_hosts`, read together with `~/.ssh/known_hosts`; Tunal never writes under ~/.ssh — plan-generate — S027–S029. diff --git a/docs/STATUS.md b/docs/STATUS.md index 0bc3562..4f846ac 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -2,4 +2,4 @@ Live status is in `Plans/INDEX.md` (ticked plans), the tracker linked there, and the last entries of `docs/PROGRESS.md`. This file only records the current phase. -Current phase: setup done; plans not generated yet (next: `/plan-generate`). +Current phase: plans generated (S001–S037, 13 categories); next: S001 via `/orchestrate`.