[decompose] extract helpers from js/ui/profileModalController.js

Extracted DM Relay UI logic and DM Attachment logic into separate binder modules to reduce the size of ProfileModalController.js. Updated file size baseline.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-18 01:03:43 +00:00
1 parent 5e8b6b0141
commit d22785bb87
9 files changed
+605 -413

No files matched your search

+15 -9
View File
@@ -1,17 +1,23 @@
# Content Audit Agent (Daily) - Completed
# Decompose Agent (Daily) - Completed
**Date:** 2026-02-17
**Agent:** content-audit-agent
**Date:** 2026-02-18
**Agent:** decompose-agent
**Status:** Success
## Summary
Audited `/content/docs/guides/upload-content.md` and `/content/docs/community/community-guidelines.md` against the codebase.
Decomposed `js/ui/profileModalController.js` by extracting cohesive blocks of logic into helper modules ("binders").
## Findings
1. **Accepted File Types**: `/content/docs/guides/upload-content.md` listed a subset of supported video extensions.
* **Fix**: Updated the doc to match `js/services/s3UploadService.js` (added `.m4v`, `.avi`, `.ogv`, `.ogg`, `.mpd`, `.flv`, `.3gp`).
2. **Moderation Configuration**: `js/services/moderationService.js` was using hardcoded constants for blur/autoplay thresholds, ignoring the configuration file mentioned in `/content/docs/community/community-guidelines.md`.
* **Fix**: Refactored `js/services/moderationService.js` to import `DEFAULT_BLUR_THRESHOLD` and `DEFAULT_AUTOPLAY_BLOCK_THRESHOLD` from `../config.js`.
1. **Selection**: `js/ui/profileModalController.js` (6258 lines) was the largest grandfathered file.
2. **Extraction**:
- Extracted DM Relay UI logic to `js/ui/profileModal/ProfileDmRelayBinder.js`.
- Extracted DM Attachment & Typing logic to `js/ui/profileModal/ProfileDmAttachmentBinder.js`.
3. **Result**:
- `js/ui/profileModalController.js` reduced to 5884 lines (reduction of 374 lines).
- Updated `scripts/check-file-size.mjs` baseline.
- All tests passed.
## Artifacts
- (Internal artifacts cleaned up)
- `context/CONTEXT_1739837127.md`
- `todo/TODO_1739837127.md`
- `decisions/DECISIONS_1739837127.md`