diff --git a/Cargo.lock b/Cargo.lock index 21357a1..dd8684d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2787,7 +2787,7 @@ checksum = "7ebb8d8732c6a6df3d8f032a82911cfc747e00efb95cc46e8d0acd5b5b88570c" [[package]] name = "medlar" -version = "0.1.0" +version = "0.1.1" dependencies = [ "arboard", "chrono", @@ -2812,14 +2812,14 @@ dependencies = [ [[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", @@ -2863,7 +2863,7 @@ dependencies = [ [[package]] name = "medlar-testserver" -version = "0.1.0" +version = "0.1.1" dependencies = [ "md-5", "rcgen", diff --git a/Cargo.toml b/Cargo.toml index bc91c09..f438da7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "3" [workspace.package] -version = "0.1.0" +version = "0.1.1" edition = "2024" license = "MIT" diff --git a/README.md b/README.md index 7974928..672c6ae 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Medlar A download manager for Linux, written in Rust with egui. Downloads are split into dynamic parts and can be paused, resumed -and continued from a new link. The interface follows Material You (M3 Expressive). Version 0.1.0 is the first release. +and continued from a new link. The interface follows Material You (M3 Expressive). Version 0.1.1 fixes names, copy and speed, and adds a snail button. ![Main window after a finished download](docs/img/main.png) ![Add dialog](docs/img/add.png) @@ -23,21 +23,21 @@ The full list and its state: [docs/FEATURES.md](docs/FEATURES.md) and [docs/FEAT Needs a Linux x86_64 desktop with Wayland or X11, and glibc 2.44 or newer (see "Requirements"). -**AppImage:** `chmod +x Medlar-0.1.0-x86_64.AppImage && ./Medlar-0.1.0-x86_64.AppImage` +**AppImage:** `chmod +x Medlar-0.1.1-x86_64.AppImage && ./Medlar-0.1.1-x86_64.AppImage` -**tar.gz:** `tar xzf Medlar-0.1.0-Linux-x86_64.tar.gz && cd medlar-0.1.0 && ./install.sh` +**tar.gz:** `tar xzf Medlar-0.1.1-Linux-x86_64.tar.gz && cd medlar-0.1.1 && ./install.sh` installs into `~/.local` (binary, desktop file, icon; no root). `./uninstall.sh` removes it; `./uninstall.sh --purge` also removes settings and the download list (downloaded files stay). -**installer.sh:** `./installer.sh Medlar-0.1.0-Linux-x86_64.tar.gz` (or with no file: it uses a tar.gz or AppImage beside it). +**installer.sh:** `./installer.sh Medlar-0.1.1-Linux-x86_64.tar.gz` (or with no file: it uses a tar.gz or AppImage beside it). `--user` (default, `~/.local`) or `--system` (`/usr/local`, sudo only for the copy); `--prefix DIR` picks another folder. Checks `SHA256SUMS-*` beside the file and refuses glibc older than 2.44. Sets the `medlar:` link handler (user install). `./installer.sh --uninstall [--purge]` removes it again (`--system` for a system install). -**Arch Linux:** `sudo pacman -U Medlar-0.1.0-arch-x86_64.pkg.tar.zst` (package `medlar-bin`). To build it yourself: -`cd packaging/arch && makepkg -si` (downloads the tar.gz) or `MEDLAR_TARBALL=file:///path/to/Medlar-0.1.0-Linux-x86_64.tar.gz makepkg -si`. +**Arch Linux:** `sudo pacman -U Medlar-0.1.1-arch-x86_64.pkg.tar.zst` (package `medlar-bin`). To build it yourself: +`cd packaging/arch && makepkg -si` (downloads the tar.gz) or `MEDLAR_TARBALL=file:///path/to/Medlar-0.1.1-Linux-x86_64.tar.gz makepkg -si`. -Check the download against `SHA256SUMS-0.1.0`: `sha256sum -c SHA256SUMS-0.1.0`. +Check the download against `SHA256SUMS-0.1.1`: `sha256sum -c SHA256SUMS-0.1.1`. **Portable mode:** put a file called `portable` beside `bin/medlar` (tar.gz) or beside the `.AppImage`. Everything is then kept in a `medlar-data/` folder next to it. `MEDLAR_HOME=` sets the folder directly and wins over both. @@ -63,7 +63,7 @@ Requests with a web `Origin` or a foreign `Host` are refused, and no CORS header ## Limits and known gaps -Honest state of 0.1.0. The engine is tested hard (unit, integration, fuzz, a 20-minute fault soak with 606 files and no +Honest state of 0.1.1. The engine is tested hard (unit, integration, fuzz, a 20-minute fault soak with 606 files and no corrupt one). The interface is tested less. - The hidden-window user journeys (pause, restart, expired link, schedule) were tested at engine level only, not by diff --git a/crates/app/src/views/settings/rows.rs b/crates/app/src/views/settings/rows.rs index 02010de..40bd4d5 100644 --- a/crates/app/src/views/settings/rows.rs +++ b/crates/app/src/views/settings/rows.rs @@ -266,7 +266,7 @@ static ROWS: &[Row] = &[ Page::Look, "motion", "bar", - &["progress", "bar", "parts"], + &["bar"], Kind::Choice { options: &["parts", "one"], get: |s| at(&BARS, s.bar), set: |s, i| s.bar = BARS[i] }, ), row( diff --git a/docs/releases/0.1.1.md b/docs/releases/0.1.1.md new file mode 100644 index 0000000..56a935b --- /dev/null +++ b/docs/releases/0.1.1.md @@ -0,0 +1,28 @@ +# Medlar 0.1.1 + +Fixes and small changes after 0.1.0. Linux x86_64, glibc 2.44 or newer. + +## Files +- `Medlar-0.1.1-x86_64.AppImage` +- `Medlar-0.1.1-Linux-x86_64.tar.gz` (install.sh and uninstall.sh for your home folder) +- `Medlar-0.1.1-arch-x86_64.pkg.tar.zst` (package `medlar-bin`) +- `SHA256SUMS-0.1.1` + +## What changed +- **Names from the server.** A download sent by the browser extension with a placeholder name (`output.bin`, `download`, + no extension) now takes the real name from the server (Content-Disposition, redirect or URL). A name you typed stays. +- **Window raised on arrival.** A link from the browser or the command line shows the window, un-minimises it and asks + for attention (Wayland does not allow stealing focus). +- **Copy and select all in text fields.** Ctrl+C, Ctrl+A, Ctrl+V, Ctrl+X and Ctrl+Z work in a focused field and no + longer trigger app shortcuts. +- **Readable speed.** The speed shown is a 2 second average and changes at most once per second; big jumps show at once. + The drop target uses the same value. The tray tooltip is not smoothed. +- **Progress bar setting.** Settings, Look: "One bar" or "One per part" (default, as before). The Parts tab map stays. +- **Snail mode.** The cap is now 8 kB/s (was 32 kB/s). A saved 32 kB/s moves to 8 kB/s; a value you changed is kept. + A round snail button at the bottom right of the main window turns it on and off; its tooltip shows the shortcut. + +## Known gaps +- Needs glibc 2.44 or newer; not tested on other systems. +- The snail button can cover the right edge of the last row in a very small window (480x360). +- The snail crawl motion and the raise on a real Wayland desktop were not watched live. +- yt-dlp and ffmpeg are not bundled. diff --git a/docs/tests/S046-fixes-0.1.1.md b/docs/tests/S046-fixes-0.1.1.md new file mode 100644 index 0000000..51547bd --- /dev/null +++ b/docs/tests/S046-fixes-0.1.1.md @@ -0,0 +1,39 @@ +# S046 — Fixes 0.1.1: test file + +## Built +- `crates/core/src/http/name.rs` · `prefer(hint, found)`; used by `download.rs::start` and the Add dialog (`views/add`). +- `crates/app/src/views/incoming.rs` · `raise()`: show, un-minimise, focus, ask for attention. +- `crates/app/src/keys.rs` · Ctrl+A/C/V/X/Z stay with a focused text field. +- `crates/app/src/ui/odometer.rs` · `Calm` smoothing (2 s average, 1 s hold); also in `views/target.rs`. +- `crates/core/src/settings.rs` · `BarStyle`, `SNAIL_SPEED` 8000 with migration; Settings, Look row "bar". +- `crates/app/src/ui/snail.rs` · round snail button, drawn in `app.rs` after the main view. + +## Checks +| # | Risk | Do this | Expect | How | Result | +|---|---|---|---|---|---| +| 1 | HIGH | Engine: hint `output.bin`, server sends Content-Disposition `game.zip` | file is `game.zip` | integration `a_placeholder_name_gives_way_to_the_servers` | RESULT1 | +| 2 | HIGH | Same, hint `mine.7z` | file stays `mine.7z` | integration (same test) | RESULT1 | +| 3 | MED | Hint `download`, redirect to `other.iso` | file is `other.iso` | integration (same test) | RESULT1 | +| 4 | MED | `prefer` with placeholders and real names | only a placeholder gives way, never to another placeholder | unit `hints_give_way` | RESULT1 | +| 5 | MED | Hidden run: POST `{url, filename:"output.bin"}` to the connector on a spare port | Add window shows the name `game.zip`-style real name, window is up | by hand (hidden.sh) | RESULT2 | +| 6 | MED | Raise on arrival | commands Visible, Minimized(false), Focus, attention | unit `raising_shows_focuses_and_asks_for_attention` | RESULT1 | +| 7 | HIGH | Focused field, Ctrl+C and Ctrl+A | app shortcuts do not fire | unit `a_focused_field_keeps_copy_and_select_all` | RESULT1 | +| 8 | MED | Noisy speed fed for 10 s | at most one change per hold; jumps pass at once | unit `a_noisy_speed_changes_at_most_once_per_hold` | RESULT1 | +| 9 | LOW | Idle (speed 0) | no repaint requested | unit (odometer) | RESULT1 | +| 10 | MED | Settings file without `bar` | loads with Parts | unit settings tests | RESULT1 | +| 11 | MED | Settings row "bar" | Look page lists it, texts exist, key is real | integration `every_row_has_its_texts_and_real_keys` | RESULT1 | +| 12 | LOW | Shots `main-onebar`, light and dark | one bar per row | screen | RESULT3 | +| 13 | HIGH | Stored snail 32768 / user value 5000 | 8000 / 5000 | unit `snail_moves_to_8_kb_unless_changed` | RESULT1 | +| 14 | HIGH | Snail toggled during a download against testserver | speed held at cap, no connection dropped | integration `modes_change_live_without_reconnecting` | RESULT1 | +| 15 | MED | Snail button off / on | off asks no frames; on asks a slow loop | unit `off_asks_for_no_frames_and_on_asks_for_a_slow_loop` | RESULT1 | +| 16 | LOW | Shots `main-snail`, light/dark, 480x360 and 1080x720 | button bottom right, on/off look | screen | RESULT3 | +| 17 | MED | Hidden run idle with the new build | CPU near 0 % | by hand | RESULT2 | + +## Needs +Testserver on loopback; throwaway home and spare port 17999 for hidden runs. The user's running Medlar (17616) is never touched. + +## Doubts +- Placeholder list is a guess (`output`, `download`, `file`, `index`, `unknown`, `get`, no extension, script types). +- Real Wayland focus on arrival cannot be proven in a nested session. +- At 480x360 the snail button covers the pause icon of the last row. +- Tray tooltip speed is not smoothed. Snail crawl motion not watched live. diff --git a/packaging/arch/.SRCINFO b/packaging/arch/.SRCINFO index 75daef2..c1025b7 100644 --- a/packaging/arch/.SRCINFO +++ b/packaging/arch/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = medlar-bin pkgdesc = Download manager with dynamic parts, queues, video sites and a Material You interface - pkgver = 0.1.0 + pkgver = 0.1.1 pkgrel = 1 url = https://archlinux.tail7c4f5e.ts.net/git/astar76/Medlar arch = x86_64 @@ -23,7 +23,7 @@ pkgbase = medlar-bin conflicts = medlar options = !strip options = !debug - source = Medlar-0.1.0-Linux-x86_64.tar.gz::https://archlinux.tail7c4f5e.ts.net/git/astar76/Medlar/releases/download/v0.1.0/Medlar-0.1.0-Linux-x86_64.tar.gz + source = Medlar-0.1.1-Linux-x86_64.tar.gz::https://archlinux.tail7c4f5e.ts.net/git/astar76/Medlar/releases/download/v0.1.1/Medlar-0.1.1-Linux-x86_64.tar.gz sha256sums = 066b6bc684810d478f2cd6f64acae42b91dec1e9ba3a56d570519f981798ae2f pkgname = medlar-bin diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index 4a5691e..da68e53 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: astar76 pkgname=medlar-bin -pkgver=0.1.0 +pkgver=0.1.1 pkgrel=1 pkgdesc='Download manager with dynamic parts, queues, video sites and a Material You interface' arch=('x86_64') @@ -25,7 +25,7 @@ package() { install -Dm644 share/medlar.metainfo.xml "$pkgdir/usr/share/metainfo/medlar.metainfo.xml" install -Dm644 share/Rubik-OFL.txt "$pkgdir/usr/share/licenses/$pkgname/Rubik-OFL.txt" # Medlar's own licence: MIT (Cargo.toml); the project has no LICENSE file yet. - printf 'MIT License\n\nMedlar, 0.1.0. Licensed under the MIT licence.\nThe Rubik font is under the SIL OFL (Rubik-OFL.txt).\n' \ + printf 'MIT License\n\nMedlar, 0.1.1. Licensed under the MIT licence.\nThe Rubik font is under the SIL OFL (Rubik-OFL.txt).\n' \ > "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" }