Add a live preview thumbnail next to the frame name
Build and push server image / test (push) Successful in 22s
Build and push server image / build-and-push (push) Successful in 1m59s
Build and push server image / deploy (push) Successful in 48s

Small header thumbnail showing exactly what the frame is currently
displaying -- same widget compositor /frame/image uses, handed back as
a plain PNG (image_pipeline.render_panel/render_placeholder gain an
as_png option) instead of packed native-panel bytes. New session-authed
GET /api/frames/{id}/preview exposes it; click-to-refresh plus a slow
60s poll on the frame header so it doesn't hammer Immich/calendar
sources just for a header thumbnail.
This commit is contained in:
2026-07-24 15:55:59 -04:00
parent 82f60ed428
commit 9c8a87e90d
7 changed files with 163 additions and 10 deletions
+17
View File
@@ -57,3 +57,20 @@
if (e.key === 'Escape') closeEdit();
});
})();
// Live "how it's displaying" thumbnail. A real composite render (same
// pipeline /frame/image uses), not a cached snapshot, so it's on a slow
// poll and also click-to-refresh rather than something tighter like the
// 10s device-status poll -- no need to hit Immich/calendar/whiteboard
// sources that often just for a header thumbnail.
(function () {
var thumb = document.getElementById('frame-preview-thumb');
if (!thumb || !window.FRAME_BASE_API) return;
function refresh() {
thumb.src = `${window.FRAME_BASE_API}/preview?t=${Date.now()}`;
}
thumb.addEventListener('click', refresh);
refresh();
setInterval(refresh, 60000);
})();