openvibers/openvibe.media Commits

The media index loads its theme loader from Media's own /shared (roadmap WS-P task 4, D42): the last shared script a public page still took from openvibe.network (Media already served /shared; browse.js now uses openvibe-shared/serve.url, content-addressed). The perf budget counts it now that it is same-origin (theme-loader 44.3 KB, 8.3 brotli; 153.4 -> 197.7 KB is exactly that), so jsRawKB 180 -> 215 and jsBrotliKB 43 -> 50; the page did not grow.

OP OpenVibers committed 27 Sept 2026 · 124ad1a4ca · 2 files, +5 −3


Changes

ddiff --git a/server/public/browse.js b/server/public/browse.js
iindex 71578a1..1d45012 100644
---- a/server/public/browse.js
++++ b/server/public/browse.js
@@@ -256,7 +256,7 @@ function renderPage(tab, page, data, counts) {
<meta name="twitter:title" content="OpenVibe.Media — Media Index">
<meta name="twitter:image" content="${config.publicUrl}/og-image.png">
<!-- The shared theme-loader applies the user's theme to <html> before anything paints. -->
--<script src="https://openvibe.network/shared/theme-loader.js" defer></script>
++<script src="${require('openvibe-shared/serve').url('theme-loader.js')}" defer></script>
<style>
${DEFAULT_THEME_CSS ? `:root{${DEFAULT_THEME_CSS}}` : ''}
:root{--bg:var(--bg-primary,#0a0f1c);--panel:var(--bg-card,#131c2e);--border:#1f2d47;--text:var(--text-primary,#e6edf7);--muted:var(--text-secondary,#96a7c2);--accent-page:var(--accent,#3b82f6)}
ddiff --git a/test/perf-budget.test.js b/test/perf-budget.test.js
iindex 537694a..459ad18 100644
---- a/test/perf-budget.test.js
++++ b/test/perf-budget.test.js
@@@ -15,8 +15,10 @@ const BUDGETS = {
htmlRawKB: 25, // measured 19.8 (fresh database)
htmlBrotliKB: 6.5, // 5.0
jsFiles: 4, // 3
-- jsRawKB: 180, // 153.4
-- jsBrotliKB: 43, // 37.3
++ // 2026-09-27: theme-loader (44.3 KB, 8.3 brotli) now comes from Media's own /shared (D42) instead of
++ // openvibe.network, so it is counted here; the page itself did not grow.
++ jsRawKB: 215, // 197.7
++ jsBrotliKB: 50, // 45.6
cssFiles: 2, // 1 (Font Awesome, cross-origin)
cssRawKB: 10, // 0 same-origin
externalFiles: 3, // 2