Commit Graph
1089 Commits
Author SHA1 Message Date
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] 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
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
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
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
google-labs-jules[bot] 4c7230f540 Remove metadata storage and handling from watch history
Removes the metadata argument from `WatchHistoryService.publishView` and cleans up the associated caching and resolution logic in `watchHistory.js` and `watchHistoryFeed.js`. Deletes `js/watchHistoryMetadata.js` as it is no longer used.

This simplification ensures watch history strictly manages pointers and timestamps, leaving metadata resolution to higher-level consumers. It also reduces the payload size and complexity of persisted history records.

Tests have been updated to reflect the API changes.
2026-01-05 16:58:59 +00:00
google-labs-jules[bot] ac3873e5d7 Refactor watch history service to use idempotent monthly upsert logic.
Removes legacy snapshot/chunk retry scheduling in favor of a monthly upsert approach.
Updates state persistence to remove `pendingSnapshotId`.
Fixes race condition in `scheduleRepublishForQueue` by using selective queue pruning.
Ensures data is not lost on publish failure in `snapshot`.
Updates tests to align with new architecture.
2026-01-05 15:42:48 +00:00
google-labs-jules[bot] e9ba3f6681 Refactor watch history to use plaintext monthly buckets
- Update `js/nostrEventSchemas.js` to remove encryption tagging and update schema for `WATCH_HISTORY`.
- Update `js/nostr/watchHistory.js` to:
  - Bump storage version to 4.
  - Bucket items by `YYYY-MM`.
  - Publish plaintext JSON payloads with only event IDs and timestamps.
  - Remove encryption logic from publishing.
  - Update fetching to handle plaintext and fallback to legacy parsing.
- Update `js/watchHistoryService.js` to strip metadata from queued items and handle new snapshot response.
- Update `tests/watch-history.test.mjs` to reflect new plaintext behavior and disabled obsolete tests.
2026-01-05 15:26:31 +00:00
google-labs-jules[bot] 8293caf6d3 Refactor watch history to use simplified monthly record schema 2026-01-05 14:44:45 +00:00
google-labs-jules[bot] 498d9cb5b2 Revise watch-history tags to use month IDs
Refactors the watch-history system to prioritize `YYYY-MM` month identifiers over legacy snapshot IDs in event tags, storage keys, and cross-module references. Updates event schemas, storage keying (v3), and client interfaces to align with the new month-based structure. Renames `snapshotId` parameters to `taskId` for republishing operations.
2026-01-05 14:21:53 +00:00
google-labs-jules[bot] cc25635ce6 Refactor watch history to use monthly buckets (v3)
Refactors `js/nostr/watchHistory.js` to store and publish watch history items in monthly buckets (`YYYY-MM`) instead of using chunk splitting. Updates storage version to 3, migrates existing data, and simplifies fetch/merge logic to handle monthly records. Removes legacy chunk rebalancing code. Updates tests to verify monthly bucketing behavior.
2026-01-05 14:11:57 +00:00
google-labs-jules[bot] 48d9ea60cb Refactor watch history to use monthly YYYY-MM records
- Updated `buildWatchHistoryPayload` to remove legacy `snapshotId` logic.
- Updated `publishSnapshot` to use `YYYY-MM` as the `d` tag identifier.
- Updated `fetch` logic to retrieve all history events (removing restrictive `#d` filter) to ensure complete history across months is loaded.
- Fixed a runtime error in `fetch` where `now` was undefined.
- Updated `js/nostrEventSchemas.js` to prioritize `monthIdentifier` for the `d` tag.
- Removed legacy `snapshot` field from payload serialization.
2026-01-05 03:41:30 +00:00
google-labs-jules[bot] a3c7536543 Refactor watch history to use month-centric context
- Rename `WATCH_HISTORY_CHUNK` schema to "Watch history monthly payload" in `js/nostrEventSchemas.js`.
- Update `js/nostr/watchHistory.js` to replace `snapshotId` with `recordId` and `monthIdentifier` in logging and error tracking context.
- Ensure `fetch` logic uses `recordId` and `month` in chunk decryption context for clarity.
- Fix indentation for added fields in logging objects.
2026-01-05 03:23:32 +00:00
google-labs-jules[bot] f2d0ce939a Update watch history normalization for monthly payload format
This change updates `normalizePointersFromPayload` to process both legacy `items` and new `events` arrays from the watch history payload. It also adds logic to merge `watchedAt` timestamps from a map, supporting the new monthly format. Additionally, `mergeWatchHistoryItemsWithFallback` is updated to rely on the unified `items` list and hydrate metadata from fallback items for all entries, ensuring robust handling of sparse event pointers.
2026-01-05 00:05:40 +00:00
google-labs-jules[bot] b79a8eb0d0 Refactor watch history to use monthly payload schema
* Redefine `parseWatchHistoryPayload` to support `month`, `events` (IDs), and `watchedAt` map.
* Update `mergeWatchHistoryItemsWithFallback` to merge new monthly fields with fallback items.
* Update `buildWatchHistoryPayload` to produce payloads with `events` instead of `items`.
* Update `WatchHistoryManager` to remove legacy chunk index handling.
* Ensure backward compatibility for legacy chunk payloads.
2026-01-04 22:15:27 +00:00
google-labs-jules[bot] 595d4cbe07 Refactor watch history to use single monthly event
Replaces the legacy chunked storage architecture with a single encrypted event per month.
- Renames `buildWatchHistoryChunkEvent` to `buildWatchHistoryEvent`.
- Updates `WatchHistoryManager` to publish and fetch single events, maintaining read compatibility for legacy chunks.
- Simplifies payload construction and removes chunk indexing logic.
- Updates tests to verify single-event publishing and legacy fallback.
2026-01-04 22:03:34 +00:00
google-labs-jules[bot] 34b835d4e1 Refactor watch history to use single monthly payload event
Replaces the chunked watch history implementation with a single monthly payload.
This simplifies the event structure and removes chunking logic while maintaining backward compatibility for reading legacy chunked events.
Updates `parseWatchHistoryPayload`, `buildWatchHistoryPayload`, `publishSnapshot` and `fetch` in `js/nostr/watchHistory.js`.
Updates tests to reflect the new single-event behavior.
2026-01-04 21:19:41 +00:00
thePR0M3TH3AN ba666bdaba Refactor watch history payload building 2026-01-03 13:57:46 -05:00
thePR0M3TH3AN 9b12cbcb6f Switch watch history schemas to month identifiers 2026-01-03 13:42:28 -05:00
thePR0M3TH3AN 006f561302 Simplify watch history messaging 2026-01-03 09:40:15 -05:00
thePR0M3TH3AN 6d719b7b6d Remove watch history metadata caching controls 2026-01-03 09:33:43 -05:00
thePR0M3TH3AN e9ce494ccd Remove watch history metadata caching 2026-01-03 09:11:26 -05:00
thePR0M3TH3AN db27c7f56a Refactor nostr event cache persistence 2026-01-02 15:33:51 -05:00
thePR0M3TH3AN ff07ed8e01 Add paging and limits to nostr video subscription 2026-01-02 14:11:41 -05:00
thePR0M3TH3AN 62c0c344e0 Reload modal comments on logout 2026-01-02 13:10:05 -05:00
thePR0M3TH3AN 34789d4752 Reset moderation settings on logout 2026-01-02 12:50:18 -05:00
thePR0M3TH3AN 40e8f436e6 Avoid trusted seed retry blocking app startup 2026-01-02 12:26:53 -05:00
thePR0M3TH3AN 9310929f0d Ensure trusted seeds hydrate before app creation 2026-01-02 12:18:57 -05:00
thePR0M3TH3AN 16539400e8 Ensure comment snapshots show in video modal on first open 2026-01-02 11:37:22 -05:00
thePR0M3TH3AN 2c8066fd9d Handle synchronous comment snapshots in video modal 2026-01-02 11:24:04 -05:00
thePR0M3TH3AN 9d859b07ed Render guest comment snapshots before auth gating 2026-01-02 11:08:28 -05:00
thePR0M3TH3AN a8119f5b43 Handle login-required comment visibility 2026-01-02 10:13:45 -05:00
thePR0M3TH3AN 3c6e397984 Improve profile hydration retry diagnostics 2025-12-29 21:19:00 -05:00
thePR0M3TH3AN 735d67313c Add shared hex normalization for comment flows 2025-12-12 13:42:15 -05:00
thePR0M3TH3AN 624ab91c29 Add dev logging for improved comment cache fallback 2025-12-12 12:33:15 -05:00
thePR0M3TH3AN 7a56e7a691 Surface comment cache storage failures 2025-12-12 12:10:37 -05:00
thePR0M3TH3AN 6caa31ae51 Normalize comment thread video IDs 2025-12-12 12:03:39 -05:00
thePR0M3TH3AN 203a0a6d0c Normalize comment profile pubkeys in modal 2025-12-12 11:14:50 -05:00
thePR0M3TH3AN 2dd2be9345 Normalize comment thread event ids 2025-12-12 11:05:00 -05:00
thePR0M3TH3AN dacf5557bb Persist comment cache during teardown 2025-12-12 10:40:48 -05:00
thePR0M3TH3AN a6dcc44c12 Normalize comment cache keys 2025-12-12 10:29:33 -05:00
thePR0M3TH3AN 49adb42e36 Fix logger import path for comments controller 2025-12-12 10:04:30 -05:00
thePR0M3TH3AN 5c08f8771e Add fallback comments disabled placeholder 2025-12-12 09:19:04 -05:00
thePR0M3TH3AN 047a465d66 Refine comments modal disable handling 2025-12-12 09:12:13 -05:00
thePR0M3TH3AN f777ff7049 Add guard for missing video modal comment selectors 2025-12-12 09:06:34 -05:00
thePR0M3TH3AN a4bd71ef78 update 2025-11-19 10:25:01 -05:00
thePR0M3TH3AN 04e72a0b46 Propagate video root identifier from pointer metadata 2025-11-14 09:30:01 -05:00
thePR0M3TH3AN a1ec4c89a6 Merge pull request #1037 from PR0M3TH3AN/codex/update-video-comment-handling-with-videorootid
Add root identifier plumbing to modal comments
2025-11-12 21:00:48 -05:00