Fix L17/L18/L56: regex validation, terminal visibility, SponsorBlock warning

L17: TemplateManager urlPattern field now validates the regex on each keystroke;
     an error message appears below the input and Save is blocked until fixed.
L18: Terminal nav item is hidden when customCommandEnabled is false -- no more
     dead-end gated view. Sidebar gains showTerminal prop; App.tsx reads the
     setting and passes it through.
L56: SponsorBlock Categories Field shows a 'warning' validationMessage when the
     toggle is ON but no categories are selected, making the silent no-op visible.

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:48:41 -04:00
parent ba208de98b
commit 910cf23e61
5 changed files with 42 additions and 12 deletions
+3 -3
View File
@@ -410,9 +410,9 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
already that union).
- [ ] **L16 — `relTime`/`formatWhen` verbosity.** `relTime` returns unbounded "N d ago"; History's
`formatWhen` always appends the year, even for the current year.
- [ ] **L17 — TemplateManager regex not validated.** An invalid `urlPattern` is accepted with no
- [x] **L17 — TemplateManager regex not validated.** An invalid `urlPattern` is accepted with no
feedback and silently never matches (main's `matchesUrl` swallows the error).
- [ ] **L18 — Terminal nav item shown when custom commands are off** — leads to a gated dead-end
- [x] **L18 — Terminal nav item shown when custom commands are off** — leads to a gated dead-end
view; consider hiding/disabling it.
- [ ] **L19 — `App.tsx` focus hack**`setTimeout(() => …focus(), 60)` after a tab switch.
- [ ] **L20 — `youtubePlayerClient` is free text** with no allowlist/validation; a typo passes
@@ -486,7 +486,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
- [x] **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
contains the size, then `sizeLabel` is appended again.
- [ ] **L56 — SponsorBlock ON with zero categories silently no-ops** (`buildArgs` guards on
- [x] **L56 — SponsorBlock ON with zero categories silently no-ops** (`buildArgs` guards on
`length > 0`) with no UI warning.
- [x] **L57 — Scheduling a past datetime silently downloads now** (`buildItem` future-only guard),
no feedback that the schedule was ignored.