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

+2 -2
View File
@@ -2569,9 +2569,9 @@ async function testWatchHistoryFeedHydration() {
// Simulate renderer fetching via feed engine
const renderer = createWatchHistoryRenderer({
fetchHistory: async (actorInput, { cursor = 0 } = {}) => {
fetchHistory: async (actorInput, { cursor = 0, forceRefresh = false } = {}) => {
const runtime = {
watchHistory: { actor: actorInput, cursor },
watchHistory: { actor: actorInput, cursor, forceRefresh },
blacklistedEventIds: new Set(),
isAuthorBlocked: () => false
};