Commit Graph
2665 Commits
Author SHA1 Message Date
thePR0M3TH3AN 53cb2e32ac Merge pull request #1100 from PR0M3TH3AN/codex/remove-legacy-subscription-kind-logic
Remove legacy subscription kind handling
2026-01-06 16:09:49 -05:00
thePR0M3TH3AN cc49f41356 Remove legacy subscription kind handling 2026-01-06 16:03:38 -05:00
thePR0M3TH3AN d0e7f3915a Merge pull request #1099 from PR0M3TH3AN/codex/remove-legacy-video-filter-support
Remove legacy view filter flag
2026-01-06 15:59:39 -05:00
thePR0M3TH3AN bc8bfd1ed5 Remove legacy view filter flag 2026-01-06 15:36:37 -05:00
thePR0M3TH3AN 860c12cc94 Merge pull request #1098 from PR0M3TH3AN/codex/remove-nostr.js-and-update-imports
Remove nostr compatibility shim
2026-01-06 15:33:47 -05:00
thePR0M3TH3AN 3996986e63 Remove nostr shim and retarget imports 2026-01-06 15:32:21 -05:00
thePR0M3TH3AN 5d22d78717 Merge pull request #1097 from PR0M3TH3AN/fix-sw-cancel-404-17695042221773744950
Fix 404 on Service Worker cancel route
2026-01-06 15:16:24 -05: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
thePR0M3TH3AN b6e9b39639 Merge pull request #1096 from PR0M3TH3AN/remove-legacy-compatibility-5472225536939981684
Remove legacy compatibility systems
2026-01-06 14:54:54 -05:00
google-labs-jules[bot] 1b577d3326 Refactor: remove legacy compatibility systems
- Removed `WATCH_HISTORY_LEGACY_KIND` (30078) support from watch history fetch and config.
- Removed `WATCH_HISTORY_LEGACY_LIST_IDENTIFIERS` from config.
- Removed `LEGACY_EVENTS_STORAGE_KEY` (bitvidEvents) migration logic from client.
- Removed `loadLegacyAdminState` and `LEGACY_STORAGE_KEYS` from admin list store.
- Updated tests to remove references to legacy kinds.
2026-01-06 19:48:55 +00:00
thePR0M3TH3AN cf4dc211ab Merge pull request #1095 from PR0M3TH3AN/fix/watch-history-reliability-8303262170109715615
Migrate Watch History to Kind 30003
2026-01-06 14:08:31 -05:00
google-labs-jules[bot] b3aeb95a0b Fix watch history reliability by migrating to Kind 30003
Migrates watch history persistence from Kind 30078 (Application Data) to Kind 30003 (Bookmark List) to resolve blocking issues on some relays. Updates fetch logic to query both kinds for backward compatibility.
2026-01-06 19:03:03 +00:00
thePR0M3TH3AN 2537296f67 Merge pull request #1094 from PR0M3TH3AN/fix-watch-history-sync-16297973671610705117
Fix watch history sync for logged-in users without NIP-04 permissions
2026-01-06 13:48:56 -05:00
google-labs-jules[bot] eff9dfed85 Fix watch history sync for logged-in users without NIP-04 permissions.
Updates `shouldUseExtensionForHistory` in `js/watchHistoryService.js` to check for `signEvent` instead of `nip04.decrypt`. This ensures that logged-in users can sync their watch history (which is now plaintext) even if they haven't granted the legacy encryption permission.
2026-01-06 18:38:21 +00:00
thePR0M3TH3AN a0f900a8bc Merge pull request #1093 from PR0M3TH3AN/update-agents-nip33-lessons-2091289447712768239
Add NIP-33 addressing lessons to AGENTS.md
2026-01-06 09:38:15 -05:00
google-labs-jules[bot] c621d9ad50 doc: add NIP-33 addressing lessons to AGENTS.md
Adds a new section to `AGENTS.md` documenting the importance of using
the `d` tag (network identifier) over logical IDs (like `videoRootId`)
when creating pointers for parameterized replaceable events (NIP-33).
This captures the lessons learned from recent watch history bugs where
mismatched identifiers caused hydration failures.
2026-01-06 14:37:33 +00:00
thePR0M3TH3AN 8d6327c951 Merge pull request #1092 from PR0M3TH3AN/fix-watch-history-pointer-447070525374806935
Fix watch history hydration failure due to incorrect pointer identifier
2026-01-06 09:30:41 -05:00
google-labs-jules[bot] f9ce798332 Prioritize d tag in video pointer resolution
When creating address pointers (`a` tags) for watch history, `resolveVideoPointer` was incorrectly prioritizing `videoRootId` over the actual NIP-33 `d` tag. If these values differed (common in newly published videos), the resulting pointer would reference a non-existent identifier, causing subsequent hydration to fail.

This change swaps the order to prioritize the `d` tag, ensuring watch history entries use the correct addressable identifier.
2026-01-06 14:27:26 +00:00
thePR0M3TH3AN 981c08f752 Merge pull request #1091 from PR0M3TH3AN/fix-watch-history-hydration-2892610551779905552
Fix watch history hydration by preserving relay hints
2026-01-06 09:18:37 -05: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
thePR0M3TH3AN a613d2d99f Merge pull request #1090 from PR0M3TH3AN/watch-history-robust-hydration-16241675443305279557
Fix watch history hydration by prioritizing readRelays
2026-01-06 09:01:12 -05:00
google-labs-jules[bot] 386ddea44a Enhance watch history hydration with relay hints and verbose logging
The watch history hydration process was sometimes failing to retrieve video metadata, resulting in "Untitled video" cards. This was primarily due to only querying the generic relay list and potentially missing content hosted on specific relays.

This commit improves the robustness of `createWatchHistoryHydrationStage` in `js/feedEngine/watchHistoryFeed.js` by:
1.  Collecting unique relay hints from the pointer objects (`item.pointer.relay`) of items needing hydration.
2.  Merging these hints with the user's `readRelays` (or fallback `relays`) list. This ensures that if a specific video is known to exist on a niche relay, that relay is queried during the metadata fetch.
3.  Replacing conditional debug logging with `devLogger.info` and `devLogger.warn` to provide detailed insights into the hydration process (item counts, selected relays, generated filters, and fetch results), aiding in future diagnosis.

These changes ensure the application attempts to fetch metadata from all relevant sources indicated by the history data itself.
2026-01-06 13:30:51 +00:00
google-labs-jules[bot] b03d96f041 Add verbose logging and fix relay selection for watch history hydration
The watch history hydration stage was failing silently when relay connections were unstable or misconfigured. This commit:
1. Replaces the conditional debug logger with `devLogger.info` and `devLogger.warn` to ensure visibility of critical hydration steps.
2. Adds detailed logging for item counts, missing ID/address lists, filter generation, and fetch results.
3. Updates the relay selection logic to prioritize `nostrClient.readRelays` over `nostrClient.relays`. This ensures that hydration attempts query the user's specific read-configured relays, which is crucial for fetching metadata when generic relays may be write-only or restricted.

These changes aid in diagnosing "Untitled video" issues and improve the robustness of the metadata fetch process.
2026-01-06 13:18:32 +00:00
google-labs-jules[bot] 93c88704e0 Fix watch history hydration by prioritizing readRelays
The `createWatchHistoryHydrationStage` in the feed engine was incorrectly relying solely on `nostrClient.relays` for network fetches. This could cause hydration failures if `relays` contained write-only servers or was otherwise restricted. This commit updates the logic to prioritize `nostrClient.readRelays` if available, falling back to `nostrClient.relays`. This ensures that hydration attempts query the correct relays configured for reading data.

Fixes an issue where watch history items would display as "Untitled video" due to failed metadata resolution.
2026-01-06 13:11:39 +00:00
thePR0M3TH3AN 66bfc44cb6 Merge pull request #1089 from PR0M3TH3AN/bugfix/watch-history-address-hydration-5278898199442386077
Fix watch history hydration for address pointers
2026-01-06 07:57:45 -05:00
google-labs-jules[bot] 7312fa4fa4 Fix watch history hydration using local cache and address support
Updated `createWatchHistoryHydrationStage` in `js/feedEngine/watchHistoryFeed.js` to first check `nostrClient.allEvents` for video data before querying relays. This ensures that recently watched videos (which are already in memory) are instantly hydrated in the watch history list, fixing the "Untitled video" issue.

Additionally, implemented robust support for hydrating address pointers (`type: 'a'`) by scanning the cache and constructing proper relay filters for missing items. This covers cases where history items reference videos by `kind:pubkey:d-tag` rather than ID.
2026-01-06 04:06:44 +00:00
google-labs-jules[bot] 914e0abc58 Fix watch history hydration for address pointers with colons
Updated `createWatchHistoryHydrationStage` in `js/feedEngine/watchHistoryFeed.js` to properly handle and hydrate watch history items that use address pointers (type 'a'), specifically fixing a bug where d-tags containing colons were being ignored.

Previously, only event ID pointers (type 'e') were being hydrated, and an initial fix for addresses failed for d-tags with colons. This change robustly parses address pointers, constructs appropriate filters, fetches the events, and correctly maps them back to the history items using a `normalizeAddressKey` utility that handles mixed-case pubkeys and complex d-tags.
2026-01-06 03:43:08 +00:00
google-labs-jules[bot] 1f54745840 Fix watch history hydration for address pointers
Updated `createWatchHistoryHydrationStage` in `js/feedEngine/watchHistoryFeed.js` to properly handle and hydrate watch history items that use address pointers (type 'a').

Previously, only event ID pointers (type 'e') were being hydrated, causing videos watched via address pointers to display as "Untitled video" with missing metadata. This change parses the address pointers, constructs appropriate filters (normalizing pubkeys to lowercase while preserving d-tag case), fetches the events, and correctly maps them back to the history items using a robust `normalizeAddressKey` utility.
2026-01-06 03:23:45 +00:00
google-labs-jules[bot] 5724ec4e1e Fix watch history hydration for address pointers
Updated `createWatchHistoryHydrationStage` in `js/feedEngine/watchHistoryFeed.js` to properly handle and hydrate watch history items that use address pointers (type 'a').

Previously, only event ID pointers (type 'e') were being hydrated, causing videos watched via address pointers to display as "Untitled video" with missing metadata. This change parses the address pointers, constructs appropriate filters, fetches the events, and correctly maps them back to the history items.
2026-01-06 02:51:18 +00:00
thePR0M3TH3AN ae37652e70 Merge pull request #1088 from PR0M3TH3AN/fix-missing-session-actor-for-anonymous-users-1168164604446584559
Fix missing session actor for anonymous users
2026-01-05 21:40:43 -05:00
google-labs-jules[bot] a7b3f5572b Fix missing session actor for anonymous users
- Update `mintSessionActor` in `js/nostr/client.js` to support `nostr-tools` v2 `generateSecretKey` and properly handle `getPublicKey` input (hex vs bytes).
- Ensure `ensureSessionActor` awaits `ensureNostrTools()` before attempting to mint a new actor.
- This resolves the issue where video view events and watch history updates failed for non-logged-in users with a "missing-actor" error.
2026-01-06 02:38:56 +00:00
thePR0M3TH3AN 4bc2eee9fe Merge pull request #1087 from PR0M3TH3AN/fix-console-log-spam-issues-1377412273382264295
fix(nostr): restore video grid loading and session actor creation
2026-01-05 21:28:29 -05:00
thePR0M3TH3AN f0c533efb6 Merge pull request #1086 from PR0M3TH3AN/revert-1085-fix-console-log-spam-issues-1377412273382264295
Revert "fix(logs): suppress dm sync spam and allow local image paths"
2026-01-05 21:26:58 -05:00
thePR0M3TH3AN 8a4e4754f2 Revert "fix(logs): suppress dm sync spam and allow local image paths" 2026-01-05 21:26:32 -05:00
google-labs-jules[bot] 1f001c23d2 fix(nostr): restore video grid loading and session actor creation 2026-01-06 02:21:00 +00:00
thePR0M3TH3AN 9e685b6b6a Merge pull request #1085 from PR0M3TH3AN/fix-console-log-spam-issues-1377412273382264295
fix(logs): suppress dm sync spam and allow local image paths
2026-01-05 16:44:03 -05:00
google-labs-jules[bot] c64d70ad88 fix(nostr): restore session actor creation for view counts 2026-01-05 21:41:58 +00:00
google-labs-jules[bot] 5ed5554f51 fix(logs): suppress dm sync spam and allow local image paths 2026-01-05 21:23:32 +00:00
thePR0M3TH3AN b24aac7349 dev mode on 2026-01-05 16:16:38 -05:00
thePR0M3TH3AN 7dbedf0438 Merge pull request #1084 from PR0M3TH3AN/fix-view-counter-reliability-11006209744575726503
Retain stale view counts to prevent display regression
2026-01-05 16:14:47 -05:00
google-labs-jules[bot] acd2104067 Fix(startup): Defer trusted seed bootstrapping until after Nostr init
- Moves `bootstrapTrustedSeeds` logic from `js/bootstrap.js` to a new service `js/services/trustBootstrap.js`.
- Updates `js/app.js` to explicitly await `nostrClient.init()` before calling `bootstrapTrustedSeeds()`, resolving race conditions where admin lists were fetched before the relay pool was ready.
- Ensures `waitForRelaysReady` checks for `nostrClient.pool` existence.
2026-01-05 21:12:04 +00:00
google-labs-jules[bot] ac071cb74e Fix(viewCounter): Retain stale view counts for smoother hydration
- Removes the logic in `restoreCacheSnapshot` that deleted cached view counts if they were older than `VIEW_COUNT_CACHE_TTL_MS`.
- Updates `tests/view-counter.test.mjs` to assert that stale cache data is preserved and used as a baseline during hydration, preventing view counts from dropping to zero or lower fallback values during network issues.
2026-01-05 21:01:53 +00:00
thePR0M3TH3AN 5ad9dee85b Merge pull request #1083 from PR0M3TH3AN/watch-history-hydration-improvement-14056519037250996205
Implement video hydration stage for watch history feed
2026-01-05 15:47:30 -05:00
google-labs-jules[bot] 99c3f60a23 feat: implement video hydration stage for watch history feed
This introduces a new stage in the watch history feed pipeline that fetches missing video metadata from relays. Since watch history storage was optimized to store only event IDs, this hydration step ensures that the UI can display titles and thumbnails without requiring them to be persisted in the history payload itself.

- Implemented `createWatchHistoryHydrationStage` in `js/feedEngine/watchHistoryFeed.js`.
- Integrated `convertEventToVideo` to transform fetched events into usable video objects.
- Added a comprehensive integration test in `tests/watch-history.test.mjs` verifying the full flow from ID-only storage to hydrated feed items.
2026-01-05 20:22:34 +00:00
thePR0M3TH3AN 23316d28ba Merge pull request #1082 from PR0M3TH3AN/watch-history-monthly-pagination-18371774738792903843
Implement monthly watch history pagination and backend support
2026-01-05 15:03:18 -05:00
google-labs-jules[bot] 27d80ff070 feat: implement monthly watch history pagination
- Updated `js/historyView.js` to load history month-by-month and implement infinite scroll.
- Updated `js/watchHistoryService.js` and `js/nostr/watchHistory.js` to support fetching specific monthly buckets (`YYYY-MM`).
- Updated `js/nostr/client.js` to expose `fetchWatchHistoryMonth`.
- Updated `views/history.html` copy to reflect monthly/server-side storage and remove references to local caching/encryption.
- Ensure item removal targets the correct monthly bucket.
2026-01-05 20:00:59 +00:00
thePR0M3TH3AN d337fb90ad Merge pull request #1081 from PR0M3TH3AN/update-history-view-copy-11310022164629372395
Update history view copy for event ID-only tracking
2026-01-05 14:21:14 -05:00
google-labs-jules[bot] 89ce081453 Update history view copy to reflect event ID-only tracking
- Rename "Clear local cache" button to "Clear local history"
- Update info text to remove references to hydrating from session/caches
- Simplify copy to remove "encrypted" references in favor of "syncing" or "history"
- Update success/error messages to match new terminology
2026-01-05 19:17:51 +00:00
thePR0M3TH3AN f7fa86682f Merge pull request #1080 from PR0M3TH3AN/remove-metadata-toggle-history-1300345743199644564
Remove metadata toggle from watch history pane
2026-01-05 14:08:58 -05:00
google-labs-jules[bot] 3096f02e40 Remove metadata toggle from watch history pane
Removed the metadata toggle UI and related logic from the watch history implementation.
- Updated `components/profile-modal.html` to remove the UI block.
- Cleaned up `js/ui/profileModalController.js` and `js/historyView.js` to drop metadata preference state and handlers.
- Updated `tests/watch-history.test.mjs` to remove obsolete test cases referencing `metadataPreference`.
2026-01-05 18:56:58 +00:00