Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2caff86bf1 | |||
| 4f5d07d0fe | |||
| 6d56d3f58e | |||
| ff1b1a06a9 | |||
| 2d79478ffc | |||
| 3dc4b04abe | |||
| f560275327 | |||
| 62147e743a | |||
| 451f153925 | |||
| fa00568641 | |||
| 02d37f61a7 | |||
| 7d017c96ae | |||
| b057c86abc | |||
| 0d5b4a89d5 | |||
| e6b089b609 | |||
| 4d95d6d98c | |||
| 3500a4c25b | |||
| 9f38019b14 | |||
| fc7f04ac03 | |||
| ed2f7c67e5 | |||
| f6c8a5c57a | |||
| 63f0046965 | |||
| cfa789dce8 | |||
| 7d0587e424 | |||
| 7831445a6c | |||
| fdbb007f53 | |||
| 6f06b10792 | |||
| 8ffed89259 | |||
| a8c38788e1 | |||
| 51dc36f519 | |||
| e02f5244a2 | |||
| 391a5d3a7d | |||
| 7447e43cb9 | |||
| c7dc0af2bb | |||
| 930c3d58ac | |||
| 95658dfd8d | |||
| c5ab0c68e7 | |||
| e2ee4c082f | |||
| 77b242b644 | |||
| 37d38770ba | |||
| 1ec26bdb7f | |||
| 121df632bb | |||
| 4218e15a16 | |||
| 9a4c22d06e | |||
| ff450e5e38 | |||
| d70d25e1ed | |||
| b84c6f632d | |||
| 83a3c22974 | |||
| b42bb0bd9a | |||
| adaee67bc5 | |||
| c50048bf21 | |||
| 1e5d2e1109 | |||
| 53f09d3d84 | |||
| 4ac8cd9379 | |||
| 8e00dcd6cc | |||
| b01c24244f | |||
| f90076e76a | |||
| b8ebadb4ba | |||
| 7a4ba45c9d | |||
| fe012decc0 |
149 changed files with 9449 additions and 306 deletions
|
|
@ -69,6 +69,7 @@ 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 root@192.168.1.71 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.
|
||||
|
|
|
|||
155
Cargo.lock
generated
155
Cargo.lock
generated
|
|
@ -714,18 +714,42 @@ 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",
|
||||
"calloop 0.13.0",
|
||||
"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"
|
||||
|
|
@ -946,6 +970,15 @@ 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"
|
||||
|
|
@ -1370,6 +1403,7 @@ dependencies = [
|
|||
"profiling",
|
||||
"raw-window-handle",
|
||||
"serde",
|
||||
"smithay-clipboard",
|
||||
"web-time",
|
||||
"windows-sys 0.61.2",
|
||||
"winit",
|
||||
|
|
@ -2621,6 +2655,26 @@ 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"
|
||||
|
|
@ -2758,13 +2812,15 @@ checksum = "7ebb8d8732c6a6df3d8f032a82911cfc747e00efb95cc46e8d0acd5b5b88570c"
|
|||
|
||||
[[package]]
|
||||
name = "medlar"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"chrono",
|
||||
"dirs",
|
||||
"eframe",
|
||||
"egui_kittest",
|
||||
"image",
|
||||
"ksni",
|
||||
"log",
|
||||
"medlar-cli",
|
||||
"medlar-core",
|
||||
|
|
@ -2776,18 +2832,19 @@ dependencies = [
|
|||
"tempfile",
|
||||
"tokio",
|
||||
"url",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "medlar-cli"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"medlar-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "medlar-core"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"arc-swap",
|
||||
|
|
@ -2831,7 +2888,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "medlar-testserver"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"md-5",
|
||||
"rcgen",
|
||||
|
|
@ -3605,6 +3662,12 @@ 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"
|
||||
|
|
@ -4900,8 +4963,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"calloop",
|
||||
"calloop-wayland-source",
|
||||
"calloop 0.13.0",
|
||||
"calloop-wayland-source 0.3.0",
|
||||
"cursor-icon",
|
||||
"libc",
|
||||
"log",
|
||||
|
|
@ -4918,6 +4981,44 @@ 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"
|
||||
|
|
@ -5130,6 +5231,15 @@ 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"
|
||||
|
|
@ -5417,6 +5527,7 @@ 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",
|
||||
|
|
@ -5784,6 +5895,32 @@ 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"
|
||||
|
|
@ -6264,7 +6401,7 @@ dependencies = [
|
|||
"bitflags 2.13.2",
|
||||
"block2 0.5.1",
|
||||
"bytemuck",
|
||||
"calloop",
|
||||
"calloop 0.13.0",
|
||||
"cfg_aliases",
|
||||
"concurrent-queue",
|
||||
"core-foundation 0.9.4",
|
||||
|
|
@ -6285,7 +6422,7 @@ dependencies = [
|
|||
"raw-window-handle",
|
||||
"redox_syscall 0.4.1",
|
||||
"rustix 0.38.44",
|
||||
"smithay-client-toolkit",
|
||||
"smithay-client-toolkit 0.19.2",
|
||||
"smol_str",
|
||||
"tracing",
|
||||
"unicode-segmentation",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ members = ["crates/*"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@ A browser hands links to 127.0.0.1:17616; nothing else can abuse it. FEATURES 4.
|
|||
- 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
|
||||
- [ ] 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
|
||||
- [ ] Test file `docs/tests/S023-port-server.md`, with the checks below
|
||||
- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S023: …`, push
|
||||
- [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
|
||||
|
||||
## End criteria
|
||||
`nice cargo check -q -j 2 -p medlar` clean
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ From a click in the browser to a running or continued download. FEATURES 4.4, 4.
|
|||
- ~/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
|
||||
- [ ] Test file `docs/tests/S024-handoff-flow.md`, with the checks below
|
||||
- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S024: …`, push
|
||||
- [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
|
||||
|
||||
## End criteria
|
||||
`nice cargo check -q -j 2 -p medlar` clean
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ FEATURES 6.1 with the system's yt-dlp (D-011).
|
|||
- `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
|
||||
- [ ] Test file `docs/tests/S025-video-sites.md`, with the checks below
|
||||
- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S025: …`, push
|
||||
- [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
|
||||
|
||||
## End criteria
|
||||
`nice cargo check -q -j 2 -p medlar` clean
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ FEATURES 3.3, 3.4, 3.9.
|
|||
- ~/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
|
||||
- [ ] Test file `docs/tests/S027-rules-clipboard-drop.md`, with the checks below
|
||||
- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S027: …`, push
|
||||
- [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
|
||||
|
||||
## End criteria
|
||||
`nice cargo check -q -j 2 -p medlar` clean
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ FEATURES 8.1, 8.4.
|
|||
- 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
|
||||
- [ ] Test file `docs/tests/S033-tray-notify.md`, with the checks below
|
||||
- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S033: …`, push
|
||||
- [x] Tray icon with progress ring and speed tooltip; menu: modes, pause all, resume all, add, show, quit
|
||||
- [x] Close to tray, start minimised, autostart file; works without a tray host
|
||||
- [x] Notifications: done, failed, needs login, all done, with actions (open, show folder, continue, retry); grouped, quiet hours
|
||||
- [x] Launcher progress through the Unity D-Bus signal
|
||||
- [x] Desktop file, metainfo, MIME and scheme entries checked by their validators when present
|
||||
- [x] Test file `docs/tests/S033-tray-notify.md`, with the checks below
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S033: …`, push
|
||||
|
||||
## End criteria
|
||||
`nice cargo check -q -j 2 -p medlar` clean
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ One look and feel, and motion that earns its place (D-008, FEATURES 9.7). Was S0
|
|||
- crates/app/src/{motion,tokens}*, then the views by `rg` hits only
|
||||
|
||||
## Steps
|
||||
- [ ] One list of faults across all screens, by leverage: motion, edges, grid, radii, sizes, states, copy, focus; drop what is by design
|
||||
- [ ] Fix every high and medium motion fault
|
||||
- [ ] Fix every high and medium look fault; no literal colours or radii outside tokens
|
||||
- [ ] Hide every setting, menu entry and tab of a feature that is Later (PLAN.md), so nothing on screen does nothing
|
||||
- [ ] Copy, empty states, AccessKit names, focus and 32 px hit targets
|
||||
- [ ] Test file `docs/tests/S034-motion-audit.md`: each fixed motion with normal, reduced and off; keyboard only; sizes 480, 900, 1600, 3440; light, dark, AMOLED; long names and big numbers
|
||||
- [ ] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S034: …`, push
|
||||
- [x] One list of faults across all screens, by leverage: motion, edges, grid, radii, sizes, states, copy, focus; drop what is by design
|
||||
- [x] Fix every high and medium motion fault
|
||||
- [x] Fix every high and medium look fault; no literal colours or radii outside tokens
|
||||
- [x] Hide every setting, menu entry and tab of a feature that is Later (PLAN.md), so nothing on screen does nothing
|
||||
- [x] Copy, empty states, AccessKit names, focus and 32 px hit targets
|
||||
- [x] Test file `docs/tests/S034-motion-audit.md`: each fixed motion with normal, reduced and off; keyboard only; sizes 480, 900, 1600, 3440; light, dark, AMOLED; long names and big numbers
|
||||
- [x] `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S034: …`, push
|
||||
|
||||
## End criteria
|
||||
`nice cargo check -q -j 2 -p medlar` clean
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ Version 1 is solid, light and complete. Was S037 and S038.
|
|||
- CLAUDE.md §4, docs/CONNECTOR.md, docs/TEST-REPORT.md
|
||||
|
||||
## Steps
|
||||
- [ ] Security review of connector, names, child processes, Metalink and stream parsers, secrets on disk and in logs; fix with one regression test each
|
||||
- [ ] Short fuzz tests of the parsers: headers, Content-Disposition, HLS, DASH, Metalink, listing, patterns
|
||||
- [ ] Start time, idle CPU, memory with 10,000 tasks, frame cost with 50 active, loopback speed against curl; fix what stands out, record before and after
|
||||
- [ ] Soak script with random faults, pauses, kills and limit changes: 20 minutes, once; every file checked
|
||||
- [ ] Journeys in one hidden run: first start to finished download; pause, restart, continue; expired link continued; queue with schedule; store of an early commit still opens
|
||||
- [ ] docs/FEATURES-CHECK.md: one row per version 1 id with proof and result; Results in `docs/tests` count as proof; small gaps fixed here
|
||||
- [ ] `docs/TEST-REPORT.md` line, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S037: …`, push
|
||||
- [x] Security review of connector, names, child processes, Metalink and stream parsers, secrets on disk and in logs; fix with one regression test each
|
||||
- [x] Short fuzz tests of the parsers: headers, Content-Disposition, HLS, DASH, Metalink, listing, patterns
|
||||
- [x] Start time, idle CPU, memory with 10,000 tasks, frame cost with 50 active, loopback speed against curl; fix what stands out, record before and after
|
||||
- [x] Soak script with random faults, pauses, kills and limit changes: 20 minutes, once; every file checked
|
||||
- [x] Journeys in one hidden run: first start to finished download; pause, restart, continue; expired link continued; queue with schedule; store of an early commit still opens (engine level and S044 port tests; hidden UI journey not repeated)
|
||||
- [x] docs/FEATURES-CHECK.md: one row per version 1 id with proof and result; Results in `docs/tests` count as proof; small gaps fixed here
|
||||
- [x] `docs/TEST-REPORT.md` line, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S037: …`, push
|
||||
|
||||
## End criteria
|
||||
- `nice cargo test -j 2` green, except listed known bugs
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ Builds that run on older distros without downloads (D-011), a clear repo page an
|
|||
- docs/FEATURES-CHECK.md, docs/CONNECTOR.md
|
||||
|
||||
## Steps
|
||||
- [ ] tar.gz with install and uninstall scripts for the user's home, desktop file, icons; AppImage with the appimagetool in ~/Projects/Mulberry/dist (copied to a temp folder), portable-mode support
|
||||
- [ ] glibc and library needs listed, lowest supported glibc stated; system libraries not bundled
|
||||
- [ ] Smoke test of both builds: launch hidden, download from the test server, status file and shots, looked at; yt-dlp and ffmpeg missing on PATH
|
||||
- [ ] README with shots from real runs, install, connector steps, limits and known bugs; no hype
|
||||
- [ ] Release notes in docs/releases/0.1.0.md; version set everywhere; checksums made, nothing in releases/ yet
|
||||
- [ ] 🧑 Version, contents, known bugs and the size of bundling yt-dlp and ffmpeg told to the user; wait for the yes
|
||||
- [ ] After the yes: files to releases/v0.1.0/, notes with hub-release, page checked
|
||||
- [ ] docs/STATUS.md, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S039: …`, push
|
||||
- [x] tar.gz with install and uninstall scripts for the user's home, desktop file, icons; AppImage with the appimagetool in ~/Projects/Mulberry/dist (copied to a temp folder), portable-mode support
|
||||
- [x] glibc and library needs listed, lowest supported glibc stated; system libraries not bundled
|
||||
- [x] Smoke test of both builds: launch hidden, download from the test server, status file and shots, looked at; yt-dlp and ffmpeg missing on PATH
|
||||
- [x] README with shots from real runs, install, connector steps, limits and known bugs; no hype
|
||||
- [x] Release notes in docs/releases/0.1.0.md; version set everywhere; checksums made, nothing in releases/ yet
|
||||
- [x] 🧑 Version, contents, known bugs and the size of bundling yt-dlp and ffmpeg told to the user; wait for the yes
|
||||
- [x] After the yes: files to releases/v0.1.0/, notes with hub-release, page checked
|
||||
- [x] docs/STATUS.md, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S039: …`, push
|
||||
|
||||
## End criteria
|
||||
- both builds pass the smoke test
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ Run the checks of the test files of S017, S021, S022, S023, S024, fix what fails
|
|||
- CLAUDE.md §4 and §5
|
||||
|
||||
## Steps
|
||||
- [ ] Build everything, run the existing suite once with a log file, start the app hidden; fix what is broken before anything else
|
||||
- [ ] Doubts first: read the code behind each, add a check or write why it is fine
|
||||
- [ ] Write the tests for all HIGH and MED checks in one go, sharing fixtures and the testserver
|
||||
- [ ] Run them once, all together, log to a file; read only the failures
|
||||
- [ ] Fix all causes in one go; rerun only what failed; three rounds at most, then `KNOWN BUG` with the cause
|
||||
- [ ] Screen checks: one contact sheet, faults fixed in one go, one more sheet
|
||||
- [ ] Results filled in, `docs/TEST-REPORT.md` line, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S041: …`, push
|
||||
- [x] Build everything, run the existing suite once with a log file, start the app hidden; fix what is broken before anything else
|
||||
- [x] Doubts first: read the code behind each, add a check or write why it is fine
|
||||
- [x] Write the tests for all HIGH and MED checks in one go, sharing fixtures and the testserver
|
||||
- [x] Run them once, all together, log to a file; read only the failures
|
||||
- [x] Fix all causes in one go; rerun only what failed; three rounds at most, then `KNOWN BUG` with the cause
|
||||
- [x] Screen checks: one contact sheet, faults fixed in one go, one more sheet (partly: no scenes exist for details, queues, week, countdown or handoff; only set-browser and add-continue sheets were seen)
|
||||
- [x] Results filled in, `docs/TEST-REPORT.md` line, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S041: …`, push
|
||||
|
||||
## End criteria
|
||||
- the tests written here pass, except listed known bugs
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ Run the checks of the test files of S025, S027, S033, S034, fix what fails, fill
|
|||
- CLAUDE.md §4 and §5
|
||||
|
||||
## Steps
|
||||
- [ ] Doubts first: read the code behind each, add a check or write why it is fine
|
||||
- [ ] Write the tests for all HIGH and MED checks in one go, sharing fixtures and the testserver
|
||||
- [ ] Run them once, all together, log to a file; read only the failures
|
||||
- [ ] Fix all causes in one go; rerun only what failed; three rounds at most, then `KNOWN BUG` with the cause
|
||||
- [ ] Screen checks: one contact sheet, faults fixed in one go, one more sheet
|
||||
- [ ] Results filled in, `docs/TEST-REPORT.md` line, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S043: …`, push
|
||||
- [x] Doubts first: read the code behind each, add a check or write why it is fine
|
||||
- [x] Write the tests for all HIGH and MED checks in one go, sharing fixtures and the testserver
|
||||
- [x] Run them once, all together, log to a file; read only the failures
|
||||
- [x] Fix all causes in one go; rerun only what failed; three rounds at most, then `KNOWN BUG` with the cause
|
||||
- [x] Screen checks: one contact sheet, faults fixed in one go, one more sheet
|
||||
- [x] Results filled in, `docs/TEST-REPORT.md` line, `docs/PROGRESS.md` entry, tick `Plans/INDEX.md`, commit `S043: …`, push
|
||||
|
||||
## End criteria
|
||||
- the tests written here pass, except listed known bugs
|
||||
|
|
|
|||
29
Plans/09 Test and release/S044-fix-open-high.md
Normal file
29
Plans/09 Test and release/S044-fix-open-high.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# S044 — Close the open HIGH checks and wire the video page
|
||||
|
||||
> Category 09 Test and release · Model: Opus (gate fix: open HIGH checks) · Effort: medium · Depends on: S037 · Phase: test · Human: no
|
||||
> Files touched: crates/**, docs/tests/**, docs/TEST-REPORT.md, docs/FEATURES-CHECK.md
|
||||
|
||||
## Goal
|
||||
The package gate (S039) needs no open HIGH check. After S037 these HIGH checks are still not run or failing; give each a harness (unit, integration or kittest, hidden run only where nothing else works), run it, fix what fails. Also make the video feature (FEATURES 6.1) usable from the app.
|
||||
|
||||
## Read
|
||||
- docs/TEST-REPORT.md (S037 line), docs/tests/S037-whole-app.md
|
||||
- the rows below in their test files; code only where a check needs it
|
||||
- CLAUDE.md §4 and §5
|
||||
|
||||
## Steps
|
||||
- [x] S017 5, 6, 7, 8, 15, 16 (details panel: removed task, error box, checksum, file gone, hidden headers, checksum field): kittest or integration
|
||||
- [x] S021 19 (fake `Power` records the Fire(Shutdown) call; Logind never used)
|
||||
- [x] S024 3, 8, 9, 10, 15 (handoff: medlar: link shows dialog, Continue offered, expired link continued or refused, hash identical) against testserver; S024 14 with Nacre's body replayed by curl if running Nacre hidden fails
|
||||
- [x] S027 8 and 9 / S037 16 (clipboard Ask): find the cause of no Add window; fix, or prove it is the nested session's clipboard with a test of the watcher logic and mark it KNOWN BUG LOW with the proof
|
||||
- [x] Video: show `video::Page` in the Add dialog for video links and run yt-dlp tasks through the manager (pause, resume, error kinds); stub yt-dlp tests; S025 16
|
||||
- [x] S037 open boxes: frame cost with 50 active, journeys pause/restart/continue, expired link, queue with schedule, old store; record results
|
||||
- [x] Full workspace suite once at the end (absolute TMPDIR); fix failures
|
||||
- [x] Results filled in, `docs/TEST-REPORT.md` line, `docs/PROGRESS.md` entry, tick S037 boxes now done and its INDEX line, tick this plan's INDEX line, commit `S044: …`, push
|
||||
|
||||
## End criteria
|
||||
- no HIGH row in docs/tests left as "not run" or failing, except a KNOWN BUG with proof that it is outside the app
|
||||
- workspace suite green
|
||||
|
||||
## Pitfalls
|
||||
Never weaken a test to pass. Fake D-Bus and logind only, testserver on loopback only, throwaway homes only, never download real video. Absolute `TMPDIR`. Release build and tests never at once.
|
||||
26
Plans/10 Distribution/S045-installer-arch.md
Normal file
26
Plans/10 Distribution/S045-installer-arch.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# S045 — installer.sh and Arch package
|
||||
|
||||
> Category 10 Distribution · Model: Sonnet · Effort: medium · Depends on: S039 · Phase: test · Human: no
|
||||
> Files touched: installer.sh, packaging/arch/**, tools/package.sh, README.md, docs/tests/S045-installer-arch.md
|
||||
|
||||
## Goal
|
||||
The user asked for an installer script and an Arch package for 0.1.0. Debian and Fedora packages wait for a build on an older host (the binary needs glibc 2.44); not in this plan.
|
||||
|
||||
## Read
|
||||
- tools/package.sh, the tar.gz's install.sh and uninstall.sh, assets/medlar.desktop, assets/medlar.metainfo.xml, README install section
|
||||
- the user's global release rules (CLAUDE.md is loaded): file names `<App>-<version>-<platform>.<ext>`, no scripts or .md in releases/
|
||||
|
||||
## Steps
|
||||
- [x] `installer.sh` at the repo root (POSIX sh, shellcheck-clean if shellcheck is present): installs from a given tar.gz or AppImage, or from one found next to it; `--user` (default, ~/.local) or `--system` (/usr/local, sudo only for the copy); desktop file, icons, metainfo, `medlar:` scheme handler; `--uninstall` (and `--purge` for data); refuses when glibc is older than 2.44 with a plain message; verifies SHA256SUMS when present. Optional `--url` download is allowed but the repo is private, so the default path is a local file
|
||||
- [x] `packaging/arch/PKGBUILD` (+ `.SRCINFO`): `medlar-bin` from the release tar.gz with sha256sums, depends listed from the binary's needs (glibc, libxkbcommon, wayland, etc.), optdepends yt-dlp and ffmpeg, desktop file, icons, metainfo, license
|
||||
- [x] Build the package with `makepkg` from the local tar.gz (no network: point `source` at the file in dist/ for the build); `namcap` if present; inspect contents with `bsdtar -tf`
|
||||
- [x] Test, with throwaway roots only: installer.sh `--user` into a temp HOME, `--system` with `DESTDIR`/prefix into a temp dir, uninstall leaves nothing; package contents and file list checked; do NOT `pacman -U` on the real system
|
||||
- [x] `tools/package.sh` also makes the Arch package as `dist/Medlar-0.1.0-arch-x86_64.pkg.tar.zst` and adds it to `dist/SHA256SUMS-0.1.0`; nothing into releases/ (the orchestrator adds it)
|
||||
- [x] README: install sections for installer.sh and Arch; test file `docs/tests/S045-installer-arch.md` with Results; PROGRESS entry, tick INDEX, commit `S045: …`, `git push origin HEAD`
|
||||
|
||||
## End criteria
|
||||
- installer installs and uninstalls cleanly in a throwaway home and prefix
|
||||
- the Arch package builds offline and lists the right files
|
||||
|
||||
## Pitfalls
|
||||
Never touch the real ~/.local, /usr or pacman database. No downloads (D-011). Never put scripts in releases/.
|
||||
29
Plans/10 Distribution/S046-fixes-0.1.1.md
Normal file
29
Plans/10 Distribution/S046-fixes-0.1.1.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# S046 — 0.1.1: names from the server, raise on arrival, copy in fields
|
||||
|
||||
> Category 10 Distribution · Model: Sonnet · Effort: medium · Depends on: S045 · Phase: test · Human: 🧑 yes before release
|
||||
> Files touched: crates/core/src/http/name.rs and its callers, crates/core/src/connector/**, crates/app/src/views/{incoming,add}/**, crates/app/src/keys.rs, crates/app/src/app.rs, version files, docs/releases/0.1.1.md, docs/tests/S046-fixes-0.1.1.md
|
||||
|
||||
## Goal
|
||||
Three bugs the user found with 0.1.0 (Nacre on a real site):
|
||||
1. **Name**: the browser hands over a provisional name (`output.bin`) at click time; the real name (archive) only comes with the server's reply (Content-Disposition, or the final link after redirects). Medlar keeps the sender's name, so the file stays `output.bin`.
|
||||
2. **No raise**: a pushed download does not bring Medlar forward. `incoming.rs` sends `ViewportCommand::Focus` only, which Wayland (niri) ignores without an activation token, and does nothing when the window is hidden to the tray.
|
||||
3. **Copy in fields**: in Settings (and every text field) Ctrl+C does not copy: `keys::pressed` lets the list's Copy shortcut (Ctrl+C) and Select all (Ctrl+A) eat the events while a text field has focus (`taken()` covers V, X, Z only).
|
||||
|
||||
## Read
|
||||
- crates/core/src/http/name.rs (`pick`), where a task's name is set from a sender or the Add dialog and where the first reply is handled (rg `pick(`)
|
||||
- crates/app/src/views/incoming.rs (`tick`, `ask`), app.rs lines ~255-330 (show/hide), crates/app/src/keys.rs (`pressed`, `taken`, `fits`)
|
||||
- docs/CONNECTOR.md (`filename` field)
|
||||
|
||||
## Steps
|
||||
- [x] Name: a name from a sender (connector `filename`, or the Add dialog when the user did not type it) is a hint. On the first reply, when the hint is generic (no extension, or an extension like bin, php, asp, aspx, cgi, html, htm, download, or a known placeholder such as `output.bin`, `download`, `file`) and the reply gives a name (Content-Disposition, else the final link with a file extension), use the reply's name, made safe as today, before any file is created; a name the user typed always wins; collisions handled as today (never overwrite). The Add dialog's probe updates the shown name the same way while the user has not edited it. Unit tests in name.rs and an engine test against testserver (provisional name + Content-Disposition, and a redirect to a named link)
|
||||
- [x] Raise: on an arrival that shows the Add window or adds a download, if the main window is hidden show it (`Visible(true)`, `Minimized(false)`), then `Focus` and `RequestUserAttention(Critical)` (urgency where focus is refused); same for second-instance hand-over; clear the attention when the window gets focus. A kittest that records the viewport commands
|
||||
- [x] Copy: while a text field has focus, Ctrl+C, Ctrl+A (and Ctrl+X, Ctrl+V, Ctrl+Z as now) go to the field, not to list shortcuts; settings values that are read-only text (paths, versions, the port, the token) are selectable or have a copy button where egui allows. Unit test for `pressed` with a focused field
|
||||
- [x] Full workspace suite once (absolute TMPDIR), then release build; hidden smoke test: POST a link with `filename: output.bin` to a testserver URL that answers with Content-Disposition `game.zip`: Add window shows and the file is `game.zip`; window raised in the grab
|
||||
- [x] Version 0.1.1 everywhere (Cargo, metainfo, PKGBUILD, .SRCINFO); `tools/package.sh` builds tar.gz, AppImage, Arch package and `SHA256SUMS-0.1.1` in dist/; `docs/releases/0.1.1.md`; nothing into releases/
|
||||
- [x] Test file `docs/tests/S046-fixes-0.1.1.md` with Results, PROGRESS entry, tick INDEX, commit `S046: …`, `git push origin HEAD`
|
||||
|
||||
## End criteria
|
||||
- the three bugs have passing regression tests; suite green; builds smoke-tested
|
||||
|
||||
## Pitfalls
|
||||
File names from servers are hostile: same `safe` rules as today. Never rename over an existing file. Never contact the real site; testserver on loopback only. Release only after the user's yes.
|
||||
30
Plans/10 Distribution/S047-close-to-tray-wayland.md
Normal file
30
Plans/10 Distribution/S047-close-to-tray-wayland.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# S047 — Close to tray that works on Wayland
|
||||
|
||||
> Category 10 Distribution · Model: Opus (ownership refactor of the app's lifetime) · Effort: medium · Depends on: S046 · Phase: test · Human: 🧑 yes before release
|
||||
> Files touched: crates/app/src/{main,lib,app,shell,tray,instance}.rs, crates/app/src/views/incoming.rs, docs/tests/S047-close-to-tray.md, docs/releases/0.1.1.md
|
||||
|
||||
## Goal
|
||||
The user closes the window with niri's close (Win+Q) and nothing happens. Cause (`app.rs` `shell()`): on close Medlar sends `CancelClose` then `Visible(false)`, but winit cannot hide a window on Wayland, so the window just stays. Without a tray host the close works; with one it is swallowed.
|
||||
|
||||
Wanted: closing hides Medlar to the tray (downloads, port, tray keep going) when the tray is on and a host exists; otherwise it quits cleanly. Show from the tray, a second start, or a browser hand-off brings a window back.
|
||||
|
||||
## Approach (check against eframe 0.37 docs before coding)
|
||||
eframe with `NativeOptions::run_and_return = true` returns from `run_native` when the window closes and reuses its thread-local event loop on the next `run_native` call (winit `run_app_on_demand`). So:
|
||||
- Move what must outlive a window out of `App` into a `Core`/`Session` owned by `main`: engine/manager bridge, connector `Inbox` source, tray/shell, notifications, launcher, instance socket, settings store. The `App` borrows or holds an `Arc` to it.
|
||||
- On close with tray: let the close happen (no `CancelClose`); `run_native` returns; `main` waits on the tray/instance/connector for "show" (or "quit"), then calls `run_native` again with the same session. Window size and position come back from `window.ron`.
|
||||
- Without a tray host, or tray off: close quits as today (pause and save, then exit).
|
||||
- X11: same path (no special `Visible(false)` case left), so one behaviour everywhere.
|
||||
- `--minimised` at start: start without a window when a tray host exists (wait for "show"), else open normally.
|
||||
- Arrivals while hidden (S046 raise): reopen the window, then the Add dialog.
|
||||
If `run_and_return` cannot reopen on this eframe/winit, stop and report with the error; do not build a second process design without asking.
|
||||
|
||||
## Steps
|
||||
- [x] Read eframe 0.37 `run_and_return` / `run_native` docs and source in ~/.cargo/registry; confirm reopen works with a 20-line spike in a test or example
|
||||
- [x] Session refactor: long-lived parts out of `App`; nothing else changes behaviour
|
||||
- [x] Close/show/quit loop in `main` as above; tray Show and Quit, second instance, connector arrival, `--minimised`
|
||||
- [x] Tests: unit for the decide-on-close logic (tray on/off, host yes/no); hidden nested niri run with a fake StatusNotifierWatcher (bus.rs from S043) on a spare port and throwaway home: send close (niri msg action close-window), process stays, downloads keep going (testserver, throttled), port answers; tray Show reopens; POST to the port reopens with the Add window; Quit ends with tasks saved; without the fake tray, close quits
|
||||
- [x] Full workspace suite once, release build, smoke as S046; add to docs/releases/0.1.1.md; rebuild packages via tools/package.sh (0.1.1), nothing into releases/
|
||||
- [x] Test file with Results, PROGRESS, tick INDEX, commit `S047: …`, push
|
||||
|
||||
## Pitfalls
|
||||
The user's Medlar 0.1.0 is running on 17616: never stop it; spare port, throwaway home. Never weaken a test. Idle (hidden) draws no frames and uses ~0 CPU.
|
||||
30
Plans/10 Distribution/S048-server-farms.md
Normal file
30
Plans/10 Distribution/S048-server-farms.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# S048 — Servers behind a load balancer with different validators
|
||||
|
||||
> Category 10 Distribution · Model: Opus (engine correctness, never mix two files) · Effort: medium · Depends on: S046 · Phase: test · Human: 🧑 yes before release
|
||||
> Files touched: crates/core/src/http/{mod,fetch,download,parts}.rs, crates/testserver/**, crates/core/tests/**, docs/tests/S048-server-farms.md, docs/releases/0.1.1.md
|
||||
|
||||
## Goal
|
||||
Downloads from romsgames.net (and any site with a server farm) fail at once with "File changed on the server". Seen on 2026-11-26 with four 1-byte range requests to the same link (`static.romsgames.net/.../output.bin?token`):
|
||||
|
||||
| range | Server | Last-Modified | ETag | Content-Range total |
|
||||
|---|---|---|---|---|
|
||||
| 0-0 | nginx/1.22.0 | Mon, 21 Jul 2025 20:20:29 | W/"bd6dcd82-1982ea51dc7" | 3178089858 |
|
||||
| 1000000-1000000 | nginx/1.24.0 (Ubuntu) | Sun, 05 Jan 2020 05:35:27 | W/"bd6dcd82-16f743377f5" | 3178089858 |
|
||||
| 0-0 | nginx/1.24.0 (Ubuntu) | Mon, 21 Jul 2025 20:20:29 | W/"bd6dcd82-1982ea51dc7" | 3178089858 |
|
||||
| 2000000000-… | nginx/1.24.0 (Ubuntu) | Mon, 21 Jul 2025 20:20:29 | W/"bd6dcd82-1982ea51dc7" | 3178089858 |
|
||||
|
||||
All 206, same size, same type; nodes differ only in mtime (nginx ETag = `"<size hex>-<mtime hex>"`). `Validators::same_file` (http/mod.rs) and `send_range` (fetch.rs ~159) call that `Changed`. The user's task 8 failed after 32 KB.
|
||||
|
||||
## Rule (never mix two files)
|
||||
When a reply's validators differ from the known ones but the total size is equal: do not fail. Check bytes instead: compare a sample of bytes already on disk with the same range from this reply (the existing `same_bytes` path in fetch.rs ~205; make the sample big enough, e.g. 64 KiB or what is there) before writing. Bytes equal → mark the task's link as a *farm* (validators unreliable): from then on compare size + byte samples only, send no `If-Range` (a Last-Modified `If-Range` makes other nodes answer 200 full), keep the first validators for display. Bytes differ, or size differs → `Changed` as today. A 200 to a range on a farm is `RangeIgnored`, not `Changed`. Also nginx-style ETags that differ only after the size part count as "maybe the same file" (still checked by bytes).
|
||||
|
||||
## Steps
|
||||
- [x] testserver: a farm mode (several "nodes" with the same bytes but different Last-Modified/ETag picked per request, nginx-style weak ETags), and a liar mode (same size, different bytes) — docs in the lib.rs header
|
||||
- [x] Engine: the rule above, in probe, parts and resume; the farm flag stored with the task (store migration) so a restart keeps it; parts on a farm still run in parallel
|
||||
- [x] Tests: farm download with 4 parts completes with the right hash; pause/restart/resume on a farm; liar same-size-different-bytes still fails with Changed and keeps what is there; If-Range not sent on a farm; unit tests for the ETag comparison
|
||||
- [x] Full workspace suite once (absolute TMPDIR), release build, hidden smoke against testserver farm on a spare port (the user's Medlar 0.1.1 runs on 17616: never stop it)
|
||||
- [x] `tools/package.sh` (0.1.1, rebuilds dist/), copy the four files to `~/Projects/Medlar/dist/` as well; notes in docs/releases/0.1.1.md
|
||||
- [x] Test file with Results, PROGRESS, tick INDEX, commit `S048: …`, `git push origin HEAD`
|
||||
|
||||
## Pitfalls
|
||||
Never contact romsgames.net or any real site in tests; testserver only. Never weaken the "two files are never mixed" guarantee.
|
||||
15
Plans/10 Distribution/S049-niri-focus.md
Normal file
15
Plans/10 Distribution/S049-niri-focus.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# S049 — Take focus on niri when a download arrives
|
||||
|
||||
> Category 10 Distribution · Model: Sonnet · Effort: medium · Depends on: S046, S047 · Phase: test · Human: no
|
||||
> Files touched: crates/app/src/views/incoming.rs, crates/app/src/{desktop,shell}.rs or a new `niri.rs`, docs/tests/S049-niri-focus.md
|
||||
|
||||
## Goal
|
||||
On niri, `Focus` and `RequestUserAttention` from an app only mark the window urgent (no activation token from a user input), so a download pushed from the browser does not bring Medlar forward. niri has no per-app "allow activation" window rule (the user's `~/.config/niri/caelestia-windowrules.kdl` now has a Medlar rule with `open-focused true`, which only helps for new windows). The global `debug { honor-xdg-activation-with-invalid-serial }` would let every app steal focus: not wanted.
|
||||
|
||||
## Steps
|
||||
- [x] When `NIRI_SOCKET` is set and an arrival raises the window (S046 path), ask niri over its IPC socket (JSON, `{"Action":{"FocusWindow":{"id":N}}}`; window id from `"Windows"` matched by our PID and app id `medlar`) to focus our window; no shell, no `niri` binary needed; on any error fall back to today's urgency. A setting "Bring Medlar forward when a download arrives" (default on) in Behaviour
|
||||
- [x] Unit test with a fake socket that records the request; hidden nested niri run: POST a link, focused window id equals Medlar's (spare port, throwaway home)
|
||||
- [x] Results, PROGRESS, INDEX, commit `S049: …`, push
|
||||
|
||||
## Pitfalls
|
||||
Read the IPC format of niri 26.04 from its docs or `niri msg --json` output before coding. Never touch the user's niri config.
|
||||
17
Plans/10 Distribution/S050-bug-hunt.md
Normal file
17
Plans/10 Distribution/S050-bug-hunt.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# S050 — Bug hunt, known items first
|
||||
|
||||
> Category 10 Distribution · Model: Sonnet · Effort: medium · Depends on: S049 · Phase: test · Human: no
|
||||
> Files touched: crates/**, docs/tests/S050-bug-hunt.md
|
||||
|
||||
## Goal
|
||||
Fix the bugs already found, smallest and most visible first; commit after each so a cut-off loses nothing. Weekly usage is nearly gone: stop cleanly when told.
|
||||
|
||||
## Steps
|
||||
- [ ] Snail button covers the last row's pause icon at 480x360: the list needs bottom padding equal to the button plus its margin (shots scene at 480x360 to check)
|
||||
- [ ] Idle CPU 11 % with the Add dialog open, and 160 % right after a download ends: find what keeps repainting (motion running without change, a spinner, a timer) and stop it; idle must draw no frames
|
||||
- [ ] Tray tooltip speed uses the same smoothed, held value as the big number
|
||||
- [ ] `control::connector_flood_15` fails (40 ok, 0 busy): read the busy limit in the connector, fix the cause or the test if the test is wrong (never weaken a real guard)
|
||||
- [ ] Each fix gets a test where feasible; one full suite run at the end; Results in `docs/tests/S050-bug-hunt.md`, PROGRESS, INDEX, commit `S050: …`, push
|
||||
|
||||
## Pitfalls
|
||||
Spare port and throwaway home; absolute TMPDIR under target/tmp. No packages, no releases.
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue