mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 04:12:25 +00:00
Extracts all hashtag preference related logic into a new controller `js/ui/profileModal/ProfileHashtagController.js` to reduce the size of `js/ui/profileModalController.js` and improve maintainability. - Moves `normalizeHashtagTag`, `formatHashtagTag`, `getResolvedHashtagPreferences`, `setHashtagStatus`, `refreshHashtagBackgroundStatus`, `populateHashtagPreferences`, `renderHashtagList`, `sanitizeHashtagList`, `createHashtagListItem`, `persistHashtagPreferences`, `handleAddHashtagPreference`, `handleRemoveHashtagPreference`, `handleHashtagPreferencesChange`, `describeHashtagPreferencesError`. - Updates `ProfileModalController` to delegate to `ProfileHashtagController`. - Reduces `js/ui/profileModalController.js` by ~600 lines. - Updates file size baseline in `scripts/check-file-size.mjs`. Passes `npm run lint` and `npm run test:unit`. Co-authored-by: PR0M3TH3AN <[email protected]>
14 lines
1.0 KiB
Markdown
14 lines
1.0 KiB
Markdown
# Context
|
|
|
|
**Goal:** Execute the `bitvid-decompose-agent` task (daily scheduler).
|
|
**Scope:** Decompose `js/ui/profileModalController.js` by extracting hashtag preference logic into `js/ui/profileModal/ProfileHashtagController.js`.
|
|
**Focus:** Reduce file size by moving cohesive hashtag-related methods and state.
|
|
|
|
**Definition of Done:**
|
|
- [ ] Create `js/ui/profileModal/ProfileHashtagController.js`.
|
|
- [ ] Move methods: `normalizeHashtagTag`, `formatHashtagTag`, `getResolvedHashtagPreferences`, `setHashtagStatus`, `refreshHashtagBackgroundStatus`, `populateHashtagPreferences`, `renderHashtagList`, `sanitizeHashtagList`, `createHashtagListItem`, `persistHashtagPreferences`, `handleAddHashtagPreference`, `handleRemoveHashtagPreference`, `handleHashtagPreferencesChange`, `describeHashtagPreferencesError`.
|
|
- [ ] Integrate into `js/ui/profileModalController.js`.
|
|
- [ ] Verify changes with `npm run lint` and `npm run test:unit`.
|
|
- [ ] Update `scripts/check-file-size.mjs` baseline.
|
|
- [ ] Update `docs/agents/AGENT_TASK_LOG.csv`.
|