Fix L67/L86: Onboarding Skip button; clear hidden selections on filter change
L67: Onboarding now has a 'Skip' button alongside 'Get started', both in a
right-aligned flex row. Both call update({hasCompletedOnboarding:true})
so the behavior is the same — Skip just reads as optional for users who
want to get started immediately without reading the tips.
L86: HistoryView now clears any selected IDs that are no longer visible when
the filter (query or kind) changes. A useEffect on `filtered` intersects
the current selection with the new visible set and calls setSelected only
if the size actually changed (avoids re-renders when the filter doesn't
affect the selection).
typecheck + 242 tests green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -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.
|
- [ ] **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.
|
- [ ] **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<x>" once the version loads (text shift on boot).
|
- [x] **L66 — Sidebar caption flips** "yt-dlp frontend" → "v<x>" 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
|
- [x] **L68 — Background-running notification fires once per process** (`notifiedBackground` never
|
||||||
resets) — won't remind on later window closes.
|
resets) — won't remind on later window closes.
|
||||||
- [ ] **L69 — `settings.ts` mixes path helpers with persistence** (`getDefaultMediaDir`/
|
- [ ] **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
|
- [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
|
`.claude/` (VS Code reads `.vscode/launch.json`), so no tool consumes it; it's also tracked
|
||||||
(not gitignored).
|
(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).
|
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
|
- [ ] **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).
|
only; the post-processing `DownloadOptions` used originally are lost (current defaults apply).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useMemo, useState } from 'react'
|
import { useEffect, useMemo, useState } from 'react'
|
||||||
import {
|
import {
|
||||||
Text,
|
Text,
|
||||||
Caption1,
|
Caption1,
|
||||||
@@ -173,6 +173,16 @@ export function HistoryView(): React.JSX.Element {
|
|||||||
})
|
})
|
||||||
}, [entries, query, kindFilter])
|
}, [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 {
|
function redownload(h: HistoryEntry): void {
|
||||||
// Strip compound format labels ("720p · mp4 · 184 MB" → "720p") when there is
|
// Strip compound format labels ("720p · mp4 · 184 MB" → "720p") when there is
|
||||||
// no stored formatId, so videoFormat() can still match the preset (H5).
|
// no stored formatId, so videoFormat() can still match the preset (H5).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
Title2,
|
Title2,
|
||||||
Body1,
|
Body1,
|
||||||
@@ -72,6 +72,11 @@ const useStyles = makeStyles({
|
|||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
marginTop: '2px',
|
marginTop: '2px',
|
||||||
color: tokens.colorCompoundBrandForeground1
|
color: tokens.colorCompoundBrandForeground1
|
||||||
|
},
|
||||||
|
btnRow: {
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
gap: '8px'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -126,13 +131,21 @@ export function Onboarding(): React.JSX.Element {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button
|
<div className={styles.btnRow}>
|
||||||
appearance="primary"
|
<Button
|
||||||
icon={<RocketRegular />}
|
appearance="subtle"
|
||||||
onClick={() => update({ hasCompletedOnboarding: true })}
|
onClick={() => update({ hasCompletedOnboarding: true })}
|
||||||
>
|
>
|
||||||
Get started
|
Skip
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
appearance="primary"
|
||||||
|
icon={<RocketRegular />}
|
||||||
|
onClick={() => update({ hasCompletedOnboarding: true })}
|
||||||
|
>
|
||||||
|
Get started
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user