openvibers/openvibe.live Commits

Home: stop every section waiting on the live-grid request

OP OpenVibers committed 16 Sept 2026 · 2f072251af · 2 files, +6 −3

loadHome() awaited /api/streams before starting the clip, VOD, paste, digest, star and pulse
rails, none of which depend on it. One slow response held up the entire page. They all start
together now and each fills in as it arrives — which is also what lets the cache-first paint
actually show: previously the cached clip rail could not render until the live grid's network
round trip had finished.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CMxJm1dB8rdsaMSgNjVa82

Changes

ddiff --git a/public/index.html b/public/index.html
iindex 39469c59..9f4146e4 100644
---- a/public/index.html
++++ b/public/index.html
@@@ -5130,7 +5130,7 @@ curl -s https://openvibe.media/live/@Goosely/chat-insight.json | jq ".chat_insig
<script src="/live-notify.js?v=3" defer></script>
<script src="/js/ov-skeleton.js?v=1" defer></script>
<script src="/js/ov-odometer.js?v=3" defer></script>
--<script src="/js/app.js?v=150" defer></script>
++<script src="/js/app.js?v=151" defer></script>
<script src="/js/stream-player.js?v=22" defer></script>
<script src="/js/stream-pip.js?v=1" defer></script>
<script src="/js/chat-shared.js?v=3" defer></script>
ddiff --git a/public/js/app.js b/public/js/app.js
iindex 8ba6dbc3..cec7fac8 100644
---- a/public/js/app.js
++++ b/public/js/app.js
@@@ -2076,7 +2076,10 @@ async function loadHome() {
_homeClipsPage = 1;
_homePastesPage = 1;
-- try {
++ // Deliberately NOT awaited. Every other section used to sit behind this one request, so a
++ // slow /streams held up the clips, VODs, pastes, digest and star rails even though none of
++ // them depend on it. They all start together now and each fills in as it arrives.
++ void (async () => { try {
// Paint last visit's grid immediately, then reconcile with what is live now. The cached
// copy is at most 20 seconds old; anything older falls through to a normal load and the
// placeholders cover the gap.
@@@ -2093,7 +2096,7 @@ async function loadHome() {
if (window.OVSkeleton) OVSkeleton.clear('stream-grid-live');
const noLiveEl = document.getElementById('no-live-streams');
if (noLiveEl) noLiveEl.style.display = '';
-- }
++ } })();
loadHomeRecentOnline();
void loadHomePulse(); // happening-now rail + weekly leaders + AI moments + latest update