Fix wrong date in history view when looking at labeled version (#27450)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
GitOrigin-RevId: 87b6f82e3024334d03991db794dd11301918245e
This commit is contained in:
Alf Eaton
2025-07-29 11:32:13 +01:00
committed by Copybot
parent 14cac4fbef
commit b6dc37f641
@@ -47,10 +47,14 @@ function LabelListItem({
}: LabelListItemProps) {
const { t } = useTranslation()
// first label
const fromVTimestamp = Date.parse(labels[labels.length - 1].created_at)
// most recent label
const toVTimestamp = Date.parse(labels[0].created_at)
// first label - use the actual version timestamp, fallback to created_at if not available
const fromLabel = labels[labels.length - 1]
const fromVTimestamp =
fromLabel.lastUpdatedTimestamp ?? Date.parse(fromLabel.created_at)
// most recent label - use the actual version timestamp, fallback to created_at if not available
const toLabel = labels[0]
const toVTimestamp =
toLabel.lastUpdatedTimestamp ?? Date.parse(toLabel.created_at)
const updateRange: UpdateRange = {
fromV: version,