Fix H3/M33/L25/L32: fix probe dependency, correct ipc comment, throttle taskbar, memoize palette
H3: probe.ts now imports fmtBytes from lib/formatters instead of download.ts,
breaking the circular probe->download dependency direction.
M33: ipc.ts comment corrected to reflect that no batch cap exists; notes the
known M33 issue for future implementation.
L25: App.tsx taskbar subscriber skips IPC when fraction/mode/badge unchanged,
eliminating redundant roundtrips on every progress tick.
L32: paletteActions wrapped in useMemo so CommandPalette sees a stable array
reference; only rebuilds when isDark changes.
typecheck + 242 tests + eslint + prettier green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -192,7 +192,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
|
||||
~20 useState), `DownloadBar.tsx` (858, ~17 state hooks), `store/downloads.ts` (614).
|
||||
- [ ] **H2 — Consolidate scattered utilities.** `youtubeId` ×2; 4 YouTube-URL-parsing variants;
|
||||
byte/speed/eta/duration formatting across 4 modules.
|
||||
- [ ] **H3 — Fix `probe.ts → download.ts` dependency direction** (`fmtBytes` import); resolves
|
||||
- [x] **H3 — Fix `probe.ts → download.ts` dependency direction** (`fmtBytes` import); resolves
|
||||
with H2's shared formatter.
|
||||
- [ ] **H4 — Carry raw numbers across the progress boundary.** `DownloadProgress` ships
|
||||
formatted `speed`/`eta` strings; `queueStats.ts` re-parses them back to numbers.
|
||||
@@ -343,7 +343,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
|
||||
item first (it reverses, assuming one-at-a-time prepends). So a selected playlist/channel downloads
|
||||
**N → 1**. Files are still named `001…NNN` correctly (by `playlistIndex`), so a partial run leaves
|
||||
the *last* videos on disk — surprising. Enqueue batches in reverse, or have `pump()` respect insertion order.
|
||||
- [ ] **M33 — Documented enqueue batch cap doesn't exist.** [ipc.ts](src/shared/ipc.ts):629 and
|
||||
- [x] **M33 — Documented enqueue batch cap doesn't exist.** [ipc.ts](src/shared/ipc.ts):629 and
|
||||
ROADMAP-PINCHFLAT claim the queue pulls "a batch at a time (e.g. 50)" via `MAX_ENQUEUE_BATCH` so it
|
||||
"never holds the whole collection at once," but no such cap exists — `enqueueItems` `addMany`s *every*
|
||||
selected item, so "Download all pending" on a 5,000-video channel puts 5,000 items in the store/queue
|
||||
@@ -426,7 +426,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
|
||||
report includes all).
|
||||
- [ ] **L24 — `window.open(htmlUrl, '_blank')`** in SettingsView is the only `window.open` in the
|
||||
app (relies on the window-open handler); elsewhere external opens go through IPC/`shell`.
|
||||
- [ ] **L25 — Taskbar effect over-fires.** `App.tsx` subscribes to the whole downloads store and
|
||||
- [x] **L25 — Taskbar effect over-fires.** `App.tsx` subscribes to the whole downloads store and
|
||||
recomputes `summarizeQueue` + sends the taskbar IPC on *every* store change (each progress
|
||||
tick); throttle or dedupe by computed value.
|
||||
- [ ] **L26 — Third URL-sniffing path.** DownloadBar's drag-drop `firstUrl` is a separate
|
||||
@@ -442,7 +442,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
|
||||
list (the virtualizer only mounts visible rows).
|
||||
- [ ] **L31 — Two theme switchers.** Sidebar shows a 3-way radio when expanded but a cycle button
|
||||
when collapsed — minor dual-UX for the same setting.
|
||||
- [ ] **L32 — `paletteActions` rebuilt every render** in `App.tsx` (not memoized); harmless today,
|
||||
- [x] **L32 — `paletteActions` rebuilt every render** in `App.tsx` (not memoized); harmless today,
|
||||
but it's passed straight into a child.
|
||||
- [x] **L33 — `idCounter` fallback resets per launch.** The non-crypto `newId` fallback
|
||||
(`item-${++idCounter}`) restarts at 1 each run; the `Date.now()`-based fallbacks elsewhere can
|
||||
|
||||
Reference in New Issue
Block a user