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.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-07 14:05:21 +00:00
1 parent a5994f1380
commit c322fcee14
5 files changed
+87 -18

No files matched your search

+8
View File
@@ -25,6 +25,14 @@
>
Republish now
</button>
<button
type="button"
data-history-action="refresh"
class="btn-ghost"
aria-label="Refresh watch history from relays"
>
Refresh
</button>
</div>
</div>