Compare commits
212 changed files with 752 additions and 21152 deletions
34
CLAUDE.md
34
CLAUDE.md
|
|
@ -2,14 +2,21 @@
|
|||
|
||||
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
|
||||
## 0. Session rules — read first
|
||||
|
||||
1. Started with **one plan** (`Plans/<NN Category>/SNNN-*.md`): read only your plan and what it names. Not other plans, `ORCHESTRATOR.md` or all of `PLAN.md`. Only the orchestrator reads `docs/HANDOFF.md`, `docs/STATUS.md`.
|
||||
2. **Few steps, short output**: batch reads and edits, cap command output, never read the same thing twice.
|
||||
3. **No testing while building**: no tests written or run, no screenshots, no app runs, no release builds, unless the plan says `Phase: test`. One compile check: `nice cargo check -q -j 2 -p medlar`. Write your test file `docs/tests/SNNN-slug.md` (checks in words, from `docs/tests/_TEMPLATE.md`).
|
||||
4. Stay in scope; ideas go to `docs/PROGRESS.md` (“Later”). Invent nothing: check the code or docs, else ask the orchestrator (the user if there is none).
|
||||
5. **End**: boxes ticked, PROGRESS entry (≤ 5 lines), `docs/DECISIONS.md` if a decision binds later plans, INDEX line ticked, commit `SNNN: …` and push to `origin` if it is set. Report what was not done and not tested. The orchestrator writes the tracker (https://claude.ai/artifact/XouimfVJS6FYVKskGJ8s7H, collection `plans`).
|
||||
6. **Languages**: English, short.
|
||||
0. If `docs/HANDOFF.md` exists, read it and `docs/STATUS.md` first.
|
||||
1. You are started with **one plan**: `Plans/<NN Category>/SNNN-*.md`. Read only: this file, **your plan**, the **last 3 entries** of `docs/PROGRESS.md`, and the files/sections your plan names.
|
||||
2. **Do not open other files in `Plans/`** (nor `ORCHESTRATOR.md`, nor all of `PLAN.md`).
|
||||
3. **Tick each checkbox in your plan file the moment it is done**, one by one, never in batches. Right after each tick, sync the tracker (§Tracker). An interrupted plan resumes at its first unchecked box.
|
||||
4. **Stay in scope.** Out-of-scope ideas go to `docs/PROGRESS.md` (“Later”), not into the code.
|
||||
5. **Invent nothing**: check the code/docs; if a fact is still missing, ask — the **orchestrator** if you were started by one (never the user directly), otherwise the user.
|
||||
6. **End of session**: (a) end criteria verified **by commands**, not memory; (b) `docs/PROGRESS.md` entry (≤ 15 lines: done, not done, later); (c) `docs/DECISIONS.md` if a decision binds later plans; (d) tick your line in `Plans/INDEX.md` (no commentary); (e) commit `SNNN: …` and push to `origin` if it is set; (f) short report: done, not done, what the user/orchestrator must do, and any instruction that cost more than it gave.
|
||||
7. **Languages**: answer in English, short (the user is on a tight budget). Code, comments and user-facing text in English. Internal docs (`CLAUDE.md`, `Plans/`, `PROGRESS.md`) in English.
|
||||
|
||||
## Tracker
|
||||
|
||||
Live checklist of every plan: https://claude.ai/artifact/XouimfVJS6FYVKskGJ8s7H (collection `plans`, one doc per plan id).
|
||||
After ticking a box: `ArtifactData` `update` with `url` = the tracker, `collection: "plans"`, `doc_id: "SNNN"`, `data: {"status": "running" or "done" (all boxes ticked), "items": [{"text": "<step>", "done": true/false}, … every checkbox of the plan in order], "updated": "<ISO date-time>"}` and `if_version` = the version returned by your previous write (first time: `get` the doc once to read it; a doc that doesn't exist yet takes no `if_version`). Load the tool with ToolSearch `select:ArtifactData` once. If the tracker call fails, keep working and say so in the report: the plan file is the source of truth.
|
||||
|
||||
## 1. Repository layout
|
||||
|
||||
|
|
@ -22,7 +29,7 @@ crates/cli/ command line and headless mode, a library used by the `medlar
|
|||
crates/testserver/ local server with faults for tests (ranges, throttle, cuts, expiry, logins)
|
||||
tools/ screenshot, hidden-run, icon and packaging scripts
|
||||
assets/ icon, fonts, Material Symbols
|
||||
docs/ FEATURES, PROGRESS, DECISIONS, STATUS, CONNECTOR, tests/ (one test file per plan); tracker.html is the tracker page's source
|
||||
docs/ FEATURES, PROGRESS, DECISIONS, STATUS, CONNECTOR; tracker.html is the tracker page's source
|
||||
Plans/ one plan per session
|
||||
```
|
||||
Never modify: everything outside this folder. `~/Projects/*` is read-only reference (copy code in, never edit there). `~/.abdm` and the running AB Download Manager are the user's: never stop, read or reconfigure them.
|
||||
|
|
@ -40,10 +47,10 @@ Never modify: everything outside this folder. `~/Projects/*` is read-only refere
|
|||
## 3. Code rules
|
||||
|
||||
- Write like the neighbouring code. KISS, DRY, YAGNI; no abstraction without ≥ 2 uses.
|
||||
- Test phase: new pure logic gets a test; a bug fix gets a regression test when feasible.
|
||||
- UI work reads `~/.claude/skills/app-taste/SKILL.md` once; motion work also `animate`. Interface colours, radii, spacing, type and motion come from tokens only.
|
||||
- New pure logic gets a test; a bug fix gets a regression test when feasible.
|
||||
- UI work loads the `app-taste` skill first and follows it; motion work also loads `animate`. Interface colours, radii, spacing, type and motion come from tokens only.
|
||||
- Wavy bars and other motion run only while something really changes; idle draws no frames.
|
||||
- `core` never depends on egui. Every engine behaviour and its failure paths get a check in the test file, run against `testserver` in the test phase.
|
||||
- `core` never depends on egui. Every engine behaviour has a test against `testserver`, including the failure paths.
|
||||
- Errors reach the user as plain words: what failed, then why. Every user string goes through the string catalogue (FEATURES 8.5).
|
||||
- Follow the pattern of real products only for mechanics; the look, name, icon and copy are Medlar's own.
|
||||
|
||||
|
|
@ -58,7 +65,7 @@ Never modify: everything outside this folder. `~/Projects/*` is read-only refere
|
|||
- Run apps hidden (kittest or nested niri) with a throwaway `XDG_*` home unless the user asks to watch. Power actions are tested against a fake logind only.
|
||||
- DRM, captchas and paywalls are never worked around.
|
||||
|
||||
## 5. Verification tools (test phase only, except the compile check)
|
||||
## 5. Verification tools
|
||||
|
||||
| Tool | Role | Available after |
|
||||
|---|---|---|
|
||||
|
|
@ -69,7 +76,6 @@ Never modify: everything outside this folder. `~/Projects/*` is read-only refere
|
|||
| `python3 tools/gen_assets.py icons` | adds icons: put the name in `tools/icons.txt` first | S003 |
|
||||
| `nice cargo build --release -j 2` | release build (never at the same time as the tests) | 01 Foundation |
|
||||
| `nice cargo test -j 2 -p medlar-testserver` / `cargo run -p medlar-testserver -- [--port N] [--tls] [--media] [--proxies]` | local server with faults and proxy stubs; API in the `crates/testserver/src/lib.rs` header | S002 |
|
||||
| `PORT=… TS=… tools/tray-check/run.sh <name> <driver> [tray] [second]` | close to tray in a hidden niri with a fake tray host (drivers `tray.sh`, `notray.sh`, `min.sh`); testserver on `$TS` | S047 |
|
||||
| `ssh [email protected] hub-release` | release notes on Astar Hub (release only, after the user's yes) | now |
|
||||
|
||||
Don't assume a tool exists: check first. When your plan creates a tool, add its row here.
|
||||
|
|
@ -80,4 +86,4 @@ Remote: Astar Hub only (`forgejo:astar76/Medlar.git`, see the user's global CLAU
|
|||
|
||||
## 7. Definition of done
|
||||
|
||||
A plan is done when it compiles, its boxes and INDEX line are ticked, its test file exists and it is committed. The **project** is done when the test phase has passed. Compiled is not tested: say so.
|
||||
A plan is done when: all end criteria are **verified by command or test**; planned builds/tests are green; nothing regressed; `PROGRESS` / `DECISIONS` are up to date; the INDEX line and tracker are ticked; the work is committed. Say explicitly what was **not** done or verified.
|
||||
|
|
|
|||
182
Cargo.lock
generated
182
Cargo.lock
generated
|
|
@ -583,19 +583,6 @@ dependencies = [
|
|||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "blake3"
|
||||
version = "1.8.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d9e454fc11f76977dc803893aff6304ed33d6a26efae8696573bea74baa27ae"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"constant_time_eq",
|
||||
"cpufeatures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.12.1"
|
||||
|
|
@ -714,42 +701,18 @@ dependencies = [
|
|||
"thiserror 1.0.69",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "calloop"
|
||||
version = "0.14.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"polling",
|
||||
"rustix 1.1.6",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "calloop-wayland-source"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"
|
||||
dependencies = [
|
||||
"calloop 0.13.0",
|
||||
"calloop",
|
||||
"rustix 0.38.44",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "calloop-wayland-source"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa"
|
||||
dependencies = [
|
||||
"calloop 0.14.5",
|
||||
"rustix 1.1.6",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cbc"
|
||||
version = "0.2.1"
|
||||
|
|
@ -890,12 +853,6 @@ version = "0.10.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a"
|
||||
|
||||
[[package]]
|
||||
name = "constant_time_eq"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.9.4"
|
||||
|
|
@ -970,15 +927,6 @@ dependencies = [
|
|||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-queue"
|
||||
version = "0.3.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae"
|
||||
dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.23"
|
||||
|
|
@ -1403,7 +1351,6 @@ dependencies = [
|
|||
"profiling",
|
||||
"raw-window-handle",
|
||||
"serde",
|
||||
"smithay-clipboard",
|
||||
"web-time",
|
||||
"windows-sys 0.61.2",
|
||||
"winit",
|
||||
|
|
@ -2655,26 +2602,6 @@ dependencies = [
|
|||
"accesskit_consumer",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ksni"
|
||||
version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bcc1cb43797140f74b711f1c4a49f48a7a7429f211c5fb78264e7bcd1e99caf"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"async-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"crossbeam-queue",
|
||||
"futures-channel",
|
||||
"futures-lite",
|
||||
"futures-util",
|
||||
"pastey",
|
||||
"serde",
|
||||
"task-local",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kurbo"
|
||||
version = "0.11.3"
|
||||
|
|
@ -2812,46 +2739,38 @@ checksum = "7ebb8d8732c6a6df3d8f032a82911cfc747e00efb95cc46e8d0acd5b5b88570c"
|
|||
|
||||
[[package]]
|
||||
name = "medlar"
|
||||
version = "0.1.1"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"chrono",
|
||||
"dirs",
|
||||
"eframe",
|
||||
"egui_kittest",
|
||||
"image",
|
||||
"ksni",
|
||||
"log",
|
||||
"medlar-cli",
|
||||
"medlar-core",
|
||||
"medlar-testserver",
|
||||
"percent-encoding",
|
||||
"resvg",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tempfile",
|
||||
"tokio",
|
||||
"url",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "medlar-cli"
|
||||
version = "0.1.1"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"medlar-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "medlar-core"
|
||||
version = "0.1.1"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"arc-swap",
|
||||
"base64 0.23.1",
|
||||
"blake3",
|
||||
"bytes",
|
||||
"cbc",
|
||||
"chrono",
|
||||
"dirs",
|
||||
"fastrand",
|
||||
|
|
@ -2863,11 +2782,9 @@ dependencies = [
|
|||
"md-5",
|
||||
"medlar-testserver",
|
||||
"percent-encoding",
|
||||
"quick-xml",
|
||||
"rcgen",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"roxmltree 0.21.2",
|
||||
"rusqlite",
|
||||
"russh",
|
||||
"russh-sftp",
|
||||
|
|
@ -2876,7 +2793,6 @@ dependencies = [
|
|||
"rustls-platform-verifier",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"tempfile",
|
||||
"tokio",
|
||||
|
|
@ -2888,7 +2804,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "medlar-testserver"
|
||||
version = "0.1.1"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"md-5",
|
||||
"rcgen",
|
||||
|
|
@ -3662,12 +3578,6 @@ dependencies = [
|
|||
"phc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pastey"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4"
|
||||
|
||||
[[package]]
|
||||
name = "pbkdf2"
|
||||
version = "0.13.0"
|
||||
|
|
@ -4963,8 +4873,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"calloop 0.13.0",
|
||||
"calloop-wayland-source 0.3.0",
|
||||
"calloop",
|
||||
"calloop-wayland-source",
|
||||
"cursor-icon",
|
||||
"libc",
|
||||
"log",
|
||||
|
|
@ -4981,44 +4891,6 @@ dependencies = [
|
|||
"xkeysym",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smithay-client-toolkit"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"calloop 0.14.5",
|
||||
"calloop-wayland-source 0.4.1",
|
||||
"cursor-icon",
|
||||
"libc",
|
||||
"log",
|
||||
"memmap2",
|
||||
"rustix 1.1.6",
|
||||
"thiserror 2.0.21",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-csd-frame",
|
||||
"wayland-cursor",
|
||||
"wayland-protocols",
|
||||
"wayland-protocols-experimental",
|
||||
"wayland-protocols-misc",
|
||||
"wayland-protocols-wlr",
|
||||
"wayland-scanner",
|
||||
"xkeysym",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smithay-clipboard"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"smithay-client-toolkit 0.20.0",
|
||||
"wayland-backend",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smol_str"
|
||||
version = "0.2.2"
|
||||
|
|
@ -5231,15 +5103,6 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "task-local"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2972044a9e5e448a506a7ff6f0d03b566d8ef4cd6918a58fc59835a0f8666626"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.27.0"
|
||||
|
|
@ -5527,7 +5390,6 @@ version = "0.1.44"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
|
||||
dependencies = [
|
||||
"log",
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
|
|
@ -5895,32 +5757,6 @@ dependencies = [
|
|||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols-experimental"
|
||||
version = "20250721.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-protocols",
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols-misc"
|
||||
version = "0.3.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-protocols",
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols-plasma"
|
||||
version = "0.3.12"
|
||||
|
|
@ -6401,7 +6237,7 @@ dependencies = [
|
|||
"bitflags 2.13.2",
|
||||
"block2 0.5.1",
|
||||
"bytemuck",
|
||||
"calloop 0.13.0",
|
||||
"calloop",
|
||||
"cfg_aliases",
|
||||
"concurrent-queue",
|
||||
"core-foundation 0.9.4",
|
||||
|
|
@ -6422,7 +6258,7 @@ dependencies = [
|
|||
"raw-window-handle",
|
||||
"redox_syscall 0.4.1",
|
||||
"rustix 0.38.44",
|
||||
"smithay-client-toolkit 0.19.2",
|
||||
"smithay-client-toolkit",
|
||||
"smol_str",
|
||||
"tracing",
|
||||
"unicode-segmentation",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ members = ["crates/*"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.1"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,36 @@
|
|||
# Orchestrator — Medlar
|
||||
|
||||
How plans are run (one worker at a time, budget, checks, testing at the end) is in the `orchestrate` skill. This file holds only what is special to this project.
|
||||
You are the **orchestrator**. You do not do the plans' work yourself: you launch, unblock and validate the sessions that do. Read `CLAUDE.md`, then `Plans/INDEX.md`, then the last 3 entries of `docs/PROGRESS.md`. Start from the **first unchecked plan** in INDEX.
|
||||
|
||||
- Plans: `Plans/<NN Category>/SNNN-*.md`; index `Plans/INDEX.md`, in its order. Logs: `docs/PROGRESS.md`, `docs/DECISIONS.md`. Test files: `docs/tests/`, results: `docs/TEST-REPORT.md`. Plans up to S019 have automatic tests of their own and no test file.
|
||||
- Tracker: https://claude.ai/artifact/XouimfVJS6FYVKskGJ8s7H (collection `plans`, one doc per plan id; written once, when a plan ends). `Plans/Later/` is not run.
|
||||
- Decide alone (D-004), except: a release, 🧑 steps, what cannot be undone or leaves this PC, a change of the goal.
|
||||
- Merging: `main` is fast-forwarded after each finished category (D-014). Pushes go to Astar Hub only.
|
||||
- Never touch `~/.abdm`, port 15151, or anything outside this folder.
|
||||
- Binding decision (kept here so branches merge cleanly): D-060 — 2026-11-25 — One worker at a time; no tests, screenshots or release builds in build plans; each plan leaves `docs/tests/SNNN-slug.md`; tests run in category 09. Replaces D-016 and the per-plan test rules — the user: weekly limit gone too fast, testing while working too heavy — all unstarted plans (S017, S021 on)
|
||||
- Version 1 is cut to 13 plans after S009, S012, S016 (the user, 2026-11-25): see INDEX “Later”.
|
||||
## Files
|
||||
|
||||
- Plans: `Plans/<NN Category>/SNNN-*.md`, one folder per category (header gives model, effort, dependencies, files touched, 🧑). Index: `Plans/INDEX.md`.
|
||||
- Logs: `docs/PROGRESS.md`, `docs/DECISIONS.md`. Vision: `PLAN.md`.
|
||||
- Tracker: https://claude.ai/artifact/XouimfVJS6FYVKskGJ8s7H — sessions update it themselves; you only check it matches the plan files (`ArtifactData list plans` vs. the plans' checkboxes; `update` to repair).
|
||||
|
||||
## Launching sessions
|
||||
|
||||
**Look-ahead rule (check it after EVERY event: start, GO, validation, answer to a session):** count the sessions you started that are *waiting for GO* (not running, not done). If fewer than **3** and unchecked plans remain in scope, start waiting sessions for the next plans in INDEX order right now, until the count is reached. Waiting sessions cost almost nothing and don't touch files: preparing them is never “running in parallel”, and dependencies only gate the GO, not the preparation. Say the count in each status line (`waiting: S014, S015, S016`).
|
||||
|
||||
1. Prepare each look-ahead plan as a nested session (`start_session`, `initiation: "user_asked"`, same folder) with the plan's model and effort. Brief: *“Read CLAUDE.md and Plans/<NN Category>/SNNN-xxx.md only. Do not start: wait for GO from the orchestrator.”* plus “Use the caveman skill (`caveman:caveman`) for all replies; code, docs and commits stay normal English.” plus anything the plan cannot know (state of previous plans, tags, decisions taken since). Do not repeat CLAUDE.md rules.
|
||||
2. Send **GO** (`SendMessage` to its `local_…` id) when its dependencies are validated.
|
||||
3. **Parallel** only if the plans are consecutive, none depends on another, their “files touched” don't overlap, and at most two run at once, only one of them builds or runs tests at a time (4 cores, 16 GB). Otherwise one at a time.
|
||||
|
||||
## Answering sessions
|
||||
|
||||
Sessions talk to **you**, never to the user. Answer from the project goal, `PLAN.md`, `DECISIONS.md` and the code. The user does not want to be stopped (D-004): take the recommended choice yourself and record it. Disturb them only for a real necessity (a release, 🧑 steps, irreversible or outward-facing actions, a decision that changes the goal); then stop and tell them exactly what to look at, how, and what to answer. Record any decision you take in `docs/DECISIONS.md`.
|
||||
|
||||
## Validating a plan (when its session ends)
|
||||
|
||||
Check with commands, not its report: plan checkboxes all ticked; end criteria hold (rerun only **targeted** tests for what changed); PROGRESS entry present; INDEX line ticked; commit (pushed if `origin` is set) present; working tree clean; tracker doc matches. If something is missing, send it back to the same session. Then GO the next one and apply the look-ahead rule.
|
||||
|
||||
Relay to the user any remark that an instruction costs more than it gives, with an alternative.
|
||||
|
||||
## Context and stop
|
||||
|
||||
- Near ~300K context: finish validating the current plan, then tell the user to open a new session with `/orchestrate` (you resume from INDEX).
|
||||
- If the user says **STOP**: stop the running sessions and your follow-up; on resume, message the same sessions to continue from their first unchecked box.
|
||||
|
||||
## End of a phase / project
|
||||
|
||||
Short report: what changed (before/after), what was verified, what remains, what the user must do.
|
||||
|
|
|
|||
5
PLAN.md
5
PLAN.md
|
|
@ -5,7 +5,7 @@ A download manager for Linux that does everything Free Download Manager does and
|
|||
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.
|
||||
Version 1 is done when every item in [docs/FEATURES.md](docs/FEATURES.md) §1–9, except those under Later, works and has been tested.
|
||||
Done means every item in [docs/FEATURES.md](docs/FEATURES.md) §1–9 works and has been tested.
|
||||
|
||||
## Current state
|
||||
New project. No code yet. Reusable code of the user's own: Damson (motion, theme, kittest screenshots), Mulberry (shapes, wavy
|
||||
|
|
@ -22,8 +22,5 @@ slider, widgets, tray), Nacre (hidden nested session, hand-off format).
|
|||
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.
|
||||
|
||||
## Later (after version 1)
|
||||
Automatic limiter, quota, metered lines (2.4, 2.5); preview and conversion (6.2, 6.3); archive peek, unpack, join, scan (3.7, 7.5); site grabber and explorer (3.5, 3.6); statistics, import and export (7.6, 7.7); command line, headless, REST and web remote (8.2, 8.3 except single instance). Plans: `Plans/Later/`.
|
||||
|
||||
## Out of scope
|
||||
FEATURES §10.
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ FEATURES 1.8, 1.13.
|
|||
- crates/core/src/{segment,host,relink}*
|
||||
|
||||
## Steps
|
||||
- [x] 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
|
||||
- [x] Metalink 3 and 4 files and the `Link`/`Digest` headers; piece hashes repair single pieces
|
||||
- [x] 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)
|
||||
- [x] Verify state and progress in the snapshot; mismatch offers repair (piece hashes), other mirror or restart
|
||||
- [x] XML parsing hardened: size and depth limits, no entities
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S009: …`, push
|
||||
- [ ] 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
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ FEATURES 1.10, 1.11, ffmpeg runner used by media plans.
|
|||
- docs/DECISIONS.md D-011
|
||||
|
||||
## Steps
|
||||
- [x] ffmpeg finder and runner: argument lists only, progress parsing, cancel, log tail, missing-tool error kind
|
||||
- [x] HLS: master and media lists, variants, audio groups, AES-128 clear-key as the list itself offers; live lists record until stopped
|
||||
- [x] DASH: static and simple dynamic manifests, representation choice
|
||||
- [x] Fragments in parallel with retry, resume after restart, joined without re-encoding
|
||||
- [x] RTSP and MMS recorded through ffmpeg with stop and size or time limit
|
||||
- [x] DRM (Widevine, FairPlay, PlayReady signals) is recognised and refused with a plain message
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S012: …`, push
|
||||
- [ ] 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
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ FEATURES 3.1, 3.2, 3.8, and "this continues an earlier download" (4.6).
|
|||
- docs/FEATURES.md §3
|
||||
|
||||
## Steps
|
||||
- [x] Dialog with link(s), live probe (size, kind shape, resume, parts), name, folder with recents and free space, queue, priority, limit, parts, schedule
|
||||
- [x] Advanced: headers, cookies, login, referrer, user agent, proxy, mirrors, checksum; remembers folders per type
|
||||
- [x] Batch: pasted lists, file or clipboard import, patterns `[001-120]`, `{a,b}`, dates, with preview, select and a hard cap
|
||||
- [x] Duplicates by link, name and checksum: resume, rename, skip or show
|
||||
- [x] When S008's matcher finds an unfinished download: "Continue that download" first, with the reason
|
||||
- [x] Paste a new link into a failed task ("Continue from link"), with the verdict shown before anything changes
|
||||
- [x] Probe errors inline with fixes (login needed, expired); add anyway is possible
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S016: …`, push
|
||||
- [ ] 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# S017 — Details panel and file actions
|
||||
|
||||
> Category 03 Interface · Model: Sonnet · Effort: medium · Depends on: S015, S009 · Phase: build · Human: no
|
||||
> 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
|
||||
|
|
@ -12,20 +12,16 @@ FEATURES 7.2, 7.3, 7.4, 9.3 in place.
|
|||
- crates/core/src/{verify,mirror}*
|
||||
|
||||
## Steps
|
||||
- [x] Side panel or bottom sheet by width: overview, parts map, graph, log, headers, mirrors, checksum
|
||||
- [x] File actions: open, show in folder (D-Bus FileManager1), move, rename, copy link, redownload, bin, "file is gone" state
|
||||
- [x] Tags and notes; tag colours from theme roles only
|
||||
- [x] Live edits: limit, parts, priority, queue, link, login
|
||||
- [x] Log with copy, filter and redaction; properties copyable
|
||||
- [x] Error section: what, why, when tried, next try, all fixes
|
||||
- [x] Test file `docs/tests/S017-details.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S017: …`, push
|
||||
- [ ] 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 check -q -j 2 -p medlar` clean
|
||||
|
||||
## Checks for the test file (do not run now)
|
||||
- automatic tests in medlar (details) green
|
||||
- `nice cargo test -j 2 -p medlar --test details` green
|
||||
- shots of every tab and the error state looked at
|
||||
|
||||
## Pitfalls
|
||||
|
|
|
|||
29
Plans/04 Control/S020-auto-limit-quota.md
Normal file
29
Plans/04 Control/S020-auto-limit-quota.md
Normal file
|
|
@ -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.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# S021 — Queues, scheduler and power actions
|
||||
|
||||
> Category 04 Control · Model: Sonnet · Effort: medium · Depends on: S019 · Phase: build · Human: no
|
||||
> 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
|
||||
|
|
@ -11,21 +11,16 @@ FEATURES 2.6–2.9.
|
|||
- docs/FEATURES.md §2
|
||||
|
||||
## Steps
|
||||
- [x] Queues: folder, limit, active count, order, schedule, done action; move tasks between them
|
||||
- [x] Schedules: times, weekdays, once, mode by time grid; time zone, daylight saving and missed-while-asleep rules; the clock is injectable
|
||||
- [x] Dependencies and delayed start; cycles refused
|
||||
- [x] When done: shut down, suspend, hibernate, log out, lock, quit, run command, with a cancellable countdown; conditions (all, queue, task)
|
||||
- [x] logind through zbus, inhibit suspend while downloading; capabilities checked first
|
||||
- [x] Run program: argument list with placeholders, no shell, timeout, output in the log
|
||||
- [x] Test file `docs/tests/S021-queues-schedule-power.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S021: …`, push
|
||||
- [ ] 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 check -q -j 2 -p medlar` clean
|
||||
|
||||
## Checks for the test file (do not run now)
|
||||
- automatic tests in medlar-core (schedule) green against a fake logind
|
||||
- daylight saving, time zone and missed-while-asleep on a virtual clock
|
||||
- `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.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# S022 — Control screens
|
||||
|
||||
> Category 04 Control · Model: Sonnet · Effort: medium · Depends on: S015, S018, S021 · Phase: build · Human: no
|
||||
> 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.3, 2.6–2.9 and 9.5 on screen (automatic limiter and quota are Later).
|
||||
FEATURES 2.1–2.9 and 9.5 on screen.
|
||||
|
||||
## Read
|
||||
- app-taste and animate skills
|
||||
|
|
@ -12,20 +12,16 @@ FEATURES 2.1–2.3, 2.6–2.9 and 9.5 on screen (automatic limiter and quota are
|
|||
- crates/app/src/ui/{wave,graph}*
|
||||
|
||||
## Steps
|
||||
- [x] Mode switch in the toolbar as a connected group, snail included
|
||||
- [x] Limit dial: wavy slider with spring handle, log scale, typing and units
|
||||
- [x] Priority control in rows and details, share preview; "only this one"
|
||||
- [x] Queue page: cards with live totals, drag tasks and order, edit sheet
|
||||
- [x] Week grid for modes and starts: paint by drag, keyboard too
|
||||
- [x] Done-action picker with countdown sheet
|
||||
- [x] Test file `docs/tests/S022-control-screens.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S022: …`, push
|
||||
- [ ] 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 check -q -j 2 -p medlar` clean
|
||||
|
||||
## Checks for the test file (do not run now)
|
||||
- automatic tests in medlar (control) green: drag keeps the grab point, keyboard equivalent works
|
||||
- `nice cargo test -j 2 -p medlar --test control` green: drag keeps the grab point, keyboard equivalent works
|
||||
- shots looked at
|
||||
|
||||
## Pitfalls
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# S023 — The port and its protection
|
||||
|
||||
> Category 05 Connector · Model: Opus (network security) · Effort: medium · Depends on: S016 · Phase: build · Human: no
|
||||
> 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
|
||||
|
|
@ -12,24 +12,19 @@ A browser hands links to 127.0.0.1:17616; nothing else can abuse it. FEATURES 4.
|
|||
- CLAUDE.md §4
|
||||
|
||||
## Steps
|
||||
- [x] Server on loopback only, changeable port, on and off live, port-in-use state that names the fix
|
||||
- [x] `GET /` ping with name and version; `POST /` with one link or a list, unknown fields ignored, size and rate limits, answers 2xx quickly
|
||||
- [x] Refuses foreign `Host` (DNS rebinding), any web `Origin`, form content types and preflights; no CORS headers
|
||||
- [x] Checks links (http, https, ftp, ftps, sftp, stream schemes only), names and headers; hop-by-hop and injection headers dropped
|
||||
- [x] Cookies, referrer and user agent used for the download and kept through the keyring module
|
||||
- [x] Sender log: when, what, accepted or why not; sender process name from /proc/net/tcp where possible
|
||||
- [x] docs/CONNECTOR.md: format, examples with curl, security notes
|
||||
- [x] Test file `docs/tests/S023-port-server.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S023: …`, push
|
||||
- [ ] 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 check -q -j 2 -p medlar` clean
|
||||
|
||||
## Checks for the test file (do not run now)
|
||||
- automatic tests in medlar-core (connector) green
|
||||
- `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
|
||||
- every attack: foreign Host, web Origin, form content type, preflight, header injection
|
||||
|
||||
## Pitfalls
|
||||
Never bind 0.0.0.0. Port 15151 is the user's AB Download Manager. No secrets in the sender log.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# S024 — Hand-off flow and Nacre test
|
||||
|
||||
> Category 05 Connector · Model: Sonnet · Effort: medium · Depends on: S018, S023 · Phase: build · Human: no
|
||||
> 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
|
||||
|
|
@ -13,22 +13,18 @@ From a click in the browser to a running or continued download. FEATURES 4.4, 4.
|
|||
- ~/Projects/Nacre/tools/hidden.sh
|
||||
|
||||
## Steps
|
||||
- [x] Incoming links open the Add dialog filled in; a list opens batch; several in a row queue up without stealing focus twice
|
||||
- [x] 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 (partial: only via the Add dialog's own match logic for unfinished downloads; awaited tasks continue by themselves)
|
||||
- [x] Setting "add without asking" with type and size rules, off by default
|
||||
- [x] Connector page: state, port, test link button, sender log, steps for Nacre's custom manager
|
||||
- [x] Single instance by socket; a second launch hands over its arguments; `medlar:` scheme and `.metalink` in the desktop file (partial: .desktop not installed by any script)
|
||||
- [x] Test file `docs/tests/S024-handoff-flow.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S024: …`, push
|
||||
- [ ] 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 check -q -j 2 -p medlar` clean
|
||||
|
||||
## Checks for the test file (do not run now)
|
||||
- automatic tests in medlar (incoming) green
|
||||
- `nice cargo test -j 2 -p medlar --test incoming` green
|
||||
- hidden run log and shots looked at
|
||||
- hidden run: Nacre with a throwaway home, Medlar on a spare port, a click arrives and downloads (else replay its body and say so)
|
||||
- download, expire the link, send a fresh one, file completes identical
|
||||
|
||||
## Pitfalls
|
||||
Run Nacre only with a throwaway home. `medlar:` links come from web pages, so they always show the dialog.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# S025 — Video sites through yt-dlp
|
||||
|
||||
> Category 06 Media · Model: Sonnet · Effort: medium · Depends on: S012, S016 · Phase: build · Human: no
|
||||
> 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
|
||||
|
|
@ -12,21 +12,17 @@ FEATURES 6.1 with the system's yt-dlp (D-011).
|
|||
- `yt-dlp --help` (format, output, progress parts)
|
||||
|
||||
## Steps
|
||||
- [x] Finder and version check, missing and too-old states in plain words
|
||||
- [x] Probe to JSON: formats, audio, subtitles, chapters, playlists; cached and cancellable
|
||||
- [x] Add dialog page: quality choice with sizes, audio only, subtitles, playlist picker
|
||||
- [x] 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
|
||||
- [x] Errors mapped to kinds: private, removed, region, login, unsupported, too many requests; DRM refused
|
||||
- [x] Test file `docs/tests/S025-video-sites.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S025: …`, push
|
||||
- [ ] 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 check -q -j 2 -p medlar` clean
|
||||
|
||||
## Checks for the test file (do not run now)
|
||||
- automatic tests in medlar-core (ytdlp) green with the stub
|
||||
- `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
|
||||
- a stub yt-dlp that replays recorded outputs
|
||||
|
||||
## 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.
|
||||
|
|
|
|||
31
Plans/06 Media/S026-preview-convert.md
Normal file
31
Plans/06 Media/S026-preview-convert.md
Normal file
|
|
@ -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.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# S027 — Rules, clipboard, drag and drop, drop target
|
||||
|
||||
> Category 07 Library and tools · Model: Sonnet · Effort: medium · Depends on: S016, S018 · Phase: build · Human: no
|
||||
> 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
|
||||
|
|
@ -12,20 +12,16 @@ FEATURES 3.3, 3.4, 3.9.
|
|||
- ~/Projects/Nacre/Cargo.toml (arboard line)
|
||||
|
||||
## Steps
|
||||
- [x] Rules engine: conditions (extension, MIME, host, size, name pattern) to folder, queue, tags, priority, name template; order, test box, default rule set by type
|
||||
- [x] Name templates with safe placeholders and collision handling
|
||||
- [x] Clipboard watcher: off, ask, add; filters; ignores our own copies; privacy note; Wayland limits stated honestly
|
||||
- [x] Drop links, text, lists and `.metalink` on the window with a full-window drop state
|
||||
- [x] 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
|
||||
- [x] Rules and clipboard pages
|
||||
- [x] Test file `docs/tests/S027-rules-clipboard-drop.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S027: …`, push
|
||||
- [ ] 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 check -q -j 2 -p medlar` clean
|
||||
|
||||
## Checks for the test file (do not run now)
|
||||
- automatic tests in medlar-core (rules) and app tests green
|
||||
- `nice cargo test -j 2 -p medlar-core --test rules` and app tests green
|
||||
- hidden run drops a link and shots looked at
|
||||
|
||||
## Pitfalls
|
||||
|
|
|
|||
29
Plans/07 Library and tools/S028-archives.md
Normal file
29
Plans/07 Library and tools/S028-archives.md
Normal file
|
|
@ -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)
|
||||
—
|
||||
30
Plans/07 Library and tools/S029-grabber-explorer.md
Normal file
30
Plans/07 Library and tools/S029-grabber-explorer.md
Normal file
|
|
@ -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)
|
||||
—
|
||||
30
Plans/07 Library and tools/S030-stats-import.md
Normal file
30
Plans/07 Library and tools/S030-stats-import.md
Normal file
|
|
@ -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)
|
||||
—
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue