Commit Graph
427 Commits
Author SHA1 Message Date
google-labs-jules[bot] 24814a7fd4 refactor(ai): extract SimilarContentController from js/app.js (agent)
Moved `computeSimilarContentCandidates` and `updateModalSimilarContent` logic to a new controller `js/ui/similarContentController.js` to improve separation of concerns. `js/app.js` now delegates these operations to the controller via thin wrappers. Added unit tests for the extracted logic.
2026-01-20 03:56:41 +00:00
google-labs-jules[bot] 1f0bc2d87e chore(ai): convert tag-preference TODOs to architectural notes
Convert `TODO(tag-preferences)` comments in `js/app.js` to permanent `Note:` comments.
These TODOs were architectural reminders about keeping tag-preference filtering consolidated
in `createTagPreferenceFilterStage`, rather than actionable tasks requiring code changes.
Reclassifying them as notes preserves the context without cluttering the TODO list.
2026-01-20 01:38:52 +00:00
thePR0M3TH3AN d45d380e40 Improve DM unread indicators and profile modal layout 2026-01-19 15:09:35 -05:00
thePR0M3TH3AN 225c6a1674 Add unread DM badge to profile button 2026-01-19 14:57:10 -05:00
thePR0M3TH3AN 3c75ac8c3f Add DM read receipts and typing indicators 2026-01-19 13:29:40 -05:00
thePR0M3TH3AN 924ed9b482 Add DM privacy indicators and relay hint publishing 2026-01-19 10:56:54 -05:00
thePR0M3TH3AN 51b550adaa Improve DM relay selection fallback handling 2026-01-19 10:31:13 -05:00
thePR0M3TH3AN 4566c96330 Add NIP-17 DM delivery option 2026-01-19 10:05:00 -05:00
thePR0M3TH3AN eb52fbdf11 Add DM recipient handling in profile modal 2026-01-19 09:22:35 -05:00
google-labs-jules[bot] 4ca984f673 refactor(ai): extract TagPreferenceMenu from js/app.js (agent)
Moved tag preference menu logic into `js/ui/tagPreferenceMenuController.js`.
Kept `js/app.js` interface intact via thin wrappers.
Added unit tests covering new controller.
Followed AGENTS.md refactor checklist.
2026-01-19 03:43:25 +00:00
google-labs-jules[bot] 5c65c44db3 feat: Remove hashtag pills from For You page
- Updated `For You` page to rely on feed engine filtering for tag preferences.
- Removed the `recentVideoTags` HTML element from `views/for-you.html`.
- Updated `js/app.js` and `js/ui/videoListViewController.js` to optionally skip finding the `recentVideoTags` element.
- Updated `loadForYouVideos` in `js/app.js` to explicitly skip `recentVideoTags`.
- Confirmed feed logic via `tests/feed-engine/tag-preference-filter.test.mjs`.
- Verified UI changes via Playwright.
2026-01-19 02:33:17 +00:00
thePR0M3TH3AN c9dbe1e3e7 Adjust auth-driven view routing 2026-01-18 20:31:30 -05:00
thePR0M3TH3AN f70217003d Adjust default view selection for auth state 2026-01-18 20:25:30 -05:00
thePR0M3TH3AN 4abcba8de5 Refine for-you tag preference runtime 2026-01-18 20:22:07 -05:00
thePR0M3TH3AN 6a9bbc20f5 Remove tag preference filtering from recent feed 2026-01-18 20:19:10 -05:00
thePR0M3TH3AN d7116b08a6 Add for-you link resolution in app chrome 2026-01-18 20:10:33 -05:00
thePR0M3TH3AN 29b18103ac Add for-you feed telemetry events 2026-01-18 14:37:01 -05:00
thePR0M3TH3AN dba666b751 Add for-you feed pipeline support 2026-01-18 14:02:35 -05:00
thePR0M3TH3AN 7a29a0b807 Consolidate tag preference filtering stage 2026-01-18 13:38:34 -05:00
thePR0M3TH3AN 0ac64867da Add shared hashtag normalization helper 2026-01-18 13:35:34 -05:00
google-labs-jules[bot] 45b20bb58e refactor(ai): extract updateTorrentStatus from js/app.js (agent)
Moved torrent status update logic to `js/ui/torrentStatusController.js` to improve separation of concerns as per `AGENTS.md`. The controller accepts a `getVideoModal` accessor and an `onRemovePoster` callback to decouple it from direct `videoModal` or `Application` dependencies. Added unit tests in `tests/ui/torrentStatusController.test.mjs`.
2026-01-18 03:11:25 +00:00
thePR0M3TH3AN 5c3230074e Add moderation override tracking by author and content 2026-01-16 13:50:32 -05:00
thePR0M3TH3AN 3a3339a57a Add per-category trusted mute thresholds 2026-01-16 10:49:32 -05:00
google-labs-jules[bot] d04e64d713 feat: ensure storage keys clear on auth change and UI reflects provider
- Added `bitvid:auth-changed` listener in `js/app.js` to trigger `storageService.lock()` and refresh `UploadModal`.
- Implemented `refreshState()` in `js/ui/components/UploadModal.js` to manage secure storage unlocking, sensitive data clearing, and dynamic provider metadata loading.
- Updated `js/ui/profileModalController.js` to prioritize default storage connections and display the provider name (e.g., "Unlocked (R2)") in the status text.
- Ensured sensitive configuration data is nulled out when storage is locked.
2026-01-16 04:06:49 +00:00
google-labs-jules[bot] dae7bfed8b Fix trusted mute hide threshold logic on home feed
- Ensure 'decorateVideoModeration' in 'js/app.js' respects the feed policy bypass logic (simulating server-side behavior).
- Pass 'feedContext' (feedName, feedVariant) to 'decorateVideoModeration' from 'refreshVisibleModerationUi' and 'handleModerationSettingsChange'.
- This prevents videos on the Home feed from being strictly hidden (removed from DOM) when the "Hide after trusted mutes" threshold is met, ensuring they remain visible but blurred as expected by the bypass policy.
- Verified with reproduction script that 'hidden' becomes false and 'blurThumbnail' remains true on Home feed context.
2026-01-16 02:43:03 +00:00
google-labs-jules[bot] 9b75a76ad7 streamline homepage loading by preventing list clear on update 2026-01-16 00:32:53 +00:00
thePR0M3TH3AN 815664ee3c Avoid resetting playback on same source toggle 2026-01-15 12:13:01 -05:00
thePR0M3TH3AN 72ee5b9f2b Guard source toggle with CDN/peer availability 2026-01-15 11:49:01 -05:00
thePR0M3TH3AN f74ebfe6f4 Use modal video for source switching 2026-01-15 11:37:02 -05:00
thePR0M3TH3AN ae62b4ea59 Normalize profile pubkey inputs 2026-01-14 20:32:30 -05:00
thePR0M3TH3AN 5c2d7133e6 Handle npub inputs in goToProfile 2026-01-14 20:28:12 -05:00
google-labs-jules[bot] 6c3ac4d49f Implement video source toggle (CDN vs P2P)
- Added source toggle UI in `components/video-modal.html`.
- Updated `VideoModal.js` to manage toggle visibility (only when both URL and Magnet exist), update peer/server counts, and dispatch `playback:switch-source` events.
- Updated `PlaybackService.js` to support a `forcedSource` option, allowing bypassing of the URL probe when "torrent" is forced.
- Updated `app.js` to listen for the toggle event and re-initialize playback with the forced source preference.
- Updated `tests/ui/helpers/jsdom-test-helpers.mjs` to expose necessary globals for JSDOM testing.
- Verified functionality with targeted updates and existing unit tests.
2026-01-14 21:18:46 +00:00
google-labs-jules[bot] 71a9eaf288 feat: add event details modal with edit history navigation
- Added `EventDetailsModal` to display raw JSON and metadata.
- Implemented `open-channel` action to navigate to creator profile.
- Fixed profile image loading by checking `creatorPicture` and `creator.picture`.
- Added `hideModal()` to `Application` class to fix crash in `openCreatorChannel`.
- Wired up "Event Details" menu option in video card menu.
- Ensured edit history is sorted Newest First for navigation.
2026-01-14 20:55:29 +00:00
google-labs-jules[bot] d3008d0bbe Fix: Sidebar 'Subscriptions' link remains hidden for logged-in users
The `resolveSubscriptionsLink` method in `js/app.js` cached the sidebar DOM element (`this.subscriptionsLink`) during initialization. However, the sidebar is re-rendered dynamically, causing the cached reference to point to a detached DOM node. Consequently, `applyAuthenticatedUiState` would update the visibility of the detached element, leaving the visible sidebar unchanged.

This fix updates `resolveSubscriptionsLink` to check `this.subscriptionsLink.isConnected`. If the cached element is detached, it re-queries the DOM to retrieve the current live element, ensuring visibility updates apply correctly.

Additionally, `js/index.js` now awaits `applicationReadyPromise` before hydrating the sidebar, preventing race conditions during startup. `js/nostr/toolkit.js` was updated to support function-based subscription closers, fixing potential leaks.
2026-01-13 16:58:45 +00:00
google-labs-jules[bot] bdc86aaef6 Fix future timestamp bug and improve loading spinner UX 2026-01-13 14:48:56 +00:00
google-labs-jules[bot] 14d7423e29 Remove blocking access control checks to fix slow initial video loading 2026-01-13 14:25:22 +00:00
google-labs-jules[bot] ef34d3cf02 Optimize startup by non-blocking moderation and relay init 2026-01-13 13:36:49 +00:00
google-labs-jules[bot] 29857dc36c Optimize application startup speed by parallelizing initialization 2026-01-13 04:21:13 +00:00
google-labs-jules[bot] ad0a9113f6 Improve edited video indicators and preserve publish date
- Update `VideoCard.js` to display "• Edited" instead of "(edited)" for better visual consistency.
- Update `app.js` to format the modal's "Last Edited" timestamp as "Last edited: [Absolute] ([Relative])".
- Ensure `EditModal.js` correctly backfills and preserves `published_at` to prevent date resets.
- Verify edit logic with existing tests.
2026-01-12 18:13:57 +00:00
google-labs-jules[bot] 782b5fe0b7 Fix: prevent published date reset when editing videos and show edited status
Prioritize `published_at` metadata over event `created_at` timestamp.
Backfill `published_at` during edit if missing to preserve original date.
Add "(edited)" label to video cards for modified content.
Display "Last Edited: [Date]" on video player modal.
2026-01-12 15:52:24 +00:00
google-labs-jules[bot] 1d3c827f62 Fix: prevent published date reset when editing videos and show edited status
Prioritize `published_at` metadata over event `created_at` timestamp.
Backfill `published_at` during edit if missing to preserve original date.
Add "(edited)" label to video cards for modified content.
Display "Last Edited: [Date]" on video player modal.
2026-01-12 15:35:23 +00:00
google-labs-jules[bot] c1779fba78 fix(moderation): enforce mute threshold for anonymous users 2026-01-11 21:43:02 +00:00
thePR0M3TH3AN db2b08378d Add session actor hook for moderation sync 2026-01-11 08:50:22 -05:00
thePR0M3TH3AN 4a4ffa45b4 Refresh feeds on admin blacklist changes for guests 2026-01-10 20:37:11 -05:00
thePR0M3TH3AN faaad9c724 Add session actor blacklist reconciliation 2026-01-10 20:33:15 -05:00
google-labs-jules[bot] c080b83108 feat: seed anonymous session actors with baseline block list
- Added `seedLocalBaseline` to `js/userBlocks.js` to merge admin blacklist into local block list for session actors.
- Implemented `_saveLocal` and `_loadLocal` in `js/userBlocks.js` to persist local-only block lists to `localStorage`.
- Updated `loadBlocks` to prioritize local storage for session actors, bypassing relay fetching when local data exists.
- Modified `js/app.js` to call `seedLocalBaseline` with the admin blacklist during initialization if the user is anonymous.
- Ensured `UserBlockListManager` correctly resolves `localStorage` in various environments (browser/test).
- Verified changes with `tests/user-blocks-local-seed.test.mjs`.
2026-01-10 22:19:54 +00:00
google-labs-jules[bot] d92cc58fc6 Fix: Enforce trusted mutes as blocks for anonymous users
Updates `js/app.js` to:
1.  Treat Trusted Seed mutes as hard blocks (`isAuthorBlocked` returns `true`) for anonymous users ("session actors"), ensuring strict filtering.
2.  Refresh the entire video grid (`refreshAllVideoGrids`) instead of just the UI (`refreshVisibleModerationUi`) when `trusted-mutes` events arrive for anonymous users, ensuring blocked content is removed dynamically once the lists load. This fixes a race condition where content might render before the block list is fully fetched.
2026-01-10 21:54:51 +00:00
google-labs-jules[bot] dc476392b2 Fix: Ensure UI refreshes upon trusted seed updates
Subscribes `js/app.js` to `moderationService` events (`trusted-mutes`, `user-blocks`, `summary`). This ensures that asynchronous updates to trusted seed block lists (Kind 10000) trigger an immediate UI refresh, correctly applying moderation (blur/hide) even for anonymous session actors who rely on these seeds. Previously, the initial render would complete before the async lists arrived, leaving blocked content visible until a page reload.
2026-01-10 21:37:43 +00:00
google-labs-jules[bot] b9cb33e36d Fix 404 error when cancelling service worker stream
Guards the `fetch("/webtorrent/cancel/")` call in `js/app.js` with a check for `navigator.serviceWorker.controller` and adds a `try...catch` block. This prevents the application from making a network request to a virtual route that doesn't exist on the server when the Service Worker is not active or controlling the page, eliminating "404 Not Found" errors in the console during cleanup.
2026-01-06 20:04:06 +00:00
google-labs-jules[bot] e6a6ea6f78 Fix watch history hydration by preserving relay hints
Ensures that the relay hint is preserved when recording a video view, allowing the hydration logic to fetch the video details from the correct relay.
- Updated `resolveVideoPointer` in `js/utils/videoPointer.js` to accept a `relay` argument.
- Updated `playVideoByEventId`, `checkUrlParams`, and `deriveVideoPointerInfo` in `js/app.js` to pass the relay hint when resolving the video pointer.
2026-01-06 14:12:59 +00:00