From c4d0887317e01049ecfa50d3186e9a41cc968242 Mon Sep 17 00:00:00 2001 From: astar76 Date: Tue, 24 Nov 2026 23:12:28 -0600 Subject: [PATCH] plans: Medlar, 40 session plans Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 16 +++--- PLAN.md | 8 +-- Plans/01 Foundation/.gitkeep | 0 .../S001-workspace-store-settings.md | 33 ++++++++++++ Plans/01 Foundation/S002-test-server.md | 29 +++++++++++ .../01 Foundation/S003-shell-motion-tools.md | 35 +++++++++++++ Plans/02 Engine/.gitkeep | 0 Plans/02 Engine/S004-http-core.md | 33 ++++++++++++ Plans/02 Engine/S005-dynamic-parts.md | 32 ++++++++++++ Plans/02 Engine/S006-manager.md | 30 +++++++++++ Plans/02 Engine/S007-error-recovery.md | 32 ++++++++++++ Plans/02 Engine/S008-continue-links.md | 30 +++++++++++ Plans/02 Engine/S009-mirrors-checksums.md | 27 ++++++++++ Plans/02 Engine/S010-logins-proxies.md | 30 +++++++++++ Plans/02 Engine/S011-ftp-sftp.md | 29 +++++++++++ Plans/02 Engine/S012-streams.md | 30 +++++++++++ Plans/03 Interface/.gitkeep | 0 Plans/03 Interface/S013-controls.md | 33 ++++++++++++ Plans/03 Interface/S014-wavy-parts-shapes.md | 34 +++++++++++++ Plans/03 Interface/S015-main-window.md | 34 +++++++++++++ Plans/03 Interface/S016-add-dialog.md | 32 ++++++++++++ Plans/03 Interface/S017-details.md | 31 +++++++++++ Plans/03 Interface/S018-settings-palette.md | 32 ++++++++++++ Plans/04 Control/.gitkeep | 0 Plans/04 Control/S019-limiter-priority.md | 29 +++++++++++ Plans/04 Control/S020-auto-limit-quota.md | 29 +++++++++++ .../04 Control/S021-queues-schedule-power.md | 29 +++++++++++ Plans/04 Control/S022-control-screens.md | 31 +++++++++++ Plans/05 Connector/.gitkeep | 0 Plans/05 Connector/S023-port-server.md | 33 ++++++++++++ Plans/05 Connector/S024-handoff-flow.md | 33 ++++++++++++ Plans/06 Media/S025-video-sites.md | 31 +++++++++++ Plans/06 Media/S026-preview-convert.md | 31 +++++++++++ Plans/06 Torrents and media/.gitkeep | 0 Plans/07 Library and tools/.gitkeep | 0 .../S027-rules-clipboard-drop.md | 31 +++++++++++ Plans/07 Library and tools/S028-archives.md | 29 +++++++++++ .../S029-grabber-explorer.md | 30 +++++++++++ .../07 Library and tools/S030-stats-import.md | 30 +++++++++++ Plans/07 Library and tools/S031-cli-rest.md | 31 +++++++++++ Plans/07 Library and tools/S032-web-remote.md | 30 +++++++++++ .../07 Library and tools/S033-tray-notify.md | 29 +++++++++++ Plans/08 Motion and polish/.gitkeep | 0 .../08 Motion and polish/S034-motion-audit.md | 32 ++++++++++++ .../08 Motion and polish/S035-motion-fixes.md | 30 +++++++++++ Plans/08 Motion and polish/S036-taste-pass.md | 32 ++++++++++++ .../S037-performance-security.md | 33 ++++++++++++ Plans/09 Release/.gitkeep | 0 Plans/09 Release/S038-feature-sweep.md | 29 +++++++++++ Plans/09 Release/S039-packaging.md | 31 +++++++++++ Plans/09 Release/S040-docs-release.md | 31 +++++++++++ Plans/INDEX.md | 51 ++++++++++++++++++- docs/DECISIONS.md | 4 ++ docs/FEATURES.md | 45 ++++++++-------- docs/STATUS.md | 2 +- 55 files changed, 1329 insertions(+), 37 deletions(-) delete mode 100644 Plans/01 Foundation/.gitkeep create mode 100644 Plans/01 Foundation/S001-workspace-store-settings.md create mode 100644 Plans/01 Foundation/S002-test-server.md create mode 100644 Plans/01 Foundation/S003-shell-motion-tools.md delete mode 100644 Plans/02 Engine/.gitkeep create mode 100644 Plans/02 Engine/S004-http-core.md create mode 100644 Plans/02 Engine/S005-dynamic-parts.md create mode 100644 Plans/02 Engine/S006-manager.md create mode 100644 Plans/02 Engine/S007-error-recovery.md create mode 100644 Plans/02 Engine/S008-continue-links.md create mode 100644 Plans/02 Engine/S009-mirrors-checksums.md create mode 100644 Plans/02 Engine/S010-logins-proxies.md create mode 100644 Plans/02 Engine/S011-ftp-sftp.md create mode 100644 Plans/02 Engine/S012-streams.md delete mode 100644 Plans/03 Interface/.gitkeep create mode 100644 Plans/03 Interface/S013-controls.md create mode 100644 Plans/03 Interface/S014-wavy-parts-shapes.md create mode 100644 Plans/03 Interface/S015-main-window.md create mode 100644 Plans/03 Interface/S016-add-dialog.md create mode 100644 Plans/03 Interface/S017-details.md create mode 100644 Plans/03 Interface/S018-settings-palette.md delete mode 100644 Plans/04 Control/.gitkeep create mode 100644 Plans/04 Control/S019-limiter-priority.md create mode 100644 Plans/04 Control/S020-auto-limit-quota.md create mode 100644 Plans/04 Control/S021-queues-schedule-power.md create mode 100644 Plans/04 Control/S022-control-screens.md delete mode 100644 Plans/05 Connector/.gitkeep create mode 100644 Plans/05 Connector/S023-port-server.md create mode 100644 Plans/05 Connector/S024-handoff-flow.md create mode 100644 Plans/06 Media/S025-video-sites.md create mode 100644 Plans/06 Media/S026-preview-convert.md delete mode 100644 Plans/06 Torrents and media/.gitkeep delete mode 100644 Plans/07 Library and tools/.gitkeep create mode 100644 Plans/07 Library and tools/S027-rules-clipboard-drop.md create mode 100644 Plans/07 Library and tools/S028-archives.md create mode 100644 Plans/07 Library and tools/S029-grabber-explorer.md create mode 100644 Plans/07 Library and tools/S030-stats-import.md create mode 100644 Plans/07 Library and tools/S031-cli-rest.md create mode 100644 Plans/07 Library and tools/S032-web-remote.md create mode 100644 Plans/07 Library and tools/S033-tray-notify.md delete mode 100644 Plans/08 Motion and polish/.gitkeep create mode 100644 Plans/08 Motion and polish/S034-motion-audit.md create mode 100644 Plans/08 Motion and polish/S035-motion-fixes.md create mode 100644 Plans/08 Motion and polish/S036-taste-pass.md create mode 100644 Plans/08 Motion and polish/S037-performance-security.md delete mode 100644 Plans/09 Release/.gitkeep create mode 100644 Plans/09 Release/S038-feature-sweep.md create mode 100644 Plans/09 Release/S039-packaging.md create mode 100644 Plans/09 Release/S040-docs-release.md diff --git a/CLAUDE.md b/CLAUDE.md index 1a1506c..98bbcaf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ # Medlar -Medlar is a download manager for Linux in Rust and egui: all of Free Download Manager's features and more, downloads split into dynamic parts, limits, priorities, queues, torrents, video sites, a local port that takes downloads from browsers, and a Material You (M3 Expressive) interface with spring motion and wavy progress bars. What it must do: [docs/FEATURES.md](docs/FEATURES.md). Final deliverable: a tested AppImage and tar.gz plus the browser extension, for the user and for release on Astar Hub. Vision: [PLAN.md](PLAN.md). +Medlar is a download manager for Linux in Rust and egui: all of Free Download Manager's features and more, downloads split into dynamic parts, limits, priorities, queues, video sites, a local port that takes downloads from browsers, and a Material You (M3 Expressive) interface with spring motion and wavy progress bars. What it must do: [docs/FEATURES.md](docs/FEATURES.md). Final deliverable: a tested AppImage and tar.gz, for the user and for release on Astar Hub. Vision: [PLAN.md](PLAN.md). ## 0. Session rules — read first @@ -25,9 +25,8 @@ Root: the folder holding this file Planned (the Foundation plans create it; keep this list true): crates/core/ engine, limits, queues, store, connector server; no UI code crates/app/ egui app: theme, motion, widgets, views, dialogs, tray -crates/cli/ medlar command line and headless mode +crates/cli/ command line and headless mode, a library used by the `medlar` binary crates/testserver/ local server with faults for tests (ranges, throttle, cuts, expiry, logins) -extension/ browser extension, one source for Firefox and Chromium tools/ screenshot, hidden-run, icon and packaging scripts assets/ icon, fonts, Material Symbols docs/ FEATURES, PROGRESS, DECISIONS, STATUS, CONNECTOR; tracker.html is the tracker page's source @@ -38,9 +37,10 @@ Never modify: everything outside this folder. `~/Projects/*` is read-only refere ## 2. Facts - Reuse (the user's own code, read-only): Damson `src/motion.rs` (spring presets), `src/theme.rs` (OKLCH roles from a seed); Mulberry `src/ui/shape.rs` (morphing shapes), `src/ui/widgets.rs` (`wavy_slider`, buttons, menus), `src/tray.rs`; Nacre `tools/nested-session.sh`, `tools/hidden.sh` (hidden nested niri runs) and `src/net/dlm.rs` (`custom_body`: the JSON Nacre posts). -- Seen on crates.io 2026-11-24: eframe/egui_kittest 0.37.0, tokio 1.54.1, hyper 1.13.0, reqwest 0.13.5, axum 0.8.9, librqbit 9.1.0, suppaftp 13.0.0, russh 0.65.4, rusqlite 0.43.0, ksni 0.3.7. Check the docs of the pinned version before using an API. -- This PC: Arch Linux, niri (Wayland), 4 cores, 16 GB, Rust 1.99.1. No node or npm: the extension is plain JavaScript with no build step. -- No Firefox or Chromium was found in /usr/bin. Browser tests need a portable browser (ask through the orchestrator before downloading one) or a script that speaks the protocol. +- Seen on crates.io 2026-11-24: eframe/egui_kittest 0.37.0, tokio 1.54.1, hyper 1.13.0, reqwest 0.13.5, axum 0.8.9, suppaftp 13.0.0, russh 0.65.4, rusqlite 0.43.0, ksni 0.3.7. Check the docs of the pinned version before using an API. +- This PC: Arch Linux, niri (Wayland), 4 cores, 16 GB, Rust 1.99.1. +- Download nothing but Rust crates (D-011). Here already: /usr/bin/yt-dlp, /usr/bin/ffmpeg, 7z, bsdtar, unzip, `~/Projects/Mulberry/dist/appimagetool`. Not here: clamscan, node, docker. +- The browser side is Nacre's `POST /` JSON (D-003, D-010). A built Nacre is at `~/Projects/Nacre/target/release/nacre`; run it only hidden with a throwaway home. - The line is slow: never download large files for tests. All engine tests use `crates/testserver` on 127.0.0.1. - Ports: Medlar 17616 (D-006). 15151 and 38151 belong to the user's AB Download Manager. @@ -56,8 +56,8 @@ Never modify: everything outside this folder. `~/Projects/*` is read-only refere ## 4. Domain pitfalls (all agents) -- Never connect to Tor or public proxies, and never join public torrent swarms, trackers or DHT in tests. Torrents are tested in a loopback swarm, proxies against a local stub. -- Any web page can reach 127.0.0.1: check `Host` and `Origin`, require the pairing token, no CORS wildcard, and an unpaired add (no `Origin`, for example Nacre) always shows the Add dialog. +- Never connect to Tor or public proxies in tests. Proxies are tested against a local stub. +- Any web page can reach 127.0.0.1: refuse any request with a web `Origin` or a foreign `Host`, send no CORS headers, and show the Add dialog unless the user turned that off. Remote control and REST need a token. - File names come from servers and pages: strip path parts, control characters and leading dots, cap the length, never overwrite silently. - Child processes (yt-dlp, ffmpeg) get user links: use `--`, never a shell. Cookies and logins never appear in logs or process arguments. - HTTP/2 puts all parts on one connection: force HTTP/1.1 for segments. A 200 answer to a range request means no resume; never write it at an offset. diff --git a/PLAN.md b/PLAN.md index 6d85c5a..6cd31b5 100644 --- a/PLAN.md +++ b/PLAN.md @@ -2,7 +2,7 @@ ## Goal A download manager for Linux that does everything Free Download Manager does and more: dynamic parts, limits, priorities, -queues, scheduling, torrents, video sites, and a local port that takes downloads from browsers. Its Material You interface +queues, scheduling, video sites, and a local port that takes downloads from browsers. Its Material You interface uses M3 Expressive shapes, spring motion and wavy progress bars that show what the engine is really doing. Recipient: the user, as their daily download manager, then anyone who gets a release from Astar Hub. Done means every item in [docs/FEATURES.md](docs/FEATURES.md) §1–9 works and has been tested. @@ -13,11 +13,11 @@ slider, widgets, tray), Nacre (hidden nested session, hand-off format). ## Phases 1. **Foundation** — workspace, store, settings, the local test server with faults, the screenshot and hidden-run tools. -2. **Engine** — HTTP with dynamic parts, resume, retries, mirrors, checksums; FTP, FTPS, SFTP; HLS and DASH. CLI-testable without UI. +2. **Engine** — HTTP with dynamic parts, resume, error recovery, continuing from new links, mirrors, checksums; FTP, FTPS, SFTP; HLS and DASH. 3. **Interface** — tokens, motion, wavy bars, parts map, main window, add dialog, details, settings. 4. **Control** — limits, modes, priorities, queues, scheduler, power actions, quota, automatic limiter. -5. **Connector** — port, pairing, Firefox and Chromium extension, media detection, Nacre, native messaging. -6. **Torrents and media** — torrent engine and views, yt-dlp, preview, conversion. +5. **Connector** — the port a browser sends links to, its protection, and continuing downloads from sent links. +6. **Media** — yt-dlp, preview, conversion. 7. **Library and tools** — rules, batch, grabber, site explorer, archive peek, unpack, statistics, import, CLI, web remote, tray. 8. **Motion and polish** — `/improve-animations` audit, its fixes, an app-taste pass over every screen, performance. 9. **Release** — AppImage and tar.gz, older-distro test, docs, repo page. Publishing needs the user's yes. diff --git a/Plans/01 Foundation/.gitkeep b/Plans/01 Foundation/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/01 Foundation/S001-workspace-store-settings.md b/Plans/01 Foundation/S001-workspace-store-settings.md new file mode 100644 index 0000000..312d446 --- /dev/null +++ b/Plans/01 Foundation/S001-workspace-store-settings.md @@ -0,0 +1,33 @@ +# S001 — Workspace, store, settings and strings + +> Category 01 Foundation · Model: Opus · Effort: medium · Depends on: — · Size: M · Human: no +> Files touched: Cargo.toml, crates/core/**, crates/*/Cargo.toml, crates/*/src/{lib,main}.rs + +## Goal +The Cargo workspace with four crates, and in `core`: task model, SQLite store, settings, paths, string catalogue and logging. FEATURES 8.4 (portable), 8.5, the model behind 2 and 7. + +## Read +- docs/FEATURES.md (all) +- ~/Projects/Damson/Cargo.toml +- ~/Projects/Damson/src/config.rs + +## Steps +- [ ] Workspace: `medlar-core`, `medlar` (app), `medlar-cli` (library), `medlar-testserver`; release profile like Damson's; version 0.1.0, MIT +- [ ] Paths: XDG dirs, plus portable mode when a `portable` file sits beside the binary; a `MEDLAR_HOME` override for tests +- [ ] Task model: task, part, queue, tag, host profile, error kind (empty enum list to fill in S007), states and the legal moves between them, with a test that refuses illegal moves +- [ ] Store: rusqlite (bundled), numbered migrations, WAL, one writer thread; survives a kill mid-write (test) +- [ ] Settings: serde with defaults, unknown keys kept, a damaged file is moved aside and reported, never fatal +- [ ] String catalogue: key to text with plurals and arguments, English built in, user files dropped in a folder; a test fails on a missing key +- [ ] Logging to a rotating file; a redaction helper for cookies, tokens, passwords and URL query strings, with tests +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S001: …`, push + +## End criteria +- `nice cargo test -j 2` green +- `nice cargo build -j 2` without warnings +- `MEDLAR_HOME=$(mktemp -d) target/debug/medlar --version` prints 0.1.0 + +## Pitfalls +Keep `core` free of egui. Secrets never go in SQLite or settings: keep a keyring reference only. + +## Handoff (→ PROGRESS.md) +Public API of store and settings, migration number, how to add a string. diff --git a/Plans/01 Foundation/S002-test-server.md b/Plans/01 Foundation/S002-test-server.md new file mode 100644 index 0000000..f90e3c7 --- /dev/null +++ b/Plans/01 Foundation/S002-test-server.md @@ -0,0 +1,29 @@ +# S002 — Test server with faults + +> Category 01 Foundation · Model: Sonnet · Effort: high · Depends on: S001 · Size: M · Human: no +> Files touched: crates/testserver/** + +## Goal +One local server that can behave like every good and bad host, so the engine is tested without the internet. + +## Read +- docs/FEATURES.md §1 +- crates/testserver (skeleton) + +## Steps +- [ ] Deterministic content by seed and length, so any byte range can be checked without storing files (up to 100 GB virtual) +- [ ] HTTP/1.1 with ranges, ETag, Last-Modified, Content-Disposition variants, redirects, chunked and no-length replies; optional TLS with a generated certificate +- [ ] Faults per path or on command: throttle per connection and total, latency, stall, cut after N bytes, reset, 403/404/410/416/429 with Retry-After/500/503, wrong length, ignores Range, changes content mid-way, forces gzip, link that expires after N seconds or requests, cap on connections per client +- [ ] Logins (Basic, Digest, cookie, referrer check), an open directory listing, a ZIP and TAR, a small site tree, HLS and DASH fixtures made with /usr/bin/ffmpeg at test time, Metalink files, checksum sidecars +- [ ] HTTP and SOCKS5 proxy stubs on loopback that record what passed +- [ ] Library API (`TestServer::start()` on port 0, request log, live fault switches) and a `medlar-testserver` binary; row added to CLAUDE.md §5 +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S002: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-testserver` green, with a test per fault + +## Pitfalls +Bind 127.0.0.1 only. No real network. Keep tests under 30 s in total. + +## Handoff (→ PROGRESS.md) +List of fault names and how to set them. diff --git a/Plans/01 Foundation/S003-shell-motion-tools.md b/Plans/01 Foundation/S003-shell-motion-tools.md new file mode 100644 index 0000000..76bc8a4 --- /dev/null +++ b/Plans/01 Foundation/S003-shell-motion-tools.md @@ -0,0 +1,35 @@ +# S003 — App shell, theme, motion and screenshot tools + +> Category 01 Foundation · Model: Opus · Effort: medium · Depends on: S001 · Size: M · Human: no +> Files touched: crates/app/**, tools/**, assets/** + +## Goal +An empty but correct window with tokens, colours, springs, icons and fonts, and the tools every later UI plan uses to prove its work. FEATURES 9.1, 9.8. + +## Read +- app-taste skill +- ~/Projects/Damson/src/{motion,theme}.rs and src/ui/{fonts,icons,morph}.rs +- ~/Projects/Damson/tests/shots.rs (first 80 lines) +- ~/Projects/Nacre/tools/{hidden,nested-session}.sh +- ~/Projects/Damson/tools/gen_icons.py + +## Steps +- [ ] eframe 0.37 (glow, wayland, x11) window with app id `medlar`, remembered size, minimum 480×360 +- [ ] Tokens module: spacing, radius, type, elevation, motion presets; `motion.rs` copied and extended with a velocity-keeping retarget test +- [ ] Theme: Caelestia scheme, KDE accent or own colour (D-012), live reload, light, dark, AMOLED, contrast levels, scheme variants; a test checks 4.5:1 text and 3:1 icon contrast for 12 seeds in every mode +- [ ] Fonts and Material Symbols embedded with a generator script; app icon drawn as our own SVG (a medlar fruit shape) +- [ ] Motion level (off, reduced, normal, expressive) and repaint only while `busy()` +- [ ] `tests/shots.rs` harness: `MEDLAR_SHOTS=dir`, light and dark, sizes, `HOVER=x,y`; contact-sheet script +- [ ] `tools/hidden.sh`: nested niri run with throwaway home, grab, click, type; rows added to CLAUDE.md §5 +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S003: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar` green +- shots looked at in light and dark +- hidden run draws a window and an idle 5 s uses under 1 % CPU + +## Pitfalls +The nested session renders in software: judge layout there, not frame rate. Copy code in, never edit ~/Projects/Damson or Nacre. + +## Handoff (→ PROGRESS.md) +Token names, harness usage, how to add an icon. diff --git a/Plans/02 Engine/.gitkeep b/Plans/02 Engine/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/02 Engine/S004-http-core.md b/Plans/02 Engine/S004-http-core.md new file mode 100644 index 0000000..6c1e2fd --- /dev/null +++ b/Plans/02 Engine/S004-http-core.md @@ -0,0 +1,33 @@ +# S004 — HTTP core with resume and crash-safe files + +> Category 02 Engine · Model: Opus · Effort: high · Depends on: S002 · Size: L · Human: no +> Files touched: crates/core/src/{http,disk,part}*, crates/core/tests/http* + +## Goal +Download one file over HTTP(S) in a fixed set of ranges, safely. FEATURES 1.1, 1.4, 1.5, 1.7, 1.14. + +## Read +- docs/FEATURES.md §1 +- crates/core/src (model, store) +- testserver README or lib.rs + +## Steps +- [ ] Choose and pin the HTTP client after checking its docs: HTTP/1.1 forced for segments, `Accept-Encoding: identity`, redirect control, connect and idle timeouts; record as a decision +- [ ] Probe: size, range support proven by a real 206, validators, name (Content-Disposition with RFC 5987, URL, MIME fallback), final URL +- [ ] Safe names: no path parts, control characters, leading dots, reserved or overlong names; a fuzz-style test +- [ ] Disk writer: free-space check, preallocation with fallback, positioned writes, bounded buffers, fsync policy, `.medlar` partial file, atomic rename, no silent overwrite +- [ ] Journal of finished ranges that is never ahead of the data on disk; kill -9 test at 50 random moments resumes to an identical file +- [ ] Resume check: validators plus an overlap byte comparison; a changed file stops with its own error +- [ ] Servers with no range, no length, lying length, 200 to a range request, gzip anyway: correct result or a clear error, never a corrupt file +- [ ] HTTP/2 or 3 single-stream path decided by measurement and recorded (1.14) +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S004: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test http` green, including kill tests +- SHA-256 equality on every success path + +## Pitfalls +A 200 at an offset corrupts files. Journal order matters: data, then journal. Never trust Content-Length alone. + +## Handoff (→ PROGRESS.md) +Part and writer API for S005. diff --git a/Plans/02 Engine/S005-dynamic-parts.md b/Plans/02 Engine/S005-dynamic-parts.md new file mode 100644 index 0000000..b80f38b --- /dev/null +++ b/Plans/02 Engine/S005-dynamic-parts.md @@ -0,0 +1,32 @@ +# S005 — Dynamic parts and adaptive connections + +> Category 02 Engine · Model: Opus · Effort: high · Depends on: S004 · Size: L · Human: no +> Files touched: crates/core/src/{segment,adapt,host}*, crates/core/tests/parts* + +## Goal +Parts split, hand over and merge while running; connections follow what helps. FEATURES 1.2, 1.3, 1.4, 1.6. + +## Read +- crates/core/src/{http,disk,part}* +- docs/FEATURES.md §1 + +## Steps +- [ ] Pure scheduler (no I/O) that decides splits from part positions and speeds: take half of the part with the longest time left, aligned, never under the minimum size; property tests for no gap and no overlap +- [ ] Live split and steal without reconnecting the donor; neighbouring finished ranges merge in the journal +- [ ] Adaptive controller: start at 2, add while total throughput grows beyond noise, step down on 429/503/refusals; per-host memory in the store with expiry +- [ ] Caps per download, host and total, changed live up and down +- [ ] Per-part errors stay local: backoff with jitter, Retry-After, reconnect, hand the range to another connection +- [ ] Stall and slow-part detection: the tail of a file never waits on one crawling connection +- [ ] Event stream of part changes (born, split, stolen, merged, done) for the parts map +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S005: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test parts` green +- a benchmark against a server throttled per connection shows near-linear gain, and against a server capped in total shows it settles low +- numbers in PROGRESS + +## Pitfalls +Re-requesting too often looks like abuse: rate-limit new connections per host. The user's line is slow, so adding connections must prove itself. + +## Handoff (→ PROGRESS.md) +Event list and snapshot fields. diff --git a/Plans/02 Engine/S006-manager.md b/Plans/02 Engine/S006-manager.md new file mode 100644 index 0000000..be97ef5 --- /dev/null +++ b/Plans/02 Engine/S006-manager.md @@ -0,0 +1,30 @@ +# S006 — Download manager, events and snapshots + +> Category 02 Engine · Model: Opus · Effort: medium · Depends on: S005 · Size: M · Human: no +> Files touched: crates/core/src/{manager,events,snapshot,speed}*, crates/core/tests/manager* + +## Goal +Many downloads with a lifecycle, and the one API that UI, CLI and connector use. FEATURES 1.1, 2.3 (order only), 7.3 (redownload), parts of 7.2. + +## Read +- crates/core/src (model, store, segment) +- docs/DECISIONS.md + +## Steps +- [ ] Commands: add, start, pause, resume, stop, remove (keep or bin files), redownload, move, rename; all idempotent and safe in any state +- [ ] Running set chosen by active limit, priority and order; per-host caps respected +- [ ] Snapshot for the UI: cheap, lock-free to read, only changed tasks copied; 10,000 tasks test +- [ ] Speed and time-left smoothing that doesn't jump; per-second history ring per task and total +- [ ] Per-task log with redaction; counters for statistics +- [ ] Start-up restore and clean shutdown: pause everything in under 2 s +- [ ] Dev binary or test example that downloads from the test server with text progress +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S006: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test manager` green, with a concurrent command fuzz of 10,000 random operations and no deadlock or illegal state + +## Pitfalls +The UI thread must never wait on the engine. + +## Handoff (→ PROGRESS.md) +Command and snapshot API, frozen for UI plans. diff --git a/Plans/02 Engine/S007-error-recovery.md b/Plans/02 Engine/S007-error-recovery.md new file mode 100644 index 0000000..5f90832 --- /dev/null +++ b/Plans/02 Engine/S007-error-recovery.md @@ -0,0 +1,32 @@ +# S007 — Error recovery + +> Category 02 Engine · Model: Opus · Effort: high · Depends on: S006 · Size: L · Human: no +> Files touched: crates/core/src/{error,recover,net_state}*, crates/core/tests/recover* + +## Goal +Every failure is understood, explained, retried sensibly, and never costs finished bytes. FEATURES 1.17, 1.6. + +## Read +- docs/FEATURES.md 1.17 +- crates/core/src/{manager,http,segment,disk}* + +## Steps +- [ ] Error kinds from 1.17, each with severity, retry rule, plain message (what failed, then why) and fix action; a test asserts every kind has all four and no raw OS text leaks +- [ ] Retry engine: backoff per kind, per-host circuit breaker, limits per task and "retry forever" option, time until next try in the snapshot +- [ ] Network state through NetworkManager D-Bus with a fallback: offline waits instead of failing, resumes on return; captive portal (HTML in place of a file) detected +- [ ] Sleep and wake through logind `PrepareForSleep`: pause cleanly, resume after +- [ ] Disk: full, read-only, folder gone, drive unplugged and back, permission denied; waits and continues when fixed +- [ ] App killed or power lost: auto-resume on next start, with a setting +- [ ] Changed or wrong content (size, validators, HTML for a ZIP): asks to restart, keep both or continue from a new link; never mixes two versions +- [ ] Recovery matrix test: every fault of the test server times early, middle and late in the file; result is an identical file or the exact expected error with bytes kept +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S007: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test recover` green +- matrix written to docs/RECOVERY.md + +## Pitfalls +Use a fake D-Bus (dbus-run-session) for NetworkManager and logind; never touch the real ones. Don't retry 404 or 410 blindly. + +## Handoff (→ PROGRESS.md) +Error kinds table for UI text and buttons. diff --git a/Plans/02 Engine/S008-continue-links.md b/Plans/02 Engine/S008-continue-links.md new file mode 100644 index 0000000..272c842 --- /dev/null +++ b/Plans/02 Engine/S008-continue-links.md @@ -0,0 +1,30 @@ +# S008 — Continue from a new link + +> Category 02 Engine · Model: Opus · Effort: high · Depends on: S007 · Size: M · Human: no +> Files touched: crates/core/src/{relink,adopt}*, crates/core/tests/relink* + +## Goal +An expired or dead download carries on from a fresh link, and partial files can be picked up. FEATURES 1.12, 4.6 (matching), 7.8. + +## Read +- crates/core/src/{error,disk,segment,manager}* +- docs/FEATURES.md 1.12, 4.6, 7.8 + +## Steps +- [ ] Relink command: probe the new link, compare length and validators, then compare sampled finished ranges and the edges byte for byte before accepting +- [ ] Verdicts: same file, probably same (no validators, samples equal), different, cannot tell; each with its message; never continues on "different" +- [ ] Headers, cookies, referrer and login replaced with the new link's; old ones dropped +- [ ] Server without ranges: explain that it must start over, keep the old partial until the new one is done +- [ ] Matcher: given an incoming link (and name, size, page), rank unfinished downloads it may continue; signed-URL query noise ignored; tests with realistic CDN links +- [ ] Adopt a partial file: plain truncated file from a browser (`.part`, `.crdownload`), and other managers' partials when the part list is readable and documented; otherwise treat the start of the file as finished only after a byte check +- [ ] Expired link on the source page: "open source page" state that waits for a matching link +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S008: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test relink` green: expiring links, swapped content, same size but different bytes, no validators + +## Pitfalls +Equal size and name is not the same file. Sampling must include the last finished bytes. + +## Handoff (→ PROGRESS.md) +Matcher API for S016 and S024. diff --git a/Plans/02 Engine/S009-mirrors-checksums.md b/Plans/02 Engine/S009-mirrors-checksums.md new file mode 100644 index 0000000..b82e210 --- /dev/null +++ b/Plans/02 Engine/S009-mirrors-checksums.md @@ -0,0 +1,27 @@ +# S009 — Mirrors, Metalink and checksums + +> Category 02 Engine · Model: Opus · Effort: medium · Depends on: S008 · Size: M · Human: no +> Files touched: crates/core/src/{mirror,metalink,verify}*, crates/core/tests/mirror* + +## Goal +FEATURES 1.8, 1.13. + +## Read +- crates/core/src/{segment,host,relink}* + +## Steps +- [ ] Several sources per file: each checked with S008's comparison before its bytes are used; parts spread by measured speed; a bad mirror is dropped alone +- [ ] Metalink 3 and 4 files and the `Link`/`Digest` headers; piece hashes repair single pieces +- [ ] Checksums MD5, SHA-1, SHA-256, SHA-512, BLAKE3, hashed off the download threads; sources: metalink, sidecar files, headers, pasted text (type detected by length) +- [ ] Verify state and progress in the snapshot; mismatch offers repair (piece hashes), other mirror or restart +- [ ] XML parsing hardened: size and depth limits, no entities +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S009: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test mirror` green: fast plus slow mirror, lying mirror, corrupt piece repaired + +## Pitfalls +Never mix bytes from an unverified mirror. + +## Handoff (→ PROGRESS.md) +Verify states for the UI. diff --git a/Plans/02 Engine/S010-logins-proxies.md b/Plans/02 Engine/S010-logins-proxies.md new file mode 100644 index 0000000..ce7c9ef --- /dev/null +++ b/Plans/02 Engine/S010-logins-proxies.md @@ -0,0 +1,30 @@ +# S010 — Logins, cookies and proxies + +> Category 02 Engine · Model: Opus · Effort: medium · Depends on: S006 · Size: M · Human: no +> Files touched: crates/core/src/{auth,cookie,proxy,secret,site}*, crates/core/tests/auth* + +## Goal +FEATURES 1.15, 1.16, 2.2 (per-site rules storage), FDM's site manager. + +## Read +- crates/core/src/http* +- docs/FEATURES.md 1.15, 1.16 +- ~/Projects/Nacre/Cargo.toml (keyring line) + +## Steps +- [ ] Basic, Digest and cookie logins; per-download headers, cookies, referrer, user agent +- [ ] Credentials scoped to their host: dropped on cross-host redirects (test), never in logs, process arguments or the store +- [ ] Secret Service keyring with a fallback that keeps secrets in memory only and says so +- [ ] Site profiles: login, connection cap, limit, user agent, proxy, folder; wildcard match, most specific wins +- [ ] Proxies: HTTP, SOCKS5 with remote DNS, system setting; per app, site, download; bypass list +- [ ] TLS: system roots, plain explanation of certificate errors, per-site exception only by explicit choice +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S010: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test auth` green, including redaction and redirect leak tests + +## Pitfalls +Proxy tests use the stub only. Use a fake Secret Service under dbus-run-session, never the user's keyring. + +## Handoff (→ PROGRESS.md) +Site profile fields. diff --git a/Plans/02 Engine/S011-ftp-sftp.md b/Plans/02 Engine/S011-ftp-sftp.md new file mode 100644 index 0000000..84f03f5 --- /dev/null +++ b/Plans/02 Engine/S011-ftp-sftp.md @@ -0,0 +1,29 @@ +# S011 — FTP, FTPS and SFTP + +> Category 02 Engine · Model: Opus · Effort: medium · Depends on: S010 · Size: M · Human: no +> Files touched: crates/core/src/{ftp,sftp,listing}*, crates/core/tests/ftp* + +## Goal +FEATURES 1.9, plus directory listing used by the site explorer. + +## Read +- crates/core/src/{http,segment,auth}* +- suppaftp and russh docs for the pinned versions + +## Steps +- [ ] A transport trait drawn from the HTTP path, only as wide as needed +- [ ] FTP and FTPS: passive and extended passive, REST resume, SIZE, MDTM, segments when the server allows several logins +- [ ] SFTP: password and key logins, host key prompt and known_hosts style store, positioned reads in parallel +- [ ] Directory listing (MLSD, LIST variants, SFTP) as one type +- [ ] Errors mapped to S007's kinds if it is merged, else to the model's placeholder kinds +- [ ] In-process FTP and SFTP test servers on loopback (dev-dependency or small own stub) +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S011: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test ftp` green: resume, cut, wrong login, changed host key refused + +## Pitfalls +A changed SFTP host key must never be accepted silently. Never connect to the user's Chromebook for tests. + +## Handoff (→ PROGRESS.md) +Listing type for S030. diff --git a/Plans/02 Engine/S012-streams.md b/Plans/02 Engine/S012-streams.md new file mode 100644 index 0000000..9a97ffe --- /dev/null +++ b/Plans/02 Engine/S012-streams.md @@ -0,0 +1,30 @@ +# S012 — HLS, DASH, RTSP and MMS + +> Category 02 Engine · Model: Opus · Effort: medium · Depends on: S007, S010 · Size: M · Human: no +> Files touched: crates/core/src/stream/**, crates/core/tests/stream* + +## Goal +FEATURES 1.10, 1.11, ffmpeg runner used by media plans. + +## Read +- crates/core/src/{manager,http}* +- docs/DECISIONS.md D-011 + +## Steps +- [ ] ffmpeg finder and runner: argument lists only, progress parsing, cancel, log tail, missing-tool error kind +- [ ] HLS: master and media lists, variants, audio groups, AES-128 clear-key as the list itself offers; live lists record until stopped +- [ ] DASH: static and simple dynamic manifests, representation choice +- [ ] Fragments in parallel with retry, resume after restart, joined without re-encoding +- [ ] RTSP and MMS recorded through ffmpeg with stop and size or time limit +- [ ] DRM (Widevine, FairPlay, PlayReady signals) is recognised and refused with a plain message +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S012: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test stream` green on fixtures made by ffmpeg +- ffprobe shows the right duration + +## Pitfalls +Links go after `--` or as `-i` values with a protocol whitelist. No DRM handling of any kind. + +## Handoff (→ PROGRESS.md) +Stream probe result type. diff --git a/Plans/03 Interface/.gitkeep b/Plans/03 Interface/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/03 Interface/S013-controls.md b/Plans/03 Interface/S013-controls.md new file mode 100644 index 0000000..fe3db8d --- /dev/null +++ b/Plans/03 Interface/S013-controls.md @@ -0,0 +1,33 @@ +# S013 — Controls, dialogs and toasts + +> Category 03 Interface · Model: Opus · Effort: medium · Depends on: S003 · Size: L · Human: no +> Files touched: crates/app/src/ui/{widgets,dialog,menu,toast,field}*, crates/app/tests/widgets* + +## Goal +Every control in M3 Expressive form, so screens are only assembly. FEATURES 9.4 (controls), 9.7. + +## Read +- app-taste and animate skills +- crates/app/src/{motion,theme,tokens}* +- ~/Projects/Damson/src/ui/widgets.rs +- ~/Projects/Mulberry/src/ui/widgets.rs (buttons, menus) + +## Steps +- [ ] Buttons (five kinds, sizes), icon buttons that morph on press, toggle buttons, connected button group whose neighbours give way, split button, FAB and FAB menu, floating toolbar +- [ ] Text field, number with unit, search, combo, slider, range, switch, checkbox, radio, chips, segmented control with sliding selection, tabs +- [ ] Menus and submenus that keep to the window, context menus, tooltips with shortcuts +- [ ] Dialogs of fixed widths, side sheet, confirm; Enter, Escape, focus trap and focus return +- [ ] Toasts with action and undo, stacked, pause on hover +- [ ] Progress-free states for each: hover, press, focus ring, disabled, error, loading after 300 ms +- [ ] Gallery screen behind `--gallery`, shots of every control in light, dark and hovered +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S013: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test widgets` green: hover, press, keyboard, focus return, popups inside the window +- shots looked at + +## Pitfalls +Springs for space, critically damped for colour. Nested radii stay concentric. Nothing pushes its neighbours while animating, except the button group by design. + +## Handoff (→ PROGRESS.md) +Control names and arguments. diff --git a/Plans/03 Interface/S014-wavy-parts-shapes.md b/Plans/03 Interface/S014-wavy-parts-shapes.md new file mode 100644 index 0000000..231c98b --- /dev/null +++ b/Plans/03 Interface/S014-wavy-parts-shapes.md @@ -0,0 +1,34 @@ +# S014 — Wavy bars, parts map, shapes and speed graph + +> Category 03 Interface · Model: Opus · Effort: high · Depends on: S003 · Size: L · Human: no +> Files touched: crates/app/src/ui/{wave,parts,shape,graph,odometer}*, crates/app/tests/visuals* + +## Goal +The parts of Medlar people will remember, driven by real engine data. FEATURES 9.2–9.6. + +## Read +- app-taste and animate skills +- ~/Projects/Mulberry/src/ui/shape.rs +- ~/Projects/Mulberry/src/ui/widgets.rs `wavy_slider` +- docs/FEATURES.md §9 + +## Steps +- [ ] Wavy line progress: amplitude and travel follow speed through springs, round ends, gap and stop mark, flattens when paused; states for waiting, verifying, unknown size, error, done +- [ ] Part-aware wave: gaps between parts glide when parts split, hand over or merge +- [ ] Wavy ring for compact places and the tray preview; wavy slider for limits +- [ ] Parts map: blocks that split, hand over and merge with springs, hover shows range, speed and server; falls back to a density strip for thousands of ranges +- [ ] Morphing shapes: loading indicator, one shape per file kind, completion moment (wave settles, shape becomes a tick), interruptible and played once +- [ ] Speed graph with filled area, limit line and hover readout; rolling tabular digits for the big number +- [ ] Simulated data in the gallery, with a scrubber for speed and part events; cost measured with 200 bars on screen +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S014: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test visuals` green: no NaN, stays in bounds at 0, tiny and 100 %, paused and settled draw no frames +- shot sequence looked at +- 200 bars under 4 ms CPU per frame in release + +## Pitfalls +Motion only while bytes arrive. Phase keeps running smoothly through speed changes. Reduced motion shows a flat, still bar. + +## Handoff (→ PROGRESS.md) +Widget inputs, mapped to S006 snapshot fields. diff --git a/Plans/03 Interface/S015-main-window.md b/Plans/03 Interface/S015-main-window.md new file mode 100644 index 0000000..b2eb127 --- /dev/null +++ b/Plans/03 Interface/S015-main-window.md @@ -0,0 +1,34 @@ +# S015 — Main window and list + +> Category 03 Interface · Model: Opus · Effort: medium · Depends on: S006, S013, S014 · Size: L · Human: no +> Files touched: crates/app/src/{app,bridge}*, crates/app/src/views/{main,list,rail,bar}*, crates/app/tests/main* + +## Goal +The daily screen on real data. FEATURES 7.1, 7.4 (undo), 9.5, 9.7, 3.3 (window drop only opens the Add dialog stub). + +## Read +- app-taste skill +- crates/app/src/ui module list +- crates/core snapshot and command API + +## Steps +- [ ] Bridge: engine runtime on its own threads, snapshot per frame, repaint only on change +- [ ] Layout: collapsing rail (states, queues, tags, types), list, floating toolbar, speed header with graph; 480 px to ultrawide +- [ ] Rows in compact and card form: kind shape, name, host, wavy bar, speed, time left, state; fixed heights, ellipsis, virtualised for 10,000 +- [ ] Search, filters, sort, columns, grouping; multi-select with keyboard, range and lasso; drag to reorder +- [ ] Context menu and toolbar actions with undo toasts for removal; delete to bin or keep +- [ ] States: empty with Add button, nothing found, offline, error with fix button and next-try countdown, very long names +- [ ] Row motion: insert, remove, reorder and move to Done by springs, off for bulk changes over 30 rows +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S015: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test main` green +- shots at 480, 900, 1600 and 3440 px in light and dark looked at +- hidden run against the test server shows a real download finishing +- 10,000 rows scroll under 8 ms CPU per frame + +## Pitfalls +Never hold engine locks while drawing. Keyboard actions are not animated. + +## Handoff (→ PROGRESS.md) +How views get data and send commands. diff --git a/Plans/03 Interface/S016-add-dialog.md b/Plans/03 Interface/S016-add-dialog.md new file mode 100644 index 0000000..6c124f8 --- /dev/null +++ b/Plans/03 Interface/S016-add-dialog.md @@ -0,0 +1,32 @@ +# S016 — Add dialog, batch and duplicates + +> Category 03 Interface · Model: Opus · Effort: medium · Depends on: S008, S010, S015 · Size: M · Human: no +> Files touched: crates/app/src/views/add*, crates/core/src/{batch,duplicate}*, crates/app/tests/add* + +## Goal +FEATURES 3.1, 3.2, 3.8, and "this continues an earlier download" (4.6). + +## Read +- crates/core/src/{relink,site}* +- crates/app/src/ui dialogs +- docs/FEATURES.md §3 + +## Steps +- [ ] Dialog with link(s), live probe (size, kind shape, resume, parts), name, folder with recents and free space, queue, priority, limit, parts, schedule +- [ ] Advanced: headers, cookies, login, referrer, user agent, proxy, mirrors, checksum; remembers folders per type +- [ ] Batch: pasted lists, file or clipboard import, patterns `[001-120]`, `{a,b}`, dates, with preview, select and a hard cap +- [ ] Duplicates by link, name and checksum: resume, rename, skip or show +- [ ] When S008's matcher finds an unfinished download: "Continue that download" first, with the reason +- [ ] Paste a new link into a failed task ("Continue from link"), with the verdict shown before anything changes +- [ ] Probe errors inline with fixes (login needed, expired); add anyway is possible +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S016: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test add` green +- shots of simple, advanced, batch, duplicate and continue states looked at + +## Pitfalls +Probing must be cancellable and never block typing. The dialog does not change width. + +## Handoff (→ PROGRESS.md) +Function that opens the dialog from outside (connector, clipboard, drop). diff --git a/Plans/03 Interface/S017-details.md b/Plans/03 Interface/S017-details.md new file mode 100644 index 0000000..ca41a8a --- /dev/null +++ b/Plans/03 Interface/S017-details.md @@ -0,0 +1,31 @@ +# S017 — Details panel and file actions + +> Category 03 Interface · Model: Opus · Effort: medium · Depends on: S015, S009 · Size: M · Human: no +> Files touched: crates/app/src/views/details*, crates/core/src/files*, crates/app/tests/details* + +## Goal +FEATURES 7.2, 7.3, 7.4, 9.3 in place. + +## Read +- crates/app/src/views/list* +- crates/app/src/ui/{parts,graph}* +- crates/core/src/{verify,mirror}* + +## Steps +- [ ] Side panel or bottom sheet by width: overview, parts map, graph, log, headers, mirrors, checksum +- [ ] File actions: open, show in folder (D-Bus FileManager1), move, rename, copy link, redownload, bin, "file is gone" state +- [ ] Tags and notes; tag colours from theme roles only +- [ ] Live edits: limit, parts, priority, queue, link, login +- [ ] Log with copy, filter and redaction; properties copyable +- [ ] Error section: what, why, when tried, next try, all fixes +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S017: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test details` green +- shots of every tab and the error state looked at + +## Pitfalls +Moving across drives must copy, verify, then remove. Opening files goes through the portal or xdg-open with no shell. + +## Handoff (→ PROGRESS.md) +Panel slots for media and archive plans. diff --git a/Plans/03 Interface/S018-settings-palette.md b/Plans/03 Interface/S018-settings-palette.md new file mode 100644 index 0000000..c60a003 --- /dev/null +++ b/Plans/03 Interface/S018-settings-palette.md @@ -0,0 +1,32 @@ +# S018 — Settings, colour, shortcuts and first run + +> Category 03 Interface · Model: Opus · Effort: medium · Depends on: S015 · Size: M · Human: no +> Files touched: crates/app/src/views/{settings,palette,firstrun}*, crates/app/src/keys*, crates/app/tests/settings* + +## Goal +FEATURES 8.4 (shortcuts, palette), 8.5 (choice), 9.1, 9.8, D-012. + +## Read +- app-taste skill +- crates/app/src/{theme,tokens}* +- ~/Projects/Damson/src/ui/{settings,palette}.rs + +## Steps +- [ ] Settings with search, grouped pages, each row with its reason in one line; changes apply at once, undo per page +- [ ] Look page: Follow desktop or Own colour side by side, colour picker, scheme, light, dark, AMOLED, contrast, motion level, live preview with a real wavy bar +- [ ] Downloads, connections, network, logins and sites, notifications, power pages; other plans add theirs +- [ ] Shortcuts page with conflicts and reset; every action reachable +- [ ] Command palette (Ctrl+K) over actions, downloads and settings, instant to open +- [ ] First run: folder, colours, port explanation; skippable, three screens at most +- [ ] Backup and restore of settings +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S018: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test settings` green +- shots of every page in light and dark looked at + +## Pitfalls +The palette opens without animation. Keep the settings registry data-driven so later plans only add rows. + +## Handoff (→ PROGRESS.md) +How to register a settings row and an action. diff --git a/Plans/04 Control/.gitkeep b/Plans/04 Control/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/04 Control/S019-limiter-priority.md b/Plans/04 Control/S019-limiter-priority.md new file mode 100644 index 0000000..3a62d5e --- /dev/null +++ b/Plans/04 Control/S019-limiter-priority.md @@ -0,0 +1,29 @@ +# S019 — Limiter, modes and priority shares + +> Category 04 Control · Model: Opus · Effort: high · Depends on: S006 · Size: L · Human: no +> Files touched: crates/core/src/limit/**, crates/core/tests/limit* + +## Goal +FEATURES 2.1, 2.2, 2.3. + +## Read +- crates/core/src/{segment,manager,site}* +- docs/FEATURES.md §2 + +## Steps +- [ ] Hierarchical token buckets (total, queue, host, download) with a virtual clock for tests +- [ ] Weighted fair sharing by priority for bandwidth and connections; unused share flows to others; no starvation of the lowest +- [ ] "Only this one" mode that pauses the rest and restores them +- [ ] Three editable modes plus snail, switched live without reconnecting +- [ ] Small reads under low limits so speed stays even; limit accuracy within 5 % from 10 KB/s to 1 GB/s +- [ ] Socket receive pressure so a limit really slows the sender +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S019: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test limit` green: accuracy, shares 1:2:4, live change under 500 ms, overhead under 3 % at full speed + +## Pitfalls +Sleeping per chunk at low speeds causes bursts and idle timeouts; keep connections alive. + +## Handoff (→ PROGRESS.md) +Limit and mode API. diff --git a/Plans/04 Control/S020-auto-limit-quota.md b/Plans/04 Control/S020-auto-limit-quota.md new file mode 100644 index 0000000..bd16174 --- /dev/null +++ b/Plans/04 Control/S020-auto-limit-quota.md @@ -0,0 +1,29 @@ +# S020 — Automatic limiter, quota and metered lines + +> Category 04 Control · Model: Opus · Effort: medium · Depends on: S007, S019 · Size: M · Human: no +> Files touched: crates/core/src/{autolimit,quota,metered}*, crates/core/tests/autolimit* + +## Goal +FEATURES 2.4, 2.5. + +## Read +- crates/core/src/limit +- crates/core/src/net_state* + +## Steps +- [ ] Latency probe without extra traffic (TCP connect or RTT to current hosts, optional gateway ping), baseline and queueing delay estimate +- [ ] Controller that backs off when delay rises and recovers gently; simulated line tests (bottleneck, buffer bloat, competing flow) +- [ ] Quota per day, week or month with reset day, warning and stop, override for one download +- [ ] Metered connection through NetworkManager: pause, limit or ignore; big-file threshold +- [ ] Snapshot says why a limit is in force +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S020: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test autolimit` green with a virtual clock +- no oscillation over 20 % in the simulator + +## Pitfalls +The user's line is about 425 KB/s: constants must work there and on gigabit. Fake D-Bus only. + +## Handoff (→ PROGRESS.md) +Reason codes for the UI. diff --git a/Plans/04 Control/S021-queues-schedule-power.md b/Plans/04 Control/S021-queues-schedule-power.md new file mode 100644 index 0000000..1784fc9 --- /dev/null +++ b/Plans/04 Control/S021-queues-schedule-power.md @@ -0,0 +1,29 @@ +# S021 — Queues, scheduler and power actions + +> Category 04 Control · Model: Opus · Effort: medium · Depends on: S019 · Size: M · Human: no +> Files touched: crates/core/src/{queue,schedule,power,run}*, crates/core/tests/schedule* + +## Goal +FEATURES 2.6–2.9. + +## Read +- crates/core/src/{manager,limit}* +- docs/FEATURES.md §2 + +## Steps +- [ ] Queues: folder, limit, active count, order, schedule, done action; move tasks between them +- [ ] Schedules: times, weekdays, once, mode by time grid; time zone, daylight saving and missed-while-asleep rules with tests on a virtual clock +- [ ] Dependencies and delayed start; cycles refused +- [ ] When done: shut down, suspend, hibernate, log out, lock, quit, run command, with a cancellable countdown; conditions (all, queue, task) +- [ ] logind through zbus, inhibit suspend while downloading; capabilities checked first +- [ ] Run program: argument list with placeholders, no shell, timeout, output in the log +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S021: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test schedule` green against a fake logind + +## Pitfalls +Never call the real logind power methods in tests. A failed download must not trigger a shutdown unless chosen. + +## Handoff (→ PROGRESS.md) +Queue and schedule API. diff --git a/Plans/04 Control/S022-control-screens.md b/Plans/04 Control/S022-control-screens.md new file mode 100644 index 0000000..76d8136 --- /dev/null +++ b/Plans/04 Control/S022-control-screens.md @@ -0,0 +1,31 @@ +# S022 — Control screens + +> Category 04 Control · Model: Opus · Effort: medium · Depends on: S015, S018, S020, S021 · Size: M · Human: no +> Files touched: crates/app/src/views/{modes,queues,schedule}*, crates/app/tests/control* + +## Goal +FEATURES 2.1–2.9 and 9.5 on screen. + +## Read +- app-taste and animate skills +- crates/core limit, queue, schedule APIs +- crates/app/src/ui/{wave,graph}* + +## Steps +- [ ] Mode switch in the toolbar as a connected group, snail included, with the reason when the automatic limiter or a quota acts +- [ ] Limit dial: wavy slider with spring handle, log scale, typing and units +- [ ] Priority control in rows and details, share preview; "only this one" +- [ ] Queue page: cards with live totals, drag tasks and order, edit sheet +- [ ] Week grid for modes and starts: paint by drag, keyboard too +- [ ] Quota card and metered notice; done-action picker with countdown sheet +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S022: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test control` green: drag keeps the grab point, keyboard equivalent works +- shots looked at + +## Pitfalls +Dragging a limit applies live but is stored on release. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/05 Connector/.gitkeep b/Plans/05 Connector/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/05 Connector/S023-port-server.md b/Plans/05 Connector/S023-port-server.md new file mode 100644 index 0000000..0ece75e --- /dev/null +++ b/Plans/05 Connector/S023-port-server.md @@ -0,0 +1,33 @@ +# S023 — The port and its protection + +> Category 05 Connector · Model: Opus · Effort: high · Depends on: S016 · Size: M · Human: no +> Files touched: crates/core/src/connector/**, crates/core/tests/connector*, docs/CONNECTOR.md + +## Goal +A browser hands links to 127.0.0.1:17616; nothing else can abuse it. FEATURES 4.1–4.3, 4.5. + +## Read +- ~/Projects/Nacre/src/net/dlm.rs (lines 74–145, 265–300) +- docs/DECISIONS.md D-003, D-006, D-010 +- CLAUDE.md §4 + +## Steps +- [ ] Server on loopback only, changeable port, on and off live, port-in-use state that names the fix +- [ ] `GET /` ping with name and version; `POST /` with one link or a list, unknown fields ignored, size and rate limits, answers 2xx quickly +- [ ] Refuses foreign `Host` (DNS rebinding), any web `Origin`, form content types and preflights; no CORS headers; tests for each attack +- [ ] Checks links (http, https, ftp, ftps, sftp, stream schemes only), names and headers; hop-by-hop and injection headers dropped +- [ ] Cookies, referrer and user agent used for the download and kept through the keyring module +- [ ] Sender log: when, what, accepted or why not; sender process name from /proc/net/tcp where possible +- [ ] docs/CONNECTOR.md: format, examples with curl, security notes +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S023: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test connector` green +- Nacre's exact body (copied as a fixture) is accepted by curl +- every attack test refused + +## Pitfalls +Never bind 0.0.0.0. Port 15151 is the user's AB Download Manager. No secrets in the sender log. + +## Handoff (→ PROGRESS.md) +Incoming-link event for the UI. diff --git a/Plans/05 Connector/S024-handoff-flow.md b/Plans/05 Connector/S024-handoff-flow.md new file mode 100644 index 0000000..2a6bb0a --- /dev/null +++ b/Plans/05 Connector/S024-handoff-flow.md @@ -0,0 +1,33 @@ +# S024 — Hand-off flow and Nacre test + +> Category 05 Connector · Model: Opus · Effort: medium · Depends on: S018, S023 · Size: M · Human: no +> Files touched: crates/app/src/views/{incoming,connector}*, crates/app/src/instance*, assets/*.desktop, crates/app/tests/incoming* + +## Goal +From a click in the browser to a running or continued download. FEATURES 4.4, 4.6, 4.7, 8.3 (single instance). + +## Read +- crates/core/src/{connector,relink}* +- crates/app/src/views/add* +- docs/CONNECTOR.md +- ~/Projects/Nacre/tools/hidden.sh + +## Steps +- [ ] Incoming links open the Add dialog filled in; a list opens batch; several in a row queue up without stealing focus twice +- [ ] A match to an unfinished download offers "Continue" first and shows the verdict; a task waiting on "open source page" takes the link by itself after the check +- [ ] Setting "add without asking" with type and size rules, off by default +- [ ] Connector page: state, port, test link button, sender log, steps for Nacre's custom manager +- [ ] Single instance by socket; a second launch hands over its arguments; `medlar:` scheme and `.metalink` in the desktop file +- [ ] Hidden run: Nacre with a throwaway home and Medlar on a spare port; a click on a test-server link arrives and downloads. If Nacre can't be driven, replay its body and say so +- [ ] Expired-link run: download, expire, send a fresh link, file completes identical +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S024: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar --test incoming` green +- hidden run log and shots looked at + +## Pitfalls +Run Nacre only with a throwaway home. `medlar:` links come from web pages, so they always show the dialog. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/06 Media/S025-video-sites.md b/Plans/06 Media/S025-video-sites.md new file mode 100644 index 0000000..ecea5bf --- /dev/null +++ b/Plans/06 Media/S025-video-sites.md @@ -0,0 +1,31 @@ +# S025 — Video sites through yt-dlp + +> Category 06 Media · Model: Opus · Effort: medium · Depends on: S012, S016 · Size: M · Human: no +> Files touched: crates/core/src/ytdlp*, crates/app/src/views/video*, crates/core/tests/ytdlp* + +## Goal +FEATURES 6.1 with the system's yt-dlp (D-011). + +## Read +- crates/core/src/stream runner +- crates/app/src/views/add* +- `yt-dlp --help` (format, output, progress parts) + +## Steps +- [ ] Finder and version check, missing and too-old states in plain words +- [ ] Probe to JSON: formats, audio, subtitles, chapters, playlists; cached and cancellable +- [ ] Add dialog page: quality choice with sizes, audio only, subtitles, playlist picker +- [ ] Run as a task: progress template parsed to parts and speed, pause by stop and resume, limits passed on, cookies through a private temp file +- [ ] Errors mapped to kinds: private, removed, region, login, unsupported, too many requests; DRM refused +- [ ] A stub yt-dlp script for tests that replays recorded outputs +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S025: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test ytdlp` green with the stub +- one `#[ignore]` test against the local test server's generic page + +## Pitfalls +Links after `--`; config files ignored; cookies file mode 600 and removed. No bypassing of protections. Don't download from real video sites in tests. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/06 Media/S026-preview-convert.md b/Plans/06 Media/S026-preview-convert.md new file mode 100644 index 0000000..214d29c --- /dev/null +++ b/Plans/06 Media/S026-preview-convert.md @@ -0,0 +1,31 @@ +# S026 — Preview and conversion + +> Category 06 Media · Model: Sonnet · Effort: high · Depends on: S017, S025 · Size: M · Human: no +> Files touched: crates/core/src/{preview,convert}*, crates/app/src/views/{preview,convert}* + +## Goal +FEATURES 6.2, 6.3. + +## Read +- crates/core/src/stream runner +- crates/core/src/segment (order policy) +- crates/app/src/views/details* + +## Steps +- [ ] Sequential-first option and "start and end first" for media, beside the dynamic scheduler +- [ ] Preview: image decode, media thumbnail and open-in-player on a loopback range server that waits for missing ranges +- [ ] Text and archive head preview; hex for the rest; size caps +- [ ] Convert: presets (MP4, MKV, WebM, MP3, Opus, FLAC, remux), own presets, queue with progress and cancel, keep or replace the source +- [ ] Auto-convert as a rule action +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S026: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test convert` green with ffmpeg-made samples +- ffprobe confirms results +- shots looked at + +## Pitfalls +Preview servers bind loopback with a random path and stop with the panel. Decoders get untrusted files: limits and no panics. + +## Handoff (→ PROGRESS.md) +Rule action hook for S027. diff --git a/Plans/06 Torrents and media/.gitkeep b/Plans/06 Torrents and media/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/07 Library and tools/.gitkeep b/Plans/07 Library and tools/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/07 Library and tools/S027-rules-clipboard-drop.md b/Plans/07 Library and tools/S027-rules-clipboard-drop.md new file mode 100644 index 0000000..3483842 --- /dev/null +++ b/Plans/07 Library and tools/S027-rules-clipboard-drop.md @@ -0,0 +1,31 @@ +# S027 — Rules, clipboard, drag and drop, drop target + +> Category 07 Library and tools · Model: Opus · Effort: medium · Depends on: S016, S018 · Size: M · Human: no +> Files touched: crates/core/src/rules*, crates/app/src/{clipboard,drop}*, crates/app/src/views/{rules,target}* + +## Goal +FEATURES 3.3, 3.4, 3.9. + +## Read +- crates/app/src/views/add* +- crates/core/src/site* +- ~/Projects/Nacre/Cargo.toml (arboard line) + +## Steps +- [ ] Rules engine: conditions (extension, MIME, host, size, name pattern) to folder, queue, tags, priority, name template; order, test box, default rule set by type +- [ ] Name templates with safe placeholders and collision handling +- [ ] Clipboard watcher: off, ask, add; filters; ignores our own copies; privacy note; Wayland limits stated honestly +- [ ] Drop links, text, lists and `.metalink` on the window with a full-window drop state +- [ ] Floating drop target: small wavy ring with speed, own always-on-top window where the compositor allows, else a compact window; accepts drops; context menu +- [ ] Rules and clipboard pages +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S027: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test rules` and app tests green +- hidden run drops a link and shots looked at + +## Pitfalls +Wayland has no global always-on-top: use what niri and layer-shell allow, or say it isn't available. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/07 Library and tools/S028-archives.md b/Plans/07 Library and tools/S028-archives.md new file mode 100644 index 0000000..a74fa8f --- /dev/null +++ b/Plans/07 Library and tools/S028-archives.md @@ -0,0 +1,29 @@ +# S028 — Archive peek, unpack, join and scan + +> Category 07 Library and tools · Model: Opus · Effort: medium · Depends on: S017, S018 · Size: M · Human: no +> Files touched: crates/core/src/archive/**, crates/app/src/views/archive*, crates/core/tests/archive* + +## Goal +FEATURES 3.7, 7.5. + +## Read +- crates/core/src/http* +- crates/app/src/views/details* + +## Steps +- [ ] Remote ZIP and ZIP64 listing by range requests; pick files; fetch and inflate only those; CRC checked +- [ ] Plain TAR listing when seekable +- [ ] Unpack after download: ZIP and TAR in Rust, others through 7z or bsdtar when present; password list in the keyring; delete source option +- [ ] Join split files (.001, .part, multi-volume) after all parts are done +- [ ] Scan hook: any command with a placeholder, clamscan preset when found; quarantine state +- [ ] Archive tab and post-action settings +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S028: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test archive` green: traversal, symlink, bomb and huge-count archives refused + +## Pitfalls +Zip slip and bombs. Check paths after normalising, cap ratio and count, extract to a temp folder, then move. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/07 Library and tools/S029-grabber-explorer.md b/Plans/07 Library and tools/S029-grabber-explorer.md new file mode 100644 index 0000000..511d37a --- /dev/null +++ b/Plans/07 Library and tools/S029-grabber-explorer.md @@ -0,0 +1,30 @@ +# S029 — Site grabber and explorer + +> Category 07 Library and tools · Model: Opus · Effort: medium · Depends on: S011, S016, S027 · Size: M · Human: no +> Files touched: crates/core/src/{grab,explore}*, crates/app/src/views/{grab,explore}*, crates/core/tests/grab* + +## Goal +FEATURES 3.5, 3.6: collect links from a web page or folder listing. + +## Read +- crates/core/src/{http,listing,rules}* +- docs/FEATURES.md 3.5, 3.6 + +## Steps +- [ ] "Links on this page": fetch one page, list every file link, image and media with type, size on demand, filters and select +- [ ] Crawl: depth, host and path limits, extension and size filters, page cap, polite delay, robots respected by default, stop and resume +- [ ] HTML parsing with base, srcset, data attributes of common players, refresh; never runs scripts and says so on script-only pages +- [ ] Optional save of pages with links rewritten for offline reading +- [ ] Explorer for FTP, SFTP and open directory listings (Apache, nginx, h5ai): tree, multi-select, whole-folder download keeping the structure +- [ ] Results view with tree, filters, select by pattern, send to Add or a queue +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S029: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test grab` green on the test site tree: loops, traps, off-host links and huge pages handled +- shots looked at + +## Pitfalls +Crawls on public sites are not run in tests. Cap memory per page. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/07 Library and tools/S030-stats-import.md b/Plans/07 Library and tools/S030-stats-import.md new file mode 100644 index 0000000..dc453cf --- /dev/null +++ b/Plans/07 Library and tools/S030-stats-import.md @@ -0,0 +1,30 @@ +# S030 — Statistics, import and export + +> Category 07 Library and tools · Model: Sonnet · Effort: high · Depends on: S015, S021 · Size: M · Human: no +> Files touched: crates/core/src/{stats,port}*, crates/app/src/views/stats*, crates/core/tests/port* + +## Goal +FEATURES 7.6, 7.7. + +## Read +- dataviz skill +- crates/core/src/{store,manager}* +- crates/app/src/ui/graph* + +## Steps +- [ ] Daily totals by host, type and queue; average and peak speed; parts gain compared with one connection, only where measured +- [ ] Statistics page: charts from theme roles, ranges, table view, clear data +- [ ] Export and import of lists (JSON, text, CSV, Metalink) and full backup without secrets +- [ ] Import from aria2 session files; AB Download Manager and FDM only from exports with a documented or sample format, otherwise say not supported +- [ ] Merge rules for duplicates, preview before import +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S030: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test port` green with round trips +- shots in light and dark looked at + +## Pitfalls +Never read the user's live ~/.abdm. Invent no numbers: no "time saved" without a measurement. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/07 Library and tools/S031-cli-rest.md b/Plans/07 Library and tools/S031-cli-rest.md new file mode 100644 index 0000000..05da6c9 --- /dev/null +++ b/Plans/07 Library and tools/S031-cli-rest.md @@ -0,0 +1,31 @@ +# S031 — Command line, headless and REST + +> Category 07 Library and tools · Model: Opus · Effort: medium · Depends on: S021, S024 · Size: M · Human: no +> Files touched: crates/cli/**, crates/core/src/rest*, crates/app/src/main* + +## Goal +FEATURES 8.2 (API), 8.3. + +## Read +- crates/core command API +- crates/core/src/connector +- crates/app/src/instance* + +## Steps +- [ ] `medlar add|list|show|pause|resume|remove|limit|mode|queue|continue|export|quit`, with `--json`, exit codes and quiet mode +- [ ] Talks to a running instance by its socket, or starts headless; clear message otherwise +- [ ] `--headless` without a display, systemd user unit file +- [ ] REST plus event stream with the same commands, token per client, scopes (read, control), off by default, loopback unless remote control is on +- [ ] Shell completions (bash, zsh, fish) and man page generated +- [ ] Terminal progress with parts, plain when not a terminal +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S031: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-cli` green +- scripted end-to-end run against the test server without a display + +## Pitfalls +The socket lives in XDG_RUNTIME_DIR with mode 600. Tokens hashed at rest. + +## Handoff (→ PROGRESS.md) +REST description for S032. diff --git a/Plans/07 Library and tools/S032-web-remote.md b/Plans/07 Library and tools/S032-web-remote.md new file mode 100644 index 0000000..af25c35 --- /dev/null +++ b/Plans/07 Library and tools/S032-web-remote.md @@ -0,0 +1,30 @@ +# S032 — Web remote + +> Category 07 Library and tools · Model: Opus · Effort: medium · Depends on: S031 · Size: M · Human: no +> Files touched: crates/core/src/remote*, crates/core/remote/**, crates/core/tests/remote* + +## Goal +FEATURES 8.2: control Medlar from a phone on the LAN. + +## Read +- app-taste skill +- crates/core/src/rest* +- crates/app/src/theme* + +## Steps +- [ ] Off by default; turning it on sets a password, chooses the interface and port, shows address and QR code +- [ ] Single embedded page, no framework or external requests: list, add, pause, limits, modes, details; live events +- [ ] Look from the same roles: wavy SVG bars, light and dark, reduced motion, phone first +- [ ] Security: rate-limited login, hashed password, HttpOnly SameSite cookie, CSRF token, CSP, `Host` check, sessions list and revoke; optional own TLS certificate +- [ ] Settings page for it +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S032: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar-core --test remote` green, with auth, CSRF and rebinding tests +- page checked in the built-in browser at phone and desktop width + +## Pitfalls +LAN plain HTTP is readable by others: say so where it is turned on. Tests bind loopback. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/07 Library and tools/S033-tray-notify.md b/Plans/07 Library and tools/S033-tray-notify.md new file mode 100644 index 0000000..9f0b09a --- /dev/null +++ b/Plans/07 Library and tools/S033-tray-notify.md @@ -0,0 +1,29 @@ +# S033 — Tray, notifications and autostart + +> Category 07 Library and tools · Model: Sonnet · Effort: high · Depends on: S022, S024 · Size: M · Human: no +> Files touched: crates/app/src/{tray,notify,launcher,autostart}* + +## Goal +FEATURES 8.1, 8.4. + +## Read +- ~/Projects/Mulberry/src/tray.rs +- crates/app/src/instance* +- ksni docs + +## Steps +- [ ] Tray icon with progress ring and speed tooltip; menu: modes, pause all, resume all, add, show, quit +- [ ] Close to tray, start minimised, autostart file; works without a tray host +- [ ] Notifications: done, failed, needs login, all done, with actions (open, show folder, continue, retry); grouped, quiet hours +- [ ] Launcher progress through the Unity D-Bus signal +- [ ] Desktop file, metainfo, MIME and scheme entries checked by their validators when present +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S033: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar` green against fake StatusNotifier and Notifications services under dbus-run-session + +## Pitfalls +Never use the user's session bus in tests. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/08 Motion and polish/.gitkeep b/Plans/08 Motion and polish/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/08 Motion and polish/S034-motion-audit.md b/Plans/08 Motion and polish/S034-motion-audit.md new file mode 100644 index 0000000..bed7092 --- /dev/null +++ b/Plans/08 Motion and polish/S034-motion-audit.md @@ -0,0 +1,32 @@ +# S034 — Animation audit + +> Category 08 Motion and polish · Model: Opus · Effort: high · Depends on: S022, S024, S026, S027, S028, S029, S030, S032, S033 · Size: M · Human: no +> Files touched: animation-plans/**, docs/PROGRESS.md + +## Goal +Run `/improve-animations` at standard depth over the finished app, as D-008 sets out. Plans only, no source changes. + +## Read +- improve-animations and app-taste skills +- crates/app/src/{motion,tokens}* +- crates/app/src/ui and views (motion calls) + +## Steps +- [ ] Recon: where motion lives, tokens, personality, a frequency tier for each animated surface +- [ ] Audit the eight categories named in the skill; the web remote page included +- [ ] Re-read the code at each finding; drop the by-design and duplicate ones +- [ ] Findings table by leverage and up to four missed opportunities +- [ ] A self-contained plan for every HIGH and MEDIUM finding in `animation-plans/`, with exact values and a feel check +- [ ] Update S035's steps: one checkbox per plan, and sync its tracker doc; split to S035b if more than ten +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S034: …`, push + +## End criteria +- `ls animation-plans` shows README and the plans +- every finding cites file:line that exists +- `git diff --stat -- crates` is empty + +## Pitfalls +Subagents only if the orchestrator allows; inline otherwise. "Already right" is a valid result. + +## Handoff (→ PROGRESS.md) +Order of fixes. diff --git a/Plans/08 Motion and polish/S035-motion-fixes.md b/Plans/08 Motion and polish/S035-motion-fixes.md new file mode 100644 index 0000000..fb111c6 --- /dev/null +++ b/Plans/08 Motion and polish/S035-motion-fixes.md @@ -0,0 +1,30 @@ +# S035 — Animation fixes + +> Category 08 Motion and polish · Model: Opus · Effort: medium · Depends on: S034 · Size: L · Human: no +> Files touched: crates/app/**, crates/core/remote/**, animation-plans/README.md + +## Goal +Carry out the plans from S034. + +## Read +- animation-plans/README.md, then each plan as it is worked on +- animate skill + +## Steps +- [ ] Carry out each plan in the README order, with its own verification and feel check +- [ ] Shot sequences before and after for each changed motion +- [ ] Reduced and off levels checked for every change +- [ ] Idle and busy frame cost no worse than before +- [ ] README statuses set to DONE, or skipped with a reason +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S035: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar` green +- every plan DONE or explained +- idle CPU under 1 % + +## Pitfalls +Stay inside each plan's boundaries. + +## Handoff (→ PROGRESS.md) +What can only be judged on real hardware. diff --git a/Plans/08 Motion and polish/S036-taste-pass.md b/Plans/08 Motion and polish/S036-taste-pass.md new file mode 100644 index 0000000..93d3502 --- /dev/null +++ b/Plans/08 Motion and polish/S036-taste-pass.md @@ -0,0 +1,32 @@ +# S036 — app-taste pass over every screen + +> Category 08 Motion and polish · Model: Opus · Effort: medium · Depends on: S035 · Size: L · Human: no +> Files touched: crates/app/** + +## Goal +One look and feel everywhere. FEATURES 9.7. + +## Read +- app-taste skill +- crates/app/src/views list +- tests/shots.rs + +## Steps +- [ ] Shot set of every screen, state, size (480, 900, 1600, 3440), light, dark and AMOLED, with long names and big numbers +- [ ] Walk the app-taste rules screen by screen; list the faults, then fix: edges, grid, radii, sizes, states +- [ ] Copy pass: verbs, plain errors, sentence case, empty states +- [ ] Keyboard-only pass and AccessKit names; focus visible everywhere; hit targets 32 px +- [ ] Consistency of icons, tooltips and shortcuts +- [ ] Second shot set compared with the first +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S036: …`, push + +## End criteria +- `nice cargo test -j 2 -p medlar` green +- no literal colours or radii outside tokens (grep check added as a test) +- shots looked at + +## Pitfalls +Polish within the look, no redesign. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/08 Motion and polish/S037-performance-security.md b/Plans/08 Motion and polish/S037-performance-security.md new file mode 100644 index 0000000..bf4ea32 --- /dev/null +++ b/Plans/08 Motion and polish/S037-performance-security.md @@ -0,0 +1,33 @@ +# S037 — Speed, idle use, security and long runs + +> Category 08 Motion and polish · Model: Opus · Effort: high · Depends on: S036 · Size: L · Human: no +> Files touched: crates/** + +## Goal +Solid and light. CLAUDE.md §4. + +## Read +- CLAUDE.md §4 +- docs/RECOVERY.md +- docs/CONNECTOR.md +- docs/PROGRESS.md "Later" + +## Steps +- [ ] Profiles: start time, idle CPU and wake-ups, memory with 10,000 tasks, frame cost with 50 active, throughput on loopback against curl +- [ ] Fix what stands out; record before and after +- [ ] Security review of connector, REST, remote, names, archives, child processes, secrets on disk and in logs; regression test per fix +- [ ] Fuzz tests for parsers: headers, Content-Disposition, HLS, DASH, Metalink, ZIP, listing, patterns +- [ ] Two-hour soak with random faults, pauses, kills and limit changes; files checked +- [ ] Dependency check with `cargo tree -d` and licence list +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S037: …`, push + +## End criteria +- `nice cargo test -j 2` green +- soak log with zero corrupt files +- numbers in PROGRESS + +## Pitfalls +Don't run builds and soak at the same time. Attack tests stay on loopback. + +## Handoff (→ PROGRESS.md) +Known limits. diff --git a/Plans/09 Release/.gitkeep b/Plans/09 Release/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Plans/09 Release/S038-feature-sweep.md b/Plans/09 Release/S038-feature-sweep.md new file mode 100644 index 0000000..7ee2536 --- /dev/null +++ b/Plans/09 Release/S038-feature-sweep.md @@ -0,0 +1,29 @@ +# S038 — Check every feature against the list + +> Category 09 Release · Model: Opus · Effort: medium · Depends on: S025, S037 · Size: L · Human: no +> Files touched: docs/FEATURES-CHECK.md, crates/** + +## Goal +Prove FEATURES §1–9, line by line. + +## Read +- docs/FEATURES.md +- docs/DECISIONS.md + +## Steps +- [ ] Table in docs/FEATURES-CHECK.md: id, proof (test, command or shot), result +- [ ] Run or watch each proof in a hidden run with a throwaway home +- [ ] Fix small gaps here; larger ones become new plans through the orchestrator +- [ ] First run to finished download, as a new user with no settings +- [ ] Upgrade test: old store and settings from an early commit still open +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S038: …`, push + +## End criteria +- no FEATURES id without a row (script check) +- every row passes or has a plan id + +## Pitfalls +Code existing is not proof. + +## Handoff (→ PROGRESS.md) +Open gaps. diff --git a/Plans/09 Release/S039-packaging.md b/Plans/09 Release/S039-packaging.md new file mode 100644 index 0000000..f2b73b1 --- /dev/null +++ b/Plans/09 Release/S039-packaging.md @@ -0,0 +1,31 @@ +# S039 — AppImage and tar.gz + +> Category 09 Release · Model: Opus · Effort: medium · Depends on: S038 · Size: M · Human: no +> Files touched: tools/package*, packaging/** + +## Goal +Builds that run on older distros, without downloads (D-011). + +## Read +- CLAUDE.md §2 +- user's global build rules (AppImage, smoke test) +- ~/Projects/Mulberry/scripts or dist layout (read only) + +## Steps +- [ ] tar.gz with install and uninstall scripts for the user's home, desktop file, icons, completions, man page, unit file +- [ ] AppImage with the appimagetool in ~/Projects/Mulberry/dist (copied to a temp folder), same files, portable-mode support +- [ ] glibc and library needs listed with `objdump`/`ldd`; lowest supported glibc stated; system libraries not bundled +- [ ] Smoke test of both builds: launch hidden, download from the test server, write a status file and shots, look at them +- [ ] yt-dlp and ffmpeg missing on PATH: designed state checked; size of bundling them reported for the user's choice +- [ ] Checksums and `releases/` layout prepared, nothing placed there +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S039: …`, push + +## End criteria +- both artefacts pass the smoke test +- `dist/` listing with sizes + +## Pitfalls +appimagetool may try to fetch its runtime: use an existing runtime file, or stop and report through the orchestrator. Don't write into releases/. + +## Handoff (→ PROGRESS.md) +Version and contents for the user. diff --git a/Plans/09 Release/S040-docs-release.md b/Plans/09 Release/S040-docs-release.md new file mode 100644 index 0000000..ec739f6 --- /dev/null +++ b/Plans/09 Release/S040-docs-release.md @@ -0,0 +1,31 @@ +# S040 — Docs and release + +> Category 09 Release · Model: Sonnet · Effort: high · Depends on: S039 · Size: M · Human: 🧑 approve version and contents before publishing +> Files touched: README.md, docs/releases/**, releases/** + +## Goal +A clear repo page and, after a yes, the first release. + +## Read +- docs/FEATURES-CHECK.md +- docs/CONNECTOR.md +- user's global release rules + +## Steps +- [ ] README: what it does, shots from real runs, install, connector steps, limits; no hype +- [ ] Screenshots and a short motion clip from the hidden session +- [ ] Release notes in docs/releases/0.1.0.md; version set everywhere +- [ ] 🧑 Tell the user the version and contents and wait for the yes; ask about bundling yt-dlp and ffmpeg +- [ ] After the yes: files to releases/v0.1.0/, notes with hub-release, page checked +- [ ] docs/STATUS.md final state +- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S040: …`, push + +## End criteria +- `grep -c` finds no placeholder in README +- after approval the release page lists every file with matching checksums + +## Pitfalls +Nothing goes into releases/ before the yes: the sync service publishes it at once. + +## Handoff (→ PROGRESS.md) +— diff --git a/Plans/INDEX.md b/Plans/INDEX.md index ffe7cee..d4c2afb 100644 --- a/Plans/INDEX.md +++ b/Plans/INDEX.md @@ -6,18 +6,67 @@ Tracker: https://claude.ai/artifact/XouimfVJS6FYVKskGJ8s7H ## 01 Foundation +- [ ] [S001](01%20Foundation/S001-workspace-store-settings.md) Workspace, store, settings and strings +- [ ] [S002](01%20Foundation/S002-test-server.md) Test server with faults +- [ ] [S003](01%20Foundation/S003-shell-motion-tools.md) App shell, theme, motion and screenshot tools + ## 02 Engine +- [ ] [S004](02%20Engine/S004-http-core.md) HTTP core with resume and crash-safe files +- [ ] [S005](02%20Engine/S005-dynamic-parts.md) Dynamic parts and adaptive connections +- [ ] [S006](02%20Engine/S006-manager.md) Download manager, events and snapshots +- [ ] [S007](02%20Engine/S007-error-recovery.md) Error recovery +- [ ] [S008](02%20Engine/S008-continue-links.md) Continue from a new link +- [ ] [S009](02%20Engine/S009-mirrors-checksums.md) Mirrors, Metalink and checksums +- [ ] [S010](02%20Engine/S010-logins-proxies.md) Logins, cookies and proxies +- [ ] [S011](02%20Engine/S011-ftp-sftp.md) FTP, FTPS and SFTP +- [ ] [S012](02%20Engine/S012-streams.md) HLS, DASH, RTSP and MMS + ## 03 Interface +- [ ] [S013](03%20Interface/S013-controls.md) Controls, dialogs and toasts +- [ ] [S014](03%20Interface/S014-wavy-parts-shapes.md) Wavy bars, parts map, shapes and speed graph +- [ ] [S015](03%20Interface/S015-main-window.md) Main window and list +- [ ] [S016](03%20Interface/S016-add-dialog.md) Add dialog, batch and duplicates +- [ ] [S017](03%20Interface/S017-details.md) Details panel and file actions +- [ ] [S018](03%20Interface/S018-settings-palette.md) Settings, colour, shortcuts and first run + ## 04 Control +- [ ] [S019](04%20Control/S019-limiter-priority.md) Limiter, modes and priority shares +- [ ] [S020](04%20Control/S020-auto-limit-quota.md) Automatic limiter, quota and metered lines +- [ ] [S021](04%20Control/S021-queues-schedule-power.md) Queues, scheduler and power actions +- [ ] [S022](04%20Control/S022-control-screens.md) Control screens + ## 05 Connector -## 06 Torrents and media +- [ ] [S023](05%20Connector/S023-port-server.md) The port and its protection +- [ ] [S024](05%20Connector/S024-handoff-flow.md) Hand-off flow and Nacre test + +## 06 Media + +- [ ] [S025](06%20Media/S025-video-sites.md) Video sites through yt-dlp +- [ ] [S026](06%20Media/S026-preview-convert.md) Preview and conversion ## 07 Library and tools +- [ ] [S027](07%20Library%20and%20tools/S027-rules-clipboard-drop.md) Rules, clipboard, drag and drop, drop target +- [ ] [S028](07%20Library%20and%20tools/S028-archives.md) Archive peek, unpack, join and scan +- [ ] [S029](07%20Library%20and%20tools/S029-grabber-explorer.md) Site grabber and explorer +- [ ] [S030](07%20Library%20and%20tools/S030-stats-import.md) Statistics, import and export +- [ ] [S031](07%20Library%20and%20tools/S031-cli-rest.md) Command line, headless and REST +- [ ] [S032](07%20Library%20and%20tools/S032-web-remote.md) Web remote +- [ ] [S033](07%20Library%20and%20tools/S033-tray-notify.md) Tray, notifications and autostart + ## 08 Motion and polish +- [ ] [S034](08%20Motion%20and%20polish/S034-motion-audit.md) Animation audit +- [ ] [S035](08%20Motion%20and%20polish/S035-motion-fixes.md) Animation fixes +- [ ] [S036](08%20Motion%20and%20polish/S036-taste-pass.md) app-taste pass over every screen +- [ ] [S037](08%20Motion%20and%20polish/S037-performance-security.md) Speed, idle use, security and long runs + ## 09 Release + +- [ ] [S038](09%20Release/S038-feature-sweep.md) Check every feature against the list +- [ ] [S039](09%20Release/S039-packaging.md) AppImage and tar.gz +- [ ] [S040](09%20Release/S040-docs-release.md) Docs and release 🧑 diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index d8507e6..6b75b0d 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -11,3 +11,7 @@ - D-007 — 2026-11-24 — Torrent engine is librqbit if it passes a spike (features in FEATURES 5, loopback swarm); otherwise libtorrent-rasterbar through a small C++ bridge. — Pure Rust is easier to bundle. — 06 - D-008 — 2026-11-24 — The `/improve-animations` audit runs after the interface exists (category 08). Its "ask which findings" step is answered in advance: plan every HIGH and MEDIUM finding. Its plans go to `animation-plans/`. `AUDIT.md`, `PLAN-TEMPLATE.md` and `review-animations` are not installed with that skill, so the audit uses the eight categories named in its SKILL.md plus the motion rules in app-taste. — D-004. — 08 - D-009 — 2026-11-24 — `yt-dlp` and `ffmpeg` ship with the app; nothing tells the user to install something. — User's standing preference. — 06, 09 +- D-010 — 2026-11-24 — No BitTorrent and no browser extension. The browser hands links straight to the local port; continuing from links and error recovery are first-class. Supersedes D-003's extension and D-007. — User's choice. — 02, 05 +- D-011 — 2026-11-24 — Nothing is downloaded except Rust crates. Tests and builds use the yt-dlp and ffmpeg in /usr/bin and the appimagetool already in `~/Projects/Mulberry/dist`. Bundling yt-dlp and ffmpeg waits for the user; until then a missing tool shows a designed state. Supersedes D-009. — User's choice. — 06, 09 +- D-012 — 2026-11-24 — Colours: "Follow desktop" and "Own colour" are equal choices in settings and first run; desktop is preselected when a scheme is found, otherwise own colour. — User answered "both". — 03 +- D-013 — 2026-11-24 — 40 plans, reviewed by the user as a 43-plan table, then cut: torrents and extension out, error recovery (S007) and continuing from new links (S008) added. — User's answers. — all diff --git a/docs/FEATURES.md b/docs/FEATURES.md index f311ea7..6e49d20 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -19,7 +19,11 @@ managers or our own idea. Nothing here is dropped without an entry in `DECISIONS - 1.9 F FTP, FTPS. + SFTP. Resume and segments where the server allows it. - 1.10 F RTSP and MMS streams, recorded through ffmpeg. - 1.11 + HLS and DASH (unencrypted) with parallel fragments, joined by ffmpeg. -- 1.12 + Refresh an expired link: reopen the source page, take the new address, keep the parts. +- 1.12 + **Continue from a new link**: paste a fresh link, or send it from the browser, and the download keeps its parts. Checked + first: length, validators, and a byte comparison of finished ranges. Opens the source page to get one. Works on partial files too. +- 1.17 + **Error recovery**: every failure has a kind, a plain message, a fix button and a retry rule (DNS, TLS, refused, timeout, + 4xx, 5xx, expired link, login needed, changed file, disk full, read-only, gone folder, unplugged drive, sleep, network change, + killed app). Auto-resume after restart, wake and network return. No state loses finished bytes. - 1.13 + Checksums: MD5, SHA-1, SHA-256, SHA-512, BLAKE3; read from metalink, sidecar file, header or paste. - 1.14 + HTTP/2 and HTTP/3 are used only when they beat parallel HTTP/1.1 (one connection, no segments). - 1.15 + Proxies (HTTP, SOCKS5, system) per app, host or download. Tested only against a local stub. @@ -27,7 +31,7 @@ managers or our own idea. Nothing here is dropped without an entry in `DECISIONS ## 2 Limits, priority, queues, time - 2.1 F Three traffic modes (low, medium, high), each editable, switchable from tray and toolbar. + "Snail" one-click mode. -- 2.2 F Limits: global, per queue, per host, per download, down and up. Change live, no reconnect. +- 2.2 F Limits: global, per queue, per host, per download. Change live, no reconnect. - 2.3 + **Priority** per download (lowest to highest, plus "only this one"): weighted share of bandwidth and of connections. - 2.4 + **Automatic limiter**: measures latency and backs off when the line is busy with something else. - 2.5 + Quota: per day or month cap with warning and stop. Metered connection (NetworkManager) pauses or limits. @@ -40,7 +44,7 @@ managers or our own idea. Nothing here is dropped without an entry in `DECISIONS - 3.1 F Add dialog: URL(s), name, folder, queue, priority, limit, parts, headers, cookies, login, mirrors, checksum; probes size, type and resume support as you type. Remembers folders. - 3.2 F Batch: paste lists, import from clipboard or file, numbered patterns `[001-120]`, `{a,b}`, dates. -- 3.3 F Drag and drop of links, files and .torrent/.metalink onto the window. F Floating drop target with live speed. +- 3.3 F Drag and drop of links, lists and .metalink onto the window. F Floating drop target with live speed. - 3.4 + Clipboard watcher (off, ask, add), filter by extension and host. - 3.5 F Site grabber (HTML spider): depth, host, extension and size filters, tree preview, optional link rewrite. - 3.6 F Site explorer: browse FTP/SFTP/open HTTP directory listings and pick files. @@ -48,26 +52,21 @@ managers or our own idea. Nothing here is dropped without an entry in `DECISIONS - 3.8 + Duplicate detection (URL, name, checksum): resume, rename, skip or show existing. - 3.9 F Rules: by extension, MIME, host, size → folder, queue, tags, priority, name template. -## 4 Browser connector -- 4.1 F Extension for Firefox and Chromium family: intercept downloads, context menu on links, images, selections, "all links". -- 4.2 + Local port (default 17616, loopback only, changeable): HTTP JSON and WebSocket, documented in `CONNECTOR.md`. -- 4.3 + Pairing: extension gets a token after a code is accepted in Medlar. Host and Origin checked; a web page can't add downloads. -- 4.4 + Hand-off carries cookies, referrer, user agent, headers, POST body, suggested name. Falls back to the browser if Medlar is off. -- 4.5 + Rules in the extension: minimum size, types, sites, hold a key to bypass, per-site off switch. -- 4.6 + Media detection on the page (video, audio, HLS/DASH lists) with a popup list of qualities. DRM is never touched. -- 4.7 + Live progress in the extension popup, with pause and resume. -- 4.8 + Nacre's "custom manager" JSON (`POST /`, `GET /` as ping) works unchanged; unpaired adds always show the Add dialog. -- 4.9 + Wakes Medlar through native messaging or `medlar:` links. Also handles `magnet:`, .torrent, .metalink. - -## 5 Torrents -- 5.1 F .torrent and magnet, file selection with priorities, sequential mode, DHT, PEX, LSD, UPnP. 5.2 F Seeding by ratio/time, - limits, peers, trackers, piece map. 5.3 + Create torrents, web seeds, RSS with filters, watch folder, recheck, move data, - IP filter, encryption, bind to an interface. v1, v2 and hybrid where the library supports it. +## 4 Connector (no extension, D-010) +- 4.1 + Local port (default 17616, loopback only, changeable, on/off): a browser that can hand links to a port uses it directly. + Documented in `docs/CONNECTOR.md`, with a "send a test link" button and a list of who sent what. +- 4.2 + The browser's JSON works as it is: `GET /` answers as ping, `POST /` takes `url`, `filename`, `referrer`, `cookies`, + `user_agent`, `headers`, `size`, `mime` (Nacre's "custom manager" format, unknown fields ignored). Single links and lists. +- 4.3 + A web page can't add downloads: `Host`, `Origin`, method and content type checked, size and rate limits, no CORS. +- 4.4 + A handed-over link opens the Add dialog; "add without asking" is a setting, off by default, with a rule for which types. +- 4.5 + Cookies, referrer, user agent and headers are used for the download, kept in the keyring, never in logs. +- 4.6 + An incoming link that matches a paused, failed or expired download offers to continue that download (1.12). +- 4.7 + `medlar:` links and `.metalink` files open in Medlar. If it is closed, the link starts it. ## 6 Media -- 6.1 F Video sites through yt-dlp (bundled, self-updating): quality, audio only, subtitles, playlists, chapters. +- 6.1 F Video sites through yt-dlp (the one on the system, D-011): quality, audio only, subtitles, playlists, chapters. - 6.2 F Preview unfinished media, pictures and archives; sequential-first option for media. -- 6.3 F Convert after download (ffmpeg, bundled): presets, extract audio, remux. +- 6.3 F Convert after download (ffmpeg, D-011): presets, extract audio, remux. ## 7 Library and files - 7.1 F List with search, filters (state, type, queue, tag, host, date), sort, columns, groups, multi-select, compact and card views. @@ -86,10 +85,10 @@ managers or our own idea. Nothing here is dropped without an entry in `DECISIONS - 8.5 F Languages: every string goes through a catalogue; English first, others can be dropped in. ## 9 Interface (Material You, M3 Expressive) -- 9.1 Dynamic colour from wallpaper/desktop scheme or a seed, light, dark, AMOLED, contrast levels, scheme variants. +- 9.1 Dynamic colour from the desktop scheme (Caelestia, KDE) or an own seed, both first-class (D-012); light, dark, AMOLED, contrast levels, scheme variants. - 9.2 **Wavy progress**: linear and circular. Amplitude follows speed, flattens when paused, turns to error/verify states, and the part gaps travel with the dynamic parts. Moves only while bytes arrive. -- 9.3 **Parts map**: live blocks that split, hand over and merge with springs (1.2 made visible). Torrent piece map in the same style. +- 9.3 **Parts map**: live blocks that split, hand over and merge with springs (1.2 made visible). - 9.4 Expressive shapes: morphing loading indicator, shape per file type, button press morphs, connected button groups, split buttons, FAB menu, floating toolbar, sliding selection. - 9.5 Speed graph and big speed number with rolling tabular digits. Limit dial with spring-loaded handle. @@ -98,5 +97,5 @@ managers or our own idea. Nothing here is dropped without an entry in `DECISIONS - 9.8 Motion levels: off, reduced, normal, expressive. Idle app uses no CPU and draws no frames. ## 10 Not included -Community comments and file ratings from FDM (they need a public server), Tor, DRM or captcha bypass, a Windows, macOS or +Community comments and file ratings from FDM (they need a public server), BitTorrent and the browser extension (D-010), Tor, DRM or captcha bypass, a Windows, macOS or Android build (Linux only, D-002; phones use the web remote). diff --git a/docs/STATUS.md b/docs/STATUS.md index bf3fef3..b820bd8 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -1,4 +1,4 @@ # Status -Frame set up on 2026-11-24, no plans written yet, no code yet. Next: `/plan-generate`, then `/orchestrate` in a new session. +40 plans written on 2026-11-24, no code yet. Next: `/orchestrate` in a new session, starting at S001. The current plan is the first unchecked line in `Plans/INDEX.md`.