From 6f1c13998cfaeefb9925af0b99832f540402b64b Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Thu, 6 Aug 2026 14:06:47 -0400 Subject: [PATCH] fix(ui): populate Last Updated and Synced From fields on progress page GetAllProgressData (SSR handler) was missing LastUpdated, DeviceIcon, DeviceName, DeviceType, and EpubCFI fields that the template expects. All showed blank. Now matches the API handler's field population. --- internal/handlers/progress.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/handlers/progress.go b/internal/handlers/progress.go index 0af5ea9..f0de199 100644 --- a/internal/handlers/progress.go +++ b/internal/handlers/progress.go @@ -374,6 +374,11 @@ func (h *Handler) GetAllProgressData(c *echo.Context) ([]ProgressWithMedia, erro deviceName = progress.LastSyncDevice.String } + lastUpdated := "" + if progress.LastReadAt.Valid { + lastUpdated = progress.LastReadAt.Time.Format("01-02-2006 03:04 PM") + } + progressList = append(progressList, ProgressWithMedia{ MediaItemID: progress.MediaItemID.Bytes, Title: mediaItem.Title, @@ -386,6 +391,11 @@ func (h *Handler) GetAllProgressData(c *echo.Context) ([]ProgressWithMedia, erro Epubcfi: epubcfi, LastSyncDevice: deviceName, ProgressPercentage: progress.Percentage.Float64 * 100, + EpubCFI: epubcfi, + LastUpdated: lastUpdated, + DeviceIcon: getDeviceIcon(deviceName), + DeviceName: deviceName, + DeviceType: deviceName, FormatGroup: mediaItem.FormatGroup, EstimatedPages: wsync.EstimatedPages(mediaItem.TotalCharacters.Int64), })