mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Merge branch 'unstable' into perf-bound-dm-concurrency-10616621699713195657
This commit is contained in:
128 files changed
+7559
-5824
No files matched your search
@@ -0,0 +1,28 @@
|
||||
# Decompose: js/ui/profileModalController.js
|
||||
|
||||
## Selection
|
||||
Selected `js/ui/profileModalController.js` (6258 lines) because it is the largest grandfathered file not decomposed in the last 8 weeks.
|
||||
|
||||
## Plan
|
||||
Extract two cohesive blocks related to DM functionality that are currently mixed into the main controller:
|
||||
|
||||
1. **DM Relay UI Logic** (`ProfileDmRelayBinder.js`)
|
||||
- `cacheDmRelayElements`
|
||||
- `bindDmRelayControls`
|
||||
- `refreshDmRelayPreferences`
|
||||
- `handlePublishDmRelayPreferences`
|
||||
- `updateDmPrivacyToggleForRecipient`
|
||||
- `setPrivacyToggleState`
|
||||
- `handleActiveDmIdentityChanged`
|
||||
|
||||
2. **DM Attachment Logic** (`ProfileDmAttachmentBinder.js`)
|
||||
- `renderAttachmentQueue`
|
||||
- `uploadAttachmentQueue`
|
||||
- `resolveLatestDirectMessageForRecipient`
|
||||
- `maybePublishTypingIndicator`
|
||||
|
||||
These functions heavily rely on `this.dmController` and `this.services`, suggesting they belong in dedicated helpers or the DM controller itself. Extracting them to binder modules allows preserving the `this` context via argument passing while reducing the main file size.
|
||||
|
||||
## Stats
|
||||
- Original size: 6258 lines
|
||||
- Target reduction: > 200 lines
|
||||
@@ -0,0 +1,5 @@
|
||||
# Context: Daily Perf Agent Run
|
||||
|
||||
Goal: Identify and fix performance issues (P0/P1) and audit upload docs.
|
||||
Scope: js/ codebase, specifically setInterval/raf loops and upload logic.
|
||||
DoD: One small fix applied, docs verified, report generated.
|
||||
@@ -0,0 +1,13 @@
|
||||
# Context: Daily Performance & Docs Audit - 2026-02-15
|
||||
|
||||
## Goal
|
||||
Improve app responsiveness and ensure documentation accuracy regarding upload/contribution.
|
||||
|
||||
## Scope
|
||||
- Identify performance bottlenecks (CPU/Network).
|
||||
- Audit `content/` docs against `js/` implementation.
|
||||
- Apply small, safe fixes.
|
||||
|
||||
## Assumptions
|
||||
- We are on `unstable` branch (implied by agent prompt, though I should check).
|
||||
- Node.js environment is ready.
|
||||
@@ -0,0 +1,18 @@
|
||||
# Context: Explore Data Service Performance Optimization
|
||||
|
||||
**Goal**: Reduce background CPU and battery usage by pausing `ExploreDataService` updates when the tab is hidden.
|
||||
|
||||
**Scope**:
|
||||
- `js/services/exploreDataService.js`
|
||||
|
||||
**Problem**:
|
||||
- The service runs two `setInterval` timers (1 minute and 5 minutes) to refresh watch history counts and tag IDF.
|
||||
- These run even when the tab is hidden or minimized, consuming resources unnecessarily.
|
||||
|
||||
**Proposed Solution**:
|
||||
- Modify the interval callbacks to check `document.hidden`. If true, skip the update.
|
||||
- Add a `visibilitychange` listener to trigger an immediate update when the tab becomes visible (if the data is stale).
|
||||
|
||||
**Assumptions**:
|
||||
- `document.hidden` is supported in target browsers (modern browsers support it).
|
||||
- Users do not need real-time updates for "explore" data when the tab is not visible.
|
||||
@@ -0,0 +1,22 @@
|
||||
# Context: Content Audit & Bug Fix
|
||||
|
||||
**Agent:** content-audit-agent
|
||||
**Date:** 2026-02-18
|
||||
**Goal:** Audit `content/docs/guides/upload-content.md` against codebase. Fix identified bug in NIP-71 hashtag handling.
|
||||
|
||||
## Scope
|
||||
- `content/docs/guides/upload-content.md`
|
||||
- `js/services/videoNotePayload.js`
|
||||
- `js/ui/components/UploadModal.js`
|
||||
- `components/upload-modal.html`
|
||||
|
||||
## Identified Issue
|
||||
Hashtags entered in the Upload Modal are collected as `{ t: [...] }` by `Nip71FormManager` (due to `data-nip71-list="t"`).
|
||||
However, `videoNotePayload.js`'s `normalizeNip71Metadata` only looks for `rawMetadata.hashtags`.
|
||||
This causes user-entered hashtags to be dropped during payload construction.
|
||||
|
||||
## Plan
|
||||
1. Inventory and verify all claims in `upload-content.md`.
|
||||
2. Create a unit test to reproduce the hashtag bug.
|
||||
3. Fix the bug in `videoNotePayload.js` to support `t` alias.
|
||||
4. Verify fix with tests.
|
||||
@@ -0,0 +1 @@
|
||||
# Context for Constants Refactor\n\nTimestamp: 20260217_205312\nBranch: unstable\nCommit: 65d82e578faf6c46ee7d2b6c61d93105c6f4c855\nNode: v22.22.0\nNPM: 11.7.0\n\nGoal: Find duplicated numeric constants in js/ and replace with canonical definitions.
|
||||
Reference in new issue
Block a user