S016: Add dialog, batch and duplicates

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-25 14:03:30 -06:00
commit 08488b4df2

View file

@ -182,3 +182,15 @@ Seen: tested in a second checkout on the shared target; S009 saw stale artifacts
## Later
-
## S016 — Add dialog, batch and duplicates (2026-11-25)
Done: `views::add` (dialog, batch, duplicates, "Continue from a new link"), `core::{batch, duplicate, portal}`. Choices: D-059, D-061, D-071. Outside the plan's files: `Manager::probe` and `Hold::Until` for start times, `secret::task_name`, `Sites::source_with`, `disk::free`, `bridge` (add, check, probe, poll), `dialog::shown`, `view.json` (folders), strings.
Verified: `nice cargo test -j 2 -p medlar --test add` green (14, four with the real engine), all medlar tests, core `--lib`, auth, manager, relink; clippy. Shots seen: empty, simple, advanced, error, batch, duplicate, continue, relink, at 1080×720 and simple at 480×360, some light, some dark. Built in a copy of the tree while S009 and S012 were half done.
- **Open it from outside: `app.main.adding.ask(views::add::Request { text, literal: true, name, size, mime, page, user_agent, cookies, headers, .. })`**; several wait in line (100 at most). `literal` for all that comes from a program (no patterns), `list` for a file with links. Cookies and secret headers end up in the keyring, not in the task.
- `adding.relink(&task)` asks for a new link; it compares first. "Get it from its page" sends `AwaitLink` and opens the page.
- `manager.probe(task, secret)` says what a link leads to (`Probed`); drop the reply to end it. `bridge::poll(&mut reply, ctx)` asks without waiting and draws a frame when it comes; `bridge::beside` runs something slow.
- Keyring: items named by `secret::task_name()` are deleted when no task has them any more (forgotten, edited, continued, removed before the program ended); shared ones stay. Other names (`site:`) are never touched.
- `Batch::of(text, patterns)`, `duplicate::Known::new(tasks).find(&New)`: for the connector, clipboard and rules.
Not done: the desktop's file chooser (portal) was never tried, only that it fails plainly is in the code; links of a batch are not asked about; what is known is found when the fields change, not when the list does; a start time is kept but queue schedules are S021's, and time asleep doesn't count; a metalink file is refused as a list (`read_metalink` is not wired, 3.3); files already on disk but not in the list are not noticed (the engine numbers names); no hidden release run.
Later: `App` doesn't set `ClientOptions::known_hosts` yet (S011).
Seen: boxes were ticked together after the tests, against rule 3.