Commit Graph
3079 Commits
Author SHA1 Message Date
google-labs-jules[bot] cc66fafcdd fix(hashtag-preferences): prevent crash and data loss on load failure
- fix `TypeError: Assignment to constant variable` in `HashtagPreferencesService.load` by changing `const` to `let` for `wasLoadedForUser`.
- Prevent existing cached preferences from being wiped when remote decryption fails.
2026-01-18 04:49:07 +00:00
thePR0M3TH3AN b2d3ae3286 Merge pull request #1300 from PR0M3TH3AN/feat/optimistic-filtered-videos-cache-11029654294546507650
feat: optimistic persistent filtered-videos cache
2026-01-17 23:33:11 -05:00
google-labs-jules[bot] d4779a0825 feat: optimistic persistent filtered-videos cache (localStorage) for faster initial grid render
- Adds `STORAGE_KEY_FILTERED_VIDEOS` and `MAX_PERSISTED_VIDEOS` constants.
- Implements `loadPersistedFilteredVideos` and `persistFilteredVideos` helper methods.
- Updates `loadVideos` to load persistent videos optimistically and emit "persistent-cache" updates.
- Ensures all persistent data is strictly re-filtered (blocked authors, NSFW, access control) before use.
- Skips emitting empty in-memory cache updates if optimistic data is available to prevent UI flashing.
- Persists fresh filtered results in `applyAndNotify` to keep cache up-to-date.
- Adds comprehensive verification script logic (tested via `scripts/verify-optimistic-cache.mjs` before cleanup).
2026-01-18 04:31:43 +00:00
thePR0M3TH3AN e1a12868e0 Merge pull request #1298 from PR0M3TH3AN/ai/refactor-torrent-status-20231027-751310548949696499
Refactor updateTorrentStatus to TorrentStatusController
2026-01-17 22:24:56 -05:00
thePR0M3TH3AN 2088234a3e Merge pull request #1297 from PR0M3TH3AN/ai/ci-health-20250212-3024044749559597461
CI Health: Fix flaky tests in comments and moderation services
2026-01-17 22:23:20 -05:00
thePR0M3TH3AN 7697a3ce2d Merge pull request #1296 from PR0M3TH3AN/fix-hashtag-prefs-profile-cache-16997779974733027289
Fix hashtag preferences loading and profile persistence issues
2026-01-17 22:21:58 -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
google-labs-jules[bot] 7743572a22 chore(ai): CI health fixes (flaky tests) 2026-01-18 02:39:42 +00:00
google-labs-jules[bot] a2de2b550d Fix hashtag preferences loading and profile persistence issues
- Migrated Kind 0 profile metadata storage to unified `profileCache.js` with partitioning and persistence.
- Added `defaultDTag` for hashtag preferences in `cachePolicies.js` to ensure consistent key resolution.
- Updated `hashtagPreferencesService.js` to use `profileCache` and implemented legacy data migration.
- Added `handleEvent` to `NostrClient` to centrally ingest Kind 0 events into the cache.
- Updated `authService.js` and `cache.js` to delegate profile operations to the unified cache system.
- Added `PROFILE_METADATA` schema to `nostrEventSchemas.js`.
2026-01-18 02:09:04 +00:00
thePR0M3TH3AN dedc2aefa5 Merge pull request #1295 from PR0M3TH3AN/jules-7892265785675999514-a989ee17
feat(ui): update zap dialog to show "Done" button on success
2026-01-17 21:00:26 -05:00
google-labs-jules[bot] b83f5009e4 I have updated the zap dialog to display the "Done" button on success.
I modified `js/channelProfile.js` to implement the logic that toggles the "Send" button to "Done" and closes the dialog when clicked. Additionally, I updated `js/ui/zapController.js` to prevent the form from resetting entirely on success, which preserves receipts; instead, it now manually clears the comment and sets the completed state.

These changes ensure consistent "Done" button behavior across both the Channel Profile and Video Modal zap interfaces. I also included minor `package.json` updates for linting dependencies.
2026-01-18 01:58:56 +00:00
thePR0M3TH3AN 983f67fa1b Merge pull request #1294 from PR0M3TH3AN/jules-595217453721279420-8ff8ddbe
fix(moderation): remove verbose trusted mute log
2026-01-17 20:22:10 -05:00
google-labs-jules[bot] e43dbf77cd remove verbose trusted mute log from moderationService
This change removes a verbose log message that was cluttering the console output during trusted mute event ingestion. The removal of this log line does not affect any functionality.
2026-01-18 01:21:12 +00:00
thePR0M3TH3AN f9b445370b Merge pull request #1293 from PR0M3TH3AN/ai/todo-triage-YYYYMMDD-5266633771029061307
Triage TODOs and track tag preference filtering tasks
2026-01-17 20:10:53 -05:00
google-labs-jules[bot] 3f20ea0b5f chore(ai): triage TODOs and create tracking issue
Scanned the repository for TODO/FIXME/XXX comments and identified non-trivial items related to tag preference filtering. Since no trivial fixes were found, I have documented the findings in `artifacts/todos.txt` and created a tracking issue document `artifacts/todo_issues.md` outlining the necessary architectural changes in the feed engine.

This work prepares the ground for moving preference-aware filtering from the view layer to the feed engine pipeline.
2026-01-18 01:04:35 +00:00
thePR0M3TH3AN 31946ad470 Merge pull request #1292 from PR0M3TH3AN/ai/report-20260118-14555220432416113661
docs: add weekly agent report for 2026-01-18
2026-01-17 19:47:36 -05:00
google-labs-jules[bot] c1782acb9e docs: add weekly agent report for 2026-01-18 2026-01-18 00:03:23 +00:00
thePR0M3TH3AN 923b3a718e Merge pull request #1290 from PR0M3TH3AN/update-watch-history-cache-registry-3141393103014008562
Integrate watch history policies with centralized cache registry
2026-01-17 18:05:23 -05:00
google-labs-jules[bot] a1b1d85c9d feat(cache): integrate watch history with centralized registry
- Update `cachePolicies.js` to include `defaultDTag` for watch history.
- Update `profileCache.js` to resolve policies dynamically via `SECTION_TO_NOTE_TYPE`.
- Implement `resolveAddressKey` in `profileCache.js` for canonical key generation.
- Implement TTL expiration logic in `profileCache.js`.
- Update `watchHistory.js` to use `NOTE_TYPES.WATCH_HISTORY` for storage operations.
2026-01-17 23:04:08 +00:00
thePR0M3TH3AN e54d9f0453 Merge pull request #1289 from PR0M3TH3AN/codex/session-actor-telemetry-isolation-16408739976850381609
Isolate view telemetry and restrict session actor publishing
2026-01-17 17:50:15 -05:00
google-labs-jules[bot] b49a294dc0 feat: isolate view telemetry and restrict session actor publishing
- Add `isSessionActor` helper to `js/nostr/sessionActor.js` to identify ephemeral keys.
- Update `js/nostr/viewEvents.js` to namespace view deduplication caches by `actorPubkey` to prevent data leakage between sessions.
- Block comment publishing for session actors in `js/nostr/commentEvents.js`.
- Block watch history list publishing for session actors in `js/nostr/client.js`.
- Block user block list publishing for session actors in `js/userBlocks.js`.
- Block hashtag preference publishing for session actors in `js/services/hashtagPreferencesService.js`.
- Add inline documentation clarifying variable sources.
2026-01-17 22:48:31 +00:00
thePR0M3TH3AN 37e2e6dfc6 Merge pull request #1288 from PR0M3TH3AN/lru-cache-integration-8595072792152932110
LRU Cache Integration for Comments & Reactions
2026-01-17 17:20:37 -05:00
google-labs-jules[bot] 083f0c9ecc feat: implement shared LRU cache for video comments and reactions
- Added `js/utils/lruCache.js` with hit/miss tracking.
- Updated `js/nostr/cachePolicies.js` to set 5-minute TTL for comments/reactions.
- Integrated caching and incremental fetching in `js/nostr/commentEvents.js`.
- Implemented `listVideoReactions` in `js/nostr/reactionEvents.js` with caching logic.
2026-01-17 22:15:46 +00:00
thePR0M3TH3AN 019a87b8af Merge pull request #1287 from PR0M3TH3AN/codex/partitioned-profile-cache-and-signer-invalidation-12811025791925587536
Implement partitioned profile cache and signer invalidation
2026-01-17 16:51:00 -05:00
google-labs-jules[bot] 3deb8d08f0 Implement profile-scoped caching and signer invalidation logic
- Updated `profileCache.js` to support clearing runtime memory on signer change.
- Updated `NostrClient` to trigger `clearSignerRuntime` on `setActiveSigner`.
- Updated list services (`subscriptions`, `userBlocks`, `hashtagPreferences`, `watchHistory`) to listen for `runtimeCleared` and reload data.
- Updated `NostrClient` sync metadata methods to default to the active profile pubkey.
- Added `partition-updated` event emission to `profileCache`.
2026-01-17 21:43:35 +00:00
thePR0M3TH3AN 1f8dfab811 Merge pull request #1285 from PR0M3TH3AN/ai/smoke-tests-20260117-10426525355644906665
chore(ai): add smoke test script (agent)
2026-01-17 16:25:46 -05:00
thePR0M3TH3AN f5368b8b45 Merge pull request #1286 from PR0M3TH3AN/codex/incremental-list-fetching-9588608129744192836
Implement incremental fetching for Nostr lists
2026-01-17 16:24:28 -05:00
google-labs-jules[bot] 9d06f43321 feat: implement incremental fetching for Nostr lists
Implements a `SyncMetadataStore` to persist last-seen timestamps for replaceable lists (Kind 10000, 30000, 30002, 30015).
Adds `fetchListIncrementally` helper to `NostrClient` which performs per-relay `since` queries.
Updates `SubscriptionsManager`, `UserBlockListManager`, `HashtagPreferencesService`, and `adminListStore` to utilize incremental fetching.
Prevents local cache wipes when incremental fetches return empty results (indicating "no updates").
2026-01-17 21:11:48 +00:00
google-labs-jules[bot] a8647c109f chore(ai): add smoke test script (agent)
Added `scripts/agent/smoke-test.mjs` to verify key application flows in a headless environment.

Features:
- Verifies Relay Connection
- Verifies NSEC Login (Ephemeral)
- Verifies Video Publishing (Sign & Send)
- Verifies Event Retrieval
- Verifies DM Encryption/Decryption

Usage:
```bash
npm install
node scripts/agent/smoke-test.mjs
```

Artifacts (logs/reports) are generated in `artifacts/` and are ignored by git.
Utilizes `scripts/agent/simple-relay.mjs` for a local relay.
Uses `jsdom` to polyfill browser environment for `NostrClient`.
2026-01-17 21:10:02 +00:00
thePR0M3TH3AN 1786ad9068 Merge pull request #1284 from PR0M3TH3AN/refactor-profile-cache-storage-4640521263541154726
Refactor storage for profile-scoped lists
2026-01-17 15:52:26 -05:00
google-labs-jules[bot] 926e6ebf39 Refactor user-specific lists to use centralized profileCache 2026-01-17 20:47:27 +00:00
thePR0M3TH3AN 32445f7eb8 Merge pull request #1283 from PR0M3TH3AN/ai/load-test-20260117-13092570340846812677
Add load testing scripts for Nostr relays
2026-01-17 15:26:44 -05:00
google-labs-jules[bot] 898f3056a8 Add load testing scripts and report 2026-01-17 19:56:27 +00:00
thePR0M3TH3AN 7a7ecde97f Merge pull request #1281 from PR0M3TH3AN/cache-policies-wiring-2547401626759645404
Centralized Cache Policy Registry
2026-01-17 14:15:40 -05:00
google-labs-jules[bot] 86ffb8cb2a Define centralized cache policies and wire them into fetchers 2026-01-17 19:12:09 +00:00
thePR0M3TH3AN cb87d556a1 Merge pull request #1280 from PR0M3TH3AN/unified-db-sync-engine-11458894156823216819
Implement UnifiedDB and SyncEngine Caching Architecture
2026-01-17 13:33:00 -05:00
google-labs-jules[bot] fa8408961a feat: Implement UnifiedDB and SyncEngine\n\n- Replaced localStorage with IndexedDB (UnifiedDB) for robust data storage.\n- Implemented SyncEngine for advanced caching (SWR, TTL, background sync).\n- Migrated key services (WatchHistory, Subscriptions, UserBlocks, etc.) to new architecture.\n- Fixed regressions in ModerationService, TrustSeeds, and UI modals.\n- Resolved test failures in integration suite. 2026-01-17 18:13:15 +00:00
thePR0M3TH3AN 3ebb385717 Merge pull request #1279 from PR0M3TH3AN/fix-mobile-thumbnails-5841283595093157949
Fix oversized watch history thumbnails on mobile
2026-01-17 09:50:47 -05:00
google-labs-jules[bot] fca40daa70 Fix oversized watch history thumbnails on mobile
- Replaced `w-full` with `w-56 max-w-full` in `.watch-history-card__thumbnail` class.
- This ensures thumbnails are constrained to ~224px (14rem) on all viewports, fixing the "bleeding" issue on mobile while maintaining the desktop layout.
- The `max-w-full` ensures safety on very narrow screens.
2026-01-17 14:47:55 +00:00
thePR0M3TH3AN 424acc16a4 Merge pull request #1278 from PR0M3TH3AN/remove-watch-history-privacy-text-5720120204481768459
Remove watch history privacy banner and info text
2026-01-17 09:10:36 -05:00
google-labs-jules[bot] 163327aaa8 Remove watch history privacy banner and info text 2026-01-17 13:58:39 +00:00
thePR0M3TH3AN a0e02572ac Merge pull request #1277 from PR0M3TH3AN/fix-watch-history-mobile-layout-and-sort-13478333704116662784
Fix Watch History Mobile Layout & Sort Order
2026-01-17 08:42:12 -05:00
google-labs-jules[bot] b059d66d80 Fix watch history mobile layout and sort order
- Updated CSS for `.watch-history-card` to use `flex-col` on mobile for stacked layout, switching to `sm:flex-row` on larger screens.
- Added `w-full` to `.watch-history-card__thumbnail` on mobile to constrain image width.
- Fixed a bug in `js/nostr/watchHistory.js` where `computeWatchHistoryFingerprintForItems` was sorting the live history array in-place by ID, causing the UI to display an incorrect (non-chronological) order. The fix involves creating a shallow copy before sorting.
- Updated `tests/nostr/watchHistory.test.js` to verify behavior against the current storage version (`v5`).
2026-01-17 13:35:37 +00:00
thePR0M3TH3AN fef2d547ec Merge pull request #1276 from PR0M3TH3AN/codex/watch-history-v2-encryption-596800188208881719
Enforce v=2 tag and mandatory encryption for watch history
2026-01-17 07:56:44 -05:00
google-labs-jules[bot] cbd8af42a6 Enforce v=2 tag and mandatory encryption for watch history 2026-01-17 11:32:31 +00:00
thePR0M3TH3AN a9ec320806 Merge pull request #1275 from PR0M3TH3AN/doc-client-js-improvements-17150798691171609781
Improve NostrClient documentation
2026-01-17 05:06:51 -05:00
google-labs-jules[bot] 4f1b180c94 docs: improve architectural comments in NostrClient 2026-01-17 05:21:45 +00:00
thePR0M3TH3AN 93038893d7 Merge pull request #1273 from PR0M3TH3AN/feature/search-functionality-12617281545620383987
Implement Search Bar Functionality
2026-01-16 22:57:23 -05:00
google-labs-jules[bot] 52043a1872 feat: Implement local profile name search fallback
- Updated `js/searchView.js` to augment NIP-50 relay search with a local scan of cached profiles.
- `performProfileSearch` now iterates `nostrClient.activeMap` (locally cached videos) to find unique authors.
- It retrieves profile metadata using `app.getProfileCacheEntry(pubkey)`.
- It matches queries against `name`, `about`, `nip05`, and `lightningAddress`.
- Local results are merged with relay results, ensuring robust search functionality even if relay connections are unstable.
- Preserved existing NIP-50 relay search logic.
2026-01-17 03:56:09 +00:00
google-labs-jules[bot] be5c39f6e8 Implement search functionality for profiles and videos
- Modified `js/index.js` to handle search queries, detecting npubs for direct navigation.
- Added `views/search.html` and `js/searchView.js` to implement search UI and logic.
- Implemented dual-search strategy:
  - Profile search using NIP-50 on Kind 0.
  - Video search using NIP-50 on Kind 30078 and local cache search (robustness).
- Registered new search view in `js/viewManager.js`.
- Verified with Playwright tests.
2026-01-17 03:44:23 +00:00