Mark H1 done in CODE-AUDIT (god files decomposed)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+11
-2
@@ -221,8 +221,17 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
|
|||||||
|
|
||||||
## High
|
## High
|
||||||
|
|
||||||
- [ ] **H1 — Decompose god files.** `SettingsView.tsx` (1104, ~11 cards, ~30 selector subs +
|
- [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).
|
~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 `<Card>` 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;
|
- [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
|
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
|
[urlHelpers.ts](src/renderer/src/lib/urlHelpers.ts) (the complete watch/shorts/embed/live/youtu.be
|
||||||
|
|||||||
Reference in New Issue
Block a user