Fix L49/L53/L59: error string newlines, dialog null-safety, shared theme constant

L49: Remove newline from missing-binary error message in download.ts; inline
     error spans render it as literal newline, now one sentence with period.
L53: backup.ts exportBackup/importBackup/showMessageBox no longer use win!
     non-null assertions -- each uses a guarded ternary (same pattern index.ts
     already used for chooseFolder).
L59: Extract PAGE_BACKGROUND to src/shared/theme.ts; main/index.ts and
     renderer/src/theme.ts both import from it -- no more "keep in sync" comment.

typecheck + 242 tests + eslint + prettier green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 13:42:22 -04:00
parent 72462cab1e
commit 9d816f0c86
6 changed files with 35 additions and 32 deletions
+3 -3
View File
@@ -475,13 +475,13 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
other yt-dlp timeout ("Timed out …").
- [ ] **L48 — `cleanError` strips a leading `error:`** for live failures, while raw `ERROR:` text
shows elsewhere (errorlog seed / terminal) — inconsistent error normalization.
- [ ] **L49 — Newlines in user-facing error strings.** download.ts missing-binary messages embed
- [x] **L49 — Newlines in user-facing error strings.** download.ts missing-binary messages embed
`\n`, which renders awkwardly in inline/Caption error spans.
- [x] **L50 — "Cookies saved" shown for 0 cookies.** Closing the sign-in window without logging in
still writes the file and reports `ok` with `cookieCount: 0`.
- [ ] **L51 — Scheduled daily sync time hardcoded to 09:00** (schedule.ts) — on/off toggle only, no time picker.
- [ ] **L52 — Installer handoff is a fixed `setTimeout(app.quit, 1500)`** (updater.ts) — a race on slow machines.
- [ ] **L53 — `dialog.show*Dialog(win!, …)` non-null assertions** on a possibly-null window
- [x] **L53 — `dialog.show*Dialog(win!, …)` non-null assertions** on a possibly-null window
(chooseFolder, backup export/import) — can throw if the sender window is gone.
- [ ] **L54 — DownloadBar preview `<img>` has no `onError` fallback** (inconsistent with `MediaThumb`'s retry).
- [x] **L55 — QueueItem meta line can show size twice** — a probed-format `quality` label already
@@ -491,7 +491,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
- [x] **L57 — Scheduling a past datetime silently downloads now** (`buildItem` future-only guard),
no feedback that the schedule was ignored.
- [x] **L58 — `chooseFolder` passes the macOS-only `createDirectory` property** — dead option on Windows.
- [ ] **L59 — `THEME_BACKGROUND` (index.ts) duplicates `pageBackground` (theme.ts)** — two
- [x] **L59 — `THEME_BACKGROUND` (index.ts) duplicates `pageBackground` (theme.ts)** — two
hand-synced color constants (a "keep in sync" comment guards them).
- [x] **L60 — `'external-url'` channel name lacks the `category:` prefix** every other IPC channel uses.
- [ ] **L61 — `taskbarProgress` is the lone `ipcMain.on`** (fire-and-forget) amid all-`invoke` channels.