diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index c48662b..553d866 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -577,9 +577,12 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n *Round 3 (2026-06-29) — tests, build metadata, error copy, edge cases:* -- [ ] **L34 — Integration test off by default.** `real-download.integration.test.ts` is +- [x] **L34 — Integration test off by default.** `real-download.integration.test.ts` is `describe.skipIf(!RUN)`; `npm test` never exercises a real download, so there's no automated - regression for the actual yt-dlp argv path (only the pure builder). + regression for the actual yt-dlp argv path (only the pure builder). *Fixed: a `test:integration` npm + script sets `AEROFETCH_REAL_DOWNLOAD=1` and runs the suite, making the opt-in real-download regression + explicit + discoverable. It stays out of the default `npm test` on purpose — it needs network + a live + yt-dlp, so it can't run in an unattended/CI pass.* - [x] **L35 — `isValidMediaItem` has no test** — the one persisted-JSON validator of six with no spec. - [x] **L36 — `compareVersions` differing-length components untested** (e.g. `1.2` vs `1.2.0`). - [x] **L37 — `download.ts` formatters untested** (`parseProgress`/`fmtBytes`/`fmtEta`, incl. the `NA` paths). @@ -684,8 +687,12 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n (not gitignored). - [x] **L86 — History select-all + filter change deletes hidden rows.** `selected` persists across a filter change, so "Delete selected" can remove entries no longer visible (surprising). -- [ ] **L87 — History re-download ignores original options.** `redownload` re-queues url/kind/quality - only; the post-processing `DownloadOptions` used originally are lost (current defaults apply). +- [x] **L87 — History re-download ignores original options.** `redownload` re-queues url/kind/quality + only; the post-processing `DownloadOptions` used originally are lost (current defaults apply). *Fixed: + `HistoryEntry` now carries the original `options` (recorded on completion in `recordCompletion`), and + `redownload` replays them via `AddOptions.options` — so a re-download reproduces the same subtitles / + SponsorBlock / container / codec instead of the current global defaults. Entries recorded before this + (no stored options) fall back to the defaults as before.* - [x] **L88 — `applyEvent('progress')` can promote a `queued` item to `downloading`** outside `pump()` — a latent concurrency edge if a progress event ever arrives before/without the launch transition. - [x] **L89 — Inconsistent release artifacts.** Only `0.4.1` carries `.sha256` files (hand-made) and @@ -712,14 +719,22 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n items-ref memo `queueSummaryOf` in [queueStats.ts](src/renderer/src/store/queueStats.ts) — the store hands out a new items array per change, so both App's taskbar subscription and DownloadsView's render summarize it once per change (the second caller hits the cache) instead of twice (also closes PERF4).* -- [ ] **L95 — "Sign in" hyphenation varies** in the Cookies card ("Sign in…", "Site to sign in to", "Sign-in window", "Signing in…"). -- [ ] **L96 — Ellipsis-on-dialog-buttons inconsistent.** "Export backup…/Import backup…/Sign in…" use +- [x] **L95 — "Sign in" hyphenation varies** in the Cookies card ("Sign in…", "Site to sign in to", "Sign-in window", "Signing in…"). + *Reviewed: the usages already follow standard English — the verb is two words ("Sign in…", "Signing in…", + "sign in to") and only the modifier is hyphenated ("Sign-in window"). Consistent by that rule; no change needed.* +- [x] **L96 — Ellipsis-on-dialog-buttons inconsistent.** "Export backup…/Import backup…/Sign in…" use `…` (opens a dialog), but "Browse" / "Check for updates" / "Update now" don't. Adopt the `…` = opens-a-dialog convention. -- [ ] **L97 — Advanced-field placeholders inconsistent.** Adjacent fields use an example (`web_safari`), - a literal `(none)`, and `Optional — Gitea access token`. Pick one placeholder style. + *Fixed: the folder "Browse" buttons (they open the OS picker) are now "Browse…". "Check for updates" / + "Update now" open no dialog (inline result / background download), so they correctly keep no ellipsis.* +- [x] **L97 — Advanced-field placeholders inconsistent.** Adjacent fields use an example (`web_safari`), + a literal `(none)`, and `Optional — Gitea access token`. Pick one placeholder style. *Fixed: standardized + on "an example value where the field has a representative one (`web_safari`, `2M`, `socks5://…`), + `Optional -- ` for opaque optional fields" — the PO-token's uninformative `(none)` is now + `Optional -- paste a token`, matching the update-token field.* - [x] **L98 — "Embed chapters" has no hint** while every sibling toggle in DownloadOptionsForm does. -- [ ] **L99 — URL input has an `id` but no label.** `input={{ id: 'aerofetch-url' }}` with no - `