Commit Graph
72 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN a6d11914b1 chore(ai): document js/historyView.js
Added public API JSDoc blocks to `js/historyView.js`.
Created standalone architectural and execution overview `docs/historyView-overview.md`.
Completed required docs-code-investigator daily scheduling execution.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-03-02 19:51:49 +00:00
thePR0M3TH3AN 00f96bbe0e update 2026-02-21 15:46:35 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7ccba8ab61 [security] replace innerHTML usages in js/historyView.js — convert to safe DOM APIs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 00:47:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN df62585106 perf: enable lazy loading for avatars and thumbnails
Added `loading="lazy"` and `decoding="async"` attributes to dynamically created `<img>` elements in:
- `js/historyView.js` (avatars)
- `js/ui/subscriptionHistoryController.js` (channel icons)
- `js/searchView.js` (added `decoding="async"`)
- `js/ui/profileModal/ProfileDirectMessageRenderer.js` (attachment previews, avatars)
- `js/ui/profileModalController.js` (attachment previews, saved profile avatars)

This reduces initial page load impact and bandwidth usage by deferring off-screen image loading.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 16:56:06 +00:00
Claude 696a30051b Fix lint failures, console.* convention violations, and CI Node version mismatch
- Add docs/capacitor-native-app-plan.md to hex-lint ignore list (code examples
  naturally reference hex colors in Capacitor config)
- Replace direct console.error/console.log calls with logger utility in
  historyView.js, profileCache.js, EventDetailsModal.js, ZapInterface.js,
  and notificationController.js
- Update CI workflow from Node 20 to Node 22 to match package.json engines

https://claude.ai/code/session_01LzErpH9FNw4hAPsjoYb1v9
2026-02-10 02:35:24 +00:00
thePR0M3TH3AN 7e5d1c7d63 Guard watch-history renderer feed fallback path 2026-02-08 14:48:19 -05:00
Claude 79c5814432 Fix slow Nostr login: unblock NIP-04 decryption, fix signer readiness, storage tab, and watch-history feed
Four issues caused login to be extremely slow and lists to fail syncing:

1. Subscription list decryption excluded NIP-04 when NIP-44 was available,
   preventing decryption of NIP-04-encrypted lists entirely. Removed the
   allowNip04 gate so NIP-04 is always a fallback (matching userBlocks.js
   and hashtagPreferencesService.js which already worked correctly).

2. When the NIP-07 extension permission pre-grant failed (common on page
   refresh when the extension injects slowly), all list services were called
   with allowPermissionPrompt:false and could never recover. Now list
   services are allowed to prompt for permissions themselves when the
   pre-grant fails, avoiding 6-10 second retry delays.

3. The profile modal storage tab was never refreshed on login or logout,
   so it stayed locked even after authentication succeeded. Added
   populateStoragePane() calls to handleAuthLogin and handleAuthLogout.

4. The watch-history feed engine.run() call was missing await, so rejected
   promises from unregistered feeds escaped the try/catch and propagated
   as unhandled errors instead of falling through to the service fallback.

https://claude.ai/code/session_013puYzbf1cC7a59HLcGQUdJ
2026-02-08 02:47:30 +00:00
Claude 8bf8da03b9 Speed up Nostr login and fix list sync, signer persistence, and feed registration
The NIP-07 login flow was extremely slow because list decryption (blocks,
subscriptions, hashtag preferences) started before the signer was ready.
On page refresh, all three services failed with "permission-required" and
scheduled 3-second retry delays, adding 6-10 seconds to every login.

Key fixes:
- List loading now waits for the permission pre-grant to complete before
  attempting decryption, ensuring the signer is available on first try
- Extension wait timeout increased from 3s to 5s for slower extensions
- Decrypt timeouts reduced from 20s to 10s (signer is guaranteed ready)
- Auto-login now forwards authType/providerId from saved profiles
- Storage tab unlock falls back to ensureActiveSignerForPubkey when the
  global signer is not yet registered
- Watch history feed registration adds defensive re-registration and
  try/catch fallback to prevent "Feed not registered" errors
- Decryption scheme cache TTL extended from 10 minutes to 2 hours
- ensureExtensionPermissions waits for extension injection when there
  are outstanding permissions to request (was returning immediately)

https://claude.ai/code/session_01T4wwPu7m5qp1Nxx3H2v57j
2026-02-08 02:02:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN f80bbc7dae chore(ai): remove dead code (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 20:33:25 +00:00
google-labs-jules[bot] 6700c5b76d Redesign watch history cards and fix timestamp display bug
- Redesigned watch history cards to use a list view layout (flex-row) for better space utilization on both desktop and mobile.
- Updated `buildHistoryCard` in `js/historyView.js` to support a `variant` prop ('compact' or 'modal') for context-specific sizing.
- Updated `js/ui/profileModalController.js` to pass `variant: "modal"` to the watch history renderer.
- Fixed a bug where the "Watched [time] ago" timestamp was unavailable because `normalizeHistoryItems` failed to check `pointer.watchedAt`.
- Verified changes with a reproduction script for the timestamp bug and existing unit tests for the controller.
2026-01-23 02:06:38 +00:00
google-labs-jules[bot] ba28ceaf09 feat: add info popovers to feed views
- Added info buttons to Most Recent, Subscriptions, History, Channel Profile, Search, and Explore views
- Attached popovers with descriptions of feed filtration methods
- Used `attachFeedInfoPopover` helper for consistent implementation
- Verified with Playwright script (verified popover visibility and text content)
2026-01-21 20:59:11 +00:00
google-labs-jules[bot] 5119c6f85e Remove "Republish Now" button from Watch History view
- Removed the "Republish Now" button from `views/history.html` to prevent accidental overwriting of relay data with incomplete local state.
- Removed associated event handlers and logic from `js/historyView.js`.
- Verified UI changes with Playwright.
- Existing tests pass (known failures in unrelated files ignored).
2026-01-18 17:33:54 +00:00
google-labs-jules[bot] 163327aaa8 Remove watch history privacy banner and info text 2026-01-17 13:58:39 +00:00
google-labs-jules[bot] 19dd570607 Fix profile watch history and subscription lists syncing issues. 2026-01-07 19:22:23 +00:00
google-labs-jules[bot] 9d365bf65e Fix profile watch history and subscription lists syncing issues. 2026-01-07 18:44:43 +00:00
google-labs-jules[bot] 346f969f79 Fix watch history sync speed, caching, and deletion bug 2026-01-07 18:29:58 +00:00
google-labs-jules[bot] ddcbc0f004 Update profile watch history to match main features
- Shorten npubs in history view cards.
- Add Refresh, Privacy Banner, and Info to Profile Modal Watch History.
- Wire up Profile Modal Watch History controls.
2026-01-07 18:11:49 +00: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
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
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 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 065dafff88 Add restore-default moderation control 2025-10-26 11:13:37 -04:00
thePR0M3TH3AN 2622b401bc Replace bg panel alpha class with overlay token 2025-10-25 22:03:36 -04:00
thePR0M3TH3AN ba6b56dc26 Switch moderation hide flows to block 2025-10-25 21:54:31 -04:00
thePR0M3TH3AN 489638e882 Refine moderation badge layout 2025-10-25 21:28:30 -04:00
thePR0M3TH3AN 87bde7f022 Add moderation UI support to watch history cards 2025-10-25 19:39:18 -04:00
thePR0M3TH3AN ad01cf852f Propagate tag preferences through feed runtimes 2025-10-25 17:38:31 -04:00
thePR0M3TH3AN 9ed0fae127 refactor: route nostr imports through facades 2025-10-22 22:40:17 -04:00
thePR0M3TH3AN d98176d6ba Add watch history bindings module 2025-10-22 21:23:23 -04:00
thePR0M3TH3AN 75ea73b178 Refactor Nostr client imports 2025-10-22 20:55:54 -04:00
thePR0M3TH3AN a5562b4707 Refactor watch history helpers to new module 2025-10-22 14:08:47 -04:00
thePR0M3TH3AN 3ae86c68a3 Refine profile modal layout and metadata toggle 2025-10-19 22:10:26 -04:00
thePR0M3TH3AN 7ae07b1369 refactor: migrate console usage to shared loggers 2025-10-15 14:37:25 -04:00
thePR0M3TH3AN d705cf176b Revert "Refactor logging to centralized logger" 2025-10-15 11:14:10 -04:00
thePR0M3TH3AN 37ba57aa37 Refactor logging to centralized logger 2025-10-15 11:11:14 -04:00
thePR0M3TH3AN 19d971b49d refactor: adopt tokenized color utilities 2025-10-11 12:59:37 -04:00
thePR0M3TH3AN 22cb57ccec Align modals with refactored markup 2025-10-10 13:12:19 -04:00
thePR0M3TH3AN 35a041d1be Refine profile and edit modals with design system tokens 2025-10-10 12:16:22 -04:00
thePR0M3TH3AN 4d367109d5 Preserve playback metadata in watch history 2025-10-09 19:23:29 -04:00
thePR0M3TH3AN 46ef2b8123 Ensure watch history loads include full lists by default 2025-10-08 08:11:26 -04:00
thePR0M3TH3AN 10751a8fb9 Improve watch history loading responsiveness 2025-10-08 07:33:44 -04:00
thePR0M3TH3AN 9d7efce44e Refactor watch history actions into controller 2025-10-08 07:16:26 -04:00
thePR0M3TH3AN 9531fb21be Ensure channel grid passes playback sources to modal 2025-10-07 19:30:07 -04:00
thePR0M3TH3AN 7c3af36003 Add watch history feed adapter and update renderer 2025-10-04 17:25:43 -04:00
thePR0M3TH3AN cf34e28a47 Refactor app orchestrator into Application with dependency injection 2025-10-03 21:10:22 -04:00
thePR0M3TH3AN 61815ba289 Add nostr service layer for video operations 2025-10-03 13:41:44 -04:00
thePR0M3TH3AN c3ed4bc6ea Scope watch history sync to logged users 2025-10-02 18:26:43 -04:00
thePR0M3TH3AN b1a493f113 Enable local watch history fallback when sync disabled 2025-10-02 17:07:21 -04:00