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.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-23 02:06:38 +00:00
1 parent a8ce28eb7a
commit 6700c5b76d
2 files changed
+166 -144

No files matched your search

+1
View File
@@ -1892,6 +1892,7 @@ export class ProfileModalController {
featureBannerSelector: "#profileHistoryFeatureBanner",
sessionWarningSelector: "#profileHistorySessionWarning",
emptyCopy: "You haven’t watched any videos yet.",
variant: "modal",
remove: (payload) =>
this.callbacks.onHistoryReady({
...(typeof payload === "object" && payload ? payload : {}),