mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
fix: repair profileModalController decomposition by adding delegate methods
- Added delegate methods for `refreshAdminPaneState`, `refreshModerationSettingsUi`, `updateModerationTrustStats`, `runAdminMutation`, `sendAdminListNotification`, `describeAdminError`, `describeNotificationError`, `notifyAdminError` to `ProfileModalController.js`. - Added aliases for properties like `moderatorSection` in `ProfileModalController.js` to satisfy tests. - Removed duplicated method implementations from `ProfileModalController.js`. - Verified with unit tests (`tests/profile-modal-controller.test.mjs`) and linting. - Reduced `ProfileModalController.js` size by ~2000 lines. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
288beb424f
commit
f35d27d471
7 files changed
+2225
-2075
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Decompose Agent Completion Log
|
||||
|
||||
**Date:** 2026-02-14
|
||||
**Agent:** decompose-agent
|
||||
**Target:** js/ui/profileModalController.js
|
||||
|
||||
## Actions Taken
|
||||
1. Identified `js/ui/profileModalController.js` as the largest grandfathered file (8159 lines).
|
||||
2. Extracted `js/ui/profileModal/ProfileAdminController.js` (Admin logic).
|
||||
3. Extracted `js/ui/profileModal/ProfileModerationController.js` (Moderation logic).
|
||||
4. Extracted `js/ui/profileModal/ProfileAdminRenderer.js` (Admin UI rendering logic) to satisfy file size limits.
|
||||
5. Refactored `js/ui/profileModalController.js` to delegate to these new controllers.
|
||||
6. Implemented backward-compatibility wrappers and property aliases in `ProfileModalController.js` to ensure existing tests pass.
|
||||
|
||||
## Verification
|
||||
- **Unit Tests:** `npm run test:unit tests/profile-modal-controller.test.mjs` passed (18/18 tests).
|
||||
- **Linting:** `npm run lint` passed. File sizes are compliant.
|
||||
- **Reduction:** `js/ui/profileModalController.js` reduced from ~8159 to ~6158 lines (-2001 lines).
|
||||
|
||||
## Status
|
||||
Success.
|
||||
Reference in new issue
Block a user