Files
bitvid/context/CONTEXT_2026-02-19_19-58-00.md

1.2 KiB

Decomposition Context

  • Task: Decompose js/ui/profileModalController.js (6258 lines).
  • Reason: Largest grandfathered file, highly coupled UI logic.
  • Goal: Extract "Block List" and "Edit Profile" logic into separate controllers to reduce line count by >200 lines and improve maintainability.
  • Target Branch: unstable (via agents/daily/... branch).
  • Plan:
    1. Extract ProfileBlockListController to manage blocked users list, add/remove blocks.
    2. Extract ProfileEditController to manage profile editing form, uploads, and saving.
    3. Update ProfileModalController to delegate to these new controllers.

Selected Blocks

  1. Block List Management:

    • populateBlockedList
    • handleAddBlockedCreator
    • handleRemoveBlockedCreator
    • ensureBlockListStatusElement
    • setBlockListLoadingState
    • mutateBlocklist
    • Event listeners and DOM cache for block list elements.
  2. Edit Profile Management:

    • handleEditProfile
    • populateEditPane
    • checkStorageForUploads
    • handleUpload
    • handleSaveProfile
    • Event listeners and DOM cache for edit profile elements.