diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index 5749894..285597d 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -501,7 +501,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n - [ ] **L64 — `ARIA2C_ARGS` connection params hardcoded** (`-x16 -s16 -k1M`), no user control. - [ ] **L65 — Pause uses `taskkill /F`** like cancel — a forced kill risks an unflushed `.part` tail vs a graceful stop. - [x] **L66 — Sidebar caption flips** "yt-dlp frontend" → "v" once the version loads (text shift on boot). -- [ ] **L67 — Onboarding has no Skip and can't be revisited** (no "show tips again"). +- [x] **L67 — Onboarding has no Skip and can't be revisited** (no "show tips again"). - [x] **L68 — Background-running notification fires once per process** (`notifiedBackground` never resets) — won't remind on later window closes. - [ ] **L69 — `settings.ts` mixes path helpers with persistence** (`getDefaultMediaDir`/ @@ -544,7 +544,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n - [x] **L85 — `.claude/launch.json` is committed and misplaced.** A VS Code launch config lives in `.claude/` (VS Code reads `.vscode/launch.json`), so no tool consumes it; it's also tracked (not gitignored). -- [ ] **L86 — History select-all + filter change deletes hidden rows.** `selected` persists across a +- [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). diff --git a/src/renderer/src/components/HistoryView.tsx b/src/renderer/src/components/HistoryView.tsx index 7fc627f..0536491 100644 --- a/src/renderer/src/components/HistoryView.tsx +++ b/src/renderer/src/components/HistoryView.tsx @@ -1,4 +1,4 @@ -import { useMemo, useState } from 'react' +import { useEffect, useMemo, useState } from 'react' import { Text, Caption1, @@ -173,6 +173,16 @@ export function HistoryView(): React.JSX.Element { }) }, [entries, query, kindFilter]) + // Clear selections that are no longer visible after a filter change (L86). + useEffect(() => { + if (selected.size === 0) return + const visible = new Set(filtered.map((h) => h.id)) + setSelected((prev) => { + const next = new Set([...prev].filter((id) => visible.has(id))) + return next.size === prev.size ? prev : next + }) + }, [filtered]) + function redownload(h: HistoryEntry): void { // Strip compound format labels ("720p · mp4 · 184 MB" → "720p") when there is // no stored formatId, so videoFormat() can still match the preset (H5). diff --git a/src/renderer/src/components/Onboarding.tsx b/src/renderer/src/components/Onboarding.tsx index 2098b87..f1f9fe6 100644 --- a/src/renderer/src/components/Onboarding.tsx +++ b/src/renderer/src/components/Onboarding.tsx @@ -1,4 +1,4 @@ -import { +import { Card, Title2, Body1, @@ -72,6 +72,11 @@ const useStyles = makeStyles({ flexShrink: 0, marginTop: '2px', color: tokens.colorCompoundBrandForeground1 + }, + btnRow: { + display: 'flex', + justifyContent: 'flex-end', + gap: '8px' } }) @@ -126,13 +131,21 @@ export function Onboarding(): React.JSX.Element { ))} - +
+ + +
)