Fix: prevent published date reset when editing videos and show edited status

Prioritize `published_at` metadata over event `created_at` timestamp.
Backfill `published_at` during edit if missing to preserve original date.
Add "(edited)" label to video cards for modified content.
Display "Last Edited: [Date]" on video player modal.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-12 15:35:23 +00:00
1 parent 1ef8459fd6
commit 1d3c827f62
4 files changed
+112 -6

No files matched your search

+12
View File
@@ -951,6 +951,18 @@ export class VideoCard {
this.viewCountEl = view;
}
if (
this.postedAt !== null &&
Number.isFinite(this.video?.created_at) &&
this.video.created_at > this.postedAt + 60
) {
const edited = this.createElement("span", {
classNames: ["ml-1"],
textContent: "(edited)",
});
metadata.appendChild(edited);
}
authorMeta.appendChild(authorName);
authorMeta.appendChild(metadata);