From e0afaf0fdf75b4d49605cade2e1f06448ba7a9fc Mon Sep 17 00:00:00 2001 From: debont80 Date: Tue, 30 Jun 2026 21:31:00 -0400 Subject: [PATCH] Mark H1 done in CODE-AUDIT (god files decomposed) Co-Authored-By: Claude Opus 4.8 --- CODE-AUDIT.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index 8a60b89..5181f95 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -221,8 +221,17 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n ## High -- [ ] **H1 — Decompose god files.** `SettingsView.tsx` (1104, ~11 cards, ~30 selector subs + - ~20 useState), `DownloadBar.tsx` (858, ~17 state hooks), `store/downloads.ts` (614). +- [x] **H1 — Decompose god files.** `SettingsView.tsx` (1104, ~11 cards, ~30 selector subs + + ~20 useState), `DownloadBar.tsx` (858, ~17 state hooks), `store/downloads.ts` (614). *Done on + `refactor/h1-decompose-god-files`: SettingsView → `components/settings/*.tsx` (one component per + card + shared `settingsStyles.ts`), leaving a ~90-line shell (search box + display-toggle filter); + each card still renders one `` DOM node so the filter is unchanged. DownloadBar → a + `downloadBar/useDownloadBar.ts` hook (all state + handlers, wrapper handlers keep the + preview-invalidation side-effects) + `downloadBar/styles.ts` + `downloadBar/PlaylistPanel.tsx`, + leaving a render-only shell. store/downloads.ts → `downloadTypes.ts` (types, re-exported so + importers are untouched) + `downloadItem.ts` (buildItem/titleFromUrl/RESOLVING) + `downloadSeed.ts` + (preview seed), leaving the store + recordCompletion + wiring. Behaviour unchanged; full + typecheck + lint + production build + 248 tests green.* - [x] **H2 — Consolidate scattered utilities.** `youtubeId` ×2; 4 YouTube-URL-parsing variants; byte/speed/eta/duration formatting across 4 modules. *URL half: one canonical `youtubeId` now lives in [urlHelpers.ts](src/renderer/src/lib/urlHelpers.ts) (the complete watch/shorts/embed/live/youtu.be