Commit Graph
2696 Commits
Author SHA1 Message Date
google-labs-jules[bot] a54d5db263 Fix: Add timeout to pool.list shim to prevent hydration hanging
When relays fail to connect or do not send EOSE, the legacy `pool.list` shim
would hang indefinitely, blocking watch history hydration.
This change adds a timeout (default 7000ms) to ensure it returns whatever events
it has collected, preventing the UI from getting stuck.
2026-01-07 14:46:35 +00:00
thePR0M3TH3AN 425f772fcc Merge pull request #1118 from PR0M3TH3AN/fix-watch-history-dynamic-refresh-8086273073608034739
Fix Watch History Dynamic Pulling and Add Refresh Button
2026-01-07 09:34:18 -05:00
google-labs-jules[bot] c322fcee14 fix(watch-history): add manual refresh and fix dynamic pulling
This commit addresses issues with the watch history not updating dynamically and adds a manual refresh mechanism.

Changes:
- Added a "Refresh" button to the watch history view in `views/history.html` and `js/historyView.js`.
- Updated `watchHistoryService.js` to accept a `forceRefresh` option in `loadLatest`, which bypasses the cache freshness check and triggers a relay fetch.
- Updated `js/feedEngine/watchHistoryFeed.js` to propagate the `forceRefresh` flag from the runtime context to the service.
- Added user feedback (toast messages and logs) for "Clear Local History" and "Republish Now" actions.
- Updated `tests/watch-history.test.mjs` to align with the new `fetchHistory` signature.
2026-01-07 14:05:21 +00:00
thePR0M3TH3AN a5994f1380 Merge pull request #1117 from PR0M3TH3AN/fix-zap-signing-compatibility-17075194725684270757
Fix zap signing compatibility with nostr-tools v2
2026-01-07 08:46:25 -05:00
google-labs-jules[bot] 270d55cc7c Fix "NostrTools is required" error during zap signing
This patch updates `js/payments/zapSplit.js` and `js/payments/nwcClient.js` to replace legacy manual event signing (which relied on `nostr-tools` v1 methods `getEventHash` and `signEvent` that are missing in v2) with the centralized `signEventWithPrivateKey` helper from `js/nostr/publishHelpers.js`. This ensures compatibility with the installed `nostr-tools` version and resolves the error preventing zaps.
2026-01-07 13:39:52 +00:00
thePR0M3TH3AN 5dbeb6bce7 Merge pull request #1116 from PR0M3TH3AN/codex/refactor-comment-handling-in-video-modal
Rebuild comment tree on append to correctly place replies
2026-01-06 22:32:52 -05:00
thePR0M3TH3AN 2b3064d447 Rebuild comment tree on append 2026-01-06 22:30:23 -05:00
thePR0M3TH3AN a0a7ad66f7 Merge pull request #1115 from PR0M3TH3AN/codex/refactor-commentthreadservice-for-better-performance
Start comment thread subscription before fetch and emit early snapshot
2026-01-06 22:27:17 -05:00
thePR0M3TH3AN 26a1f996f6 Start comment thread live subscription early 2026-01-06 22:25:01 -05:00
thePR0M3TH3AN 28357622dd Merge pull request #1114 from PR0M3TH3AN/dynamic-comment-loading-81869577663870782
Enable dynamic comment loading and sorting
2026-01-06 22:10:04 -05:00
google-labs-jules[bot] 41ff140982 feat: enable dynamic comment loading and sorting 2026-01-07 03:03:46 +00:00
thePR0M3TH3AN 771a748530 Merge pull request #1112 from PR0M3TH3AN/fix-video-modal-comments-init-13683799382760906477
Fix video modal comments not displaying on first open
2026-01-06 20:10:01 -05:00
google-labs-jules[bot] cced268982 Fix: Ensure comments controller is initialized when opening video modal
This addresses an issue where comments would not display on the first load of the video modal if the DOM elements were not fully bound. The `open()` method now checks if the `commentsList` is missing or disconnected and re-initializes the `CommentsController` if necessary.

Also updated `tests/video-modal-accessibility.test.mjs` to fix a JSDOM environment issue with `navigator` mocking.
2026-01-07 00:59:47 +00:00
thePR0M3TH3AN 5afa9d909e Merge pull request #1111 from PR0M3TH3AN/view-count-persistence-16659278447230737169
Fix view count persistence and enforce monotonic updates
2026-01-06 19:44:09 -05:00
google-labs-jules[bot] 4ab81ce28e Ensure view counts are monotonic during hydration
- Updated `hydratePointer` in `js/viewCounter.js` to only update local view counts if the network count is strictly greater (or if local state is uninitialized).
- This prevents regressions where a partial or stale network response would overwrite a higher, accurate local count.
- Updated `tests/view-counter.test.mjs` to reflect that fresh view events are additive to the cached high watermark (fixing a test expectation that relied on the old non-monotonic behavior).
- Updated `tests/view-counter.test.mjs` to match `resolveVideoPointer` behavior which prioritizes `dTag` (NIP-33) over `videoRootId`, fixing a legacy test failure.
2026-01-07 00:43:18 +00:00
thePR0M3TH3AN 264164917b Merge pull request #1110 from PR0M3TH3AN/fix/watch-history-sort-10801569047890667699
fix: enforce descending sort order for watch history
2026-01-06 19:33:09 -05:00
google-labs-jules[bot] f2f55830e8 fix: ensure watch history is sorted by most recent first
- Enforce descending month order in `js/nostr/watchHistory.js` by explicitly sorting keys before flattening buckets.
- Update `js/feedEngine/watchHistoryFeed.js` and `js/historyView.js` to use `video.created_at` as a fallback sort key when `watchedAt` is missing or equal.
- Verified logic with `tests/verify_sort.mjs`.
2026-01-07 00:28:39 +00:00
thePR0M3TH3AN 9604fa9f34 Merge pull request #1108 from PR0M3TH3AN/update-auth-cache-documentation-and-tests-5284864776327767960
Cleanup legacy auth cache docs and verify removal
2026-01-06 19:20:28 -05:00
google-labs-jules[bot] f5eba4121f Remove legacy auth cache migration docs and add regression test
Removes obsolete "Migration notes" from `docs/nostr-auth.md` and
adds a regression test to `tests/state/cache-saved-profiles.test.mjs`
to confirm that the legacy `userPubKey` localStorage key is ignored
during startup. Also polyfills localStorage for the test suite.
2026-01-07 00:20:01 +00:00
thePR0M3TH3AN ad961cd401 Merge pull request #1107 from PR0M3TH3AN/fix-watch-history-persistence-5159309756692565654
Fix watch history persistence reliability
2026-01-06 19:14:15 -05:00
google-labs-jules[bot] 873b534867 fix(watch-history): use localStorage for pending video queue
Replace sessionStorage with localStorage to ensure pending watch history updates persist across tab closures and sessions. Update `loadLatest` to always restore queue state on initialization to catch any pending uploads.
2026-01-07 00:11:56 +00:00
thePR0M3TH3AN b7468e0047 Merge pull request #1105 from PR0M3TH3AN/codex/update-watch-history-configuration-and-cleanup
Simplify watch history pipeline
2026-01-06 18:59:09 -05:00
thePR0M3TH3AN 891226697d Simplify watch history pipeline 2026-01-06 18:53:27 -05:00
thePR0M3TH3AN bd5d5e9a87 Merge pull request #1104 from PR0M3TH3AN/remove-legacy-magnet-v1-588594441526327119
Remove legacy V1 magnet support
2026-01-06 18:45:36 -05:00
google-labs-jules[bot] 4df81f7f19 Remove legacy V1 magnet and unstructured event support
Removed the `ACCEPT_LEGACY_V1` flag and associated logic that supported parsing magnet links from unstructured text notes or tags, as well as support for video events with version < 2.
This simplifies `js/videoEventUtils.js` and `js/nostr/nip71.js`, and removes legacy regex scanning.
Deleted `tests/legacy-infohash.test.mjs` which tested this deprecated functionality.
2026-01-06 21:34:19 +00:00
thePR0M3TH3AN 264f4204fe Merge pull request #1103 from PR0M3TH3AN/codex/remove-lowercase-tag-filters-in-commentevents
Use uppercase tags for comment events
2026-01-06 16:23:58 -05:00
thePR0M3TH3AN 6482195462 Merge pull request #1102 from PR0M3TH3AN/docs-update-agents-md-dm-support-10714215179727705300
Add NIP-04 and NIP-44 dual support policy to AGENTS.md
2026-01-06 16:23:18 -05:00
thePR0M3TH3AN 5979d4e25f Use uppercase tags for comment events 2026-01-06 16:22:49 -05:00
google-labs-jules[bot] 228ce1694f docs: Add NIP-04/NIP-44 dual support policy to AGENTS.md
Update AGENTS.md to explicitly require support for both legacy NIP-04 and newer NIP-44 Direct Messages, as many users still rely on the legacy standard.
2026-01-06 21:22:06 +00:00
thePR0M3TH3AN 90e5c745d3 Merge pull request #1101 from PR0M3TH3AN/codex/refactor-hashtagpreferencesservice-to-use-canonical-kind
Remove legacy hashtag preference fallback
2026-01-06 16:14:39 -05:00
thePR0M3TH3AN 4caa4d4877 Remove legacy hashtag preference fallback 2026-01-06 16:14:26 -05:00
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