plans: Tunal phases 1-13 (S001-S037)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
a994992c17
commit
811a22d4f0
52 changed files with 1202 additions and 14 deletions
10
CLAUDE.md
10
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/<version> ( 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.
|
||||
|
|
|
|||
20
PLAN.md
20
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.
|
||||
|
|
|
|||
32
Plans/01 Workspace/S001-workspace-scaffold.md
Normal file
32
Plans/01 Workspace/S001-workspace-scaffold.md
Normal file
|
|
@ -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.
|
||||
33
Plans/02 App skeleton/S002-theme-portal.md
Normal file
33
Plans/02 App skeleton/S002-theme-portal.md
Normal file
|
|
@ -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.
|
||||
33
Plans/02 App skeleton/S003-window-tokens.md
Normal file
33
Plans/02 App skeleton/S003-window-tokens.md
Normal file
|
|
@ -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 <png> [--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 <png>` (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.
|
||||
32
Plans/02 App skeleton/S004-base-controls.md
Normal file
32
Plans/02 App skeleton/S004-base-controls.md
Normal file
|
|
@ -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 <png>` 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).
|
||||
31
Plans/02 App skeleton/S005-menus-dialogs.md
Normal file
31
Plans/02 App skeleton/S005-menus-dialogs.md
Normal file
|
|
@ -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).
|
||||
31
Plans/03 File browsing/S006-location-layer.md
Normal file
31
Plans/03 File browsing/S006-location-layer.md
Normal file
|
|
@ -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 -- <dir>` 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://`).
|
||||
31
Plans/03 File browsing/S007-file-ops-engine.md
Normal file
31
Plans/03 File browsing/S007-file-ops-engine.md
Normal file
|
|
@ -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.
|
||||
33
Plans/03 File browsing/S008-folder-model-details.md
Normal file
33
Plans/03 File browsing/S008-folder-model-details.md
Normal file
|
|
@ -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 <dir>` 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 <scratch dir with 10 000 files> --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.
|
||||
32
Plans/03 File browsing/S009-grid-and-list-motion.md
Normal file
32
Plans/03 File browsing/S009-grid-and-list-motion.md
Normal file
|
|
@ -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 <png>` (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).
|
||||
32
Plans/03 File browsing/S010-navigation-shell.md
Normal file
32
Plans/03 File browsing/S010-navigation-shell.md
Normal file
|
|
@ -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 <png>` (light and `--dark`) renders the new UI; you looked at both PNGs. with two tabs, split view and the sidebar (`tunal --split <a> <b>`).
|
||||
- `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.
|
||||
31
Plans/03 File browsing/S011-file-op-actions.md
Normal file
31
Plans/03 File browsing/S011-file-op-actions.md
Normal file
|
|
@ -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).
|
||||
28
Plans/03 File browsing/S012-properties-open-with.md
Normal file
28
Plans/03 File browsing/S012-properties-open-with.md
Normal file
|
|
@ -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).
|
||||
29
Plans/03 File browsing/S013-settings-context-menus.md
Normal file
29
Plans/03 File browsing/S013-settings-context-menus.md
Normal file
|
|
@ -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).
|
||||
30
Plans/03 File browsing/S014-in-app-dnd.md
Normal file
30
Plans/03 File browsing/S014-in-app-dnd.md
Normal file
|
|
@ -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).
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue