openvibers/openvibe.zone Commits

openvibe-shared v4.228.0 (was v4.225.0) (#227)

OP OpenVibers committed 2 days ago · f3e4b2a2f9 · 8 files, +23 −23

* openvibe-shared v4.228.0 (was v4.225.0)

Opened by scripts/pin-bump.js in OpenVibers/OpenVibe.Shared after the v4.228.0 release.

* Home: the pick block is Shared's showcase.pick(), tabs on a phone; the old chips only jumped, so every pane showed

* Tests: an unversioned asset revalidates after five minutes (openvibe-shared 4.227.0 cache-policy)

* Perf budgets: the phone tabs (openvibe-shared 4.228.0, ov-parts.css)

Changes

ddiff --git a/README.md b/README.md
iindex 965d737..61cb46a 100644
---- a/README.md
++++ b/README.md
@@@ -126,5 +126,5 @@ AGPL-3.0, see LICENSE.
<!-- versions:start -->
- openvibe-contracts: v0.417.0
- openvibe-sdk: v0.161.0
--- openvibe-shared: v4.225.0
++- openvibe-shared: v4.228.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex 6604802..6c23f75 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -9,11 +9,11 @@
"domain": "openvibe.zone",
"contracts": "openvibe-contracts v0.417.0",
"sdk": "openvibe-sdk v0.161.0",
-- "shared": "openvibe-shared v4.225.0",
++ "shared": "openvibe-shared v4.228.0",
"packages": [
"openvibe-contracts v0.417.0",
"openvibe-sdk v0.161.0",
-- "openvibe-shared v4.225.0"
++ "openvibe-shared v4.228.0"
],
"summary": "OpenVibe.Zone — private S3-compatible storage zones for OpenVibe projects (ADR-031 amendment). Zone owns the zone record and its control API; OpenVibe.Media owns the objects, bytes, keys, quotas and the S3 surface at s3.openvibe.media.",
"works": [
ddiff --git a/package-lock.json b/package-lock.json
iindex ebaebf2..f24fc87 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -18,7 +18,7 @@
"iovalkey": "^0.4.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.161.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.225.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0",
"pg": "^8.23.0"
},
"devDependencies": {
@@@ -1272,9 +1272,9 @@
}
},
"node_modules/openvibe-shared": {
-- "version": "4.225.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.225.0",
-- "integrity": "sha512-zuZIgYODwJJ7UpDBTVnT+czEI5l6YFWqt1nbfbPeEsW6/NlmDZHJWPSGpBv223jRpvhJYH7Duea6nuRr8KZ3sg==",
++ "version": "4.228.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0",
++ "integrity": "sha512-HR0Hac/K+qKmwMf2QZWCFxW+uVja36nyAtxVbNFgPGUDFdmWhmb6RMoP/CkU0+GSCPsC50k6aTS+oPx2czDgGg==",
"license": "MIT",
"dependencies": {
"clean-css": "^5.3.3",
ddiff --git a/package.json b/package.json
iindex 5db235e..b9af28d 100644
---- a/package.json
++++ b/package.json
@@@ -25,7 +25,7 @@
"iovalkey": "^0.4.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.161.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.225.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0",
"pg": "^8.23.0"
},
"engines": {
ddiff --git a/server/render/short.js b/server/render/short.js
iindex 366914a..0ab709a 100644
---- a/server/render/short.js
++++ b/server/render/short.js
@@@ -1,4 +1,5 @@
'use strict';
++const { pick } = require('openvibe-shared/showcase');
/**
* The home on a phone (the owner's short-pages rule, 2026-10-30): one or two screens, app-like.
*
@@@ -20,12 +21,11 @@ const esc = (s) => String(s == null ? '' : s).replace(/&/g, '&amp;').replace(/</
*
* pickBlock({ key, label, head, panes }) panes: [{ id, label, html }]
*/
--function pickBlock({ key, label, head = '', headId = '', bodyClass = '', panes }) {
-- if (!panes || !panes.length) return '';
-- const chips = panes.map((p) => `<a class="pick-chip" href="#pp-${esc(key)}-${esc(p.id)}">${esc(p.label)}</a>`).join('');
-- const body = panes.map((p) => `<div class="pick-pane" id="pp-${esc(key)}-${esc(p.id)}">${p.html}</div>`).join('');
-- const heading = `<h2${headId ? ` id="${esc(headId)}"` : ''}>${esc(head || label)}</h2>`;
-- return `<div class="pick" id="pick-${esc(key)}"><div class="pick-bar"><div class="pick-head">${heading}</div><nav class="pick-row" aria-label="${esc(label)}">${chips}</nav></div><div class="pick-body${bodyClass ? ` ${bodyClass}` : ''}">${body}</div></div>`;
++// 4.228.0: Shared's showcase.pick() draws the block (tabs on a phone, every pane in the page, a link to a pane opens
++// it); this copy only jumped to a pane with chips, so a phone showed them all (the owner, 11-12). The ids are this
++// site's own, so its links keep working.
++function pickBlock({ key, label, head = '', headId = '', bodyClass = '', panes, checked = '' }) {
++ return pick({ key, label, head, headId, bodyClass, checked: checked ? `pp-${key}-${checked}` : '', panes: (panes || []).map((p) => ({ id: `pp-${key}-${p.id}`, label: p.label, html: p.html })) });
}
/** The rules for every pane of a pick block, in the order they appear: one rule per pane, so the CSS is written for the page. */
ddiff --git a/test/asset-cache.test.js b/test/asset-cache.test.js
iindex f400022..fb0e973 100644
---- a/test/asset-cache.test.js
++++ b/test/asset-cache.test.js
@@@ -3,7 +3,7 @@
* The one cache rule the service serves assets with (openvibe-shared/cache-policy, plan T11): a URL
* whose ?v= is the asset's current hash is immutable for a year, because those bytes can never
* change under the same URL; a wrong or missing ?v= may change at any moment, so it gets the
-- * short public window with a day of stale-while-revalidate. The values are pinned here against
++ * short public window with five minutes of stale-while-revalidate. The values are pinned here against
* the module, not re-stated: the service never picks its own numbers.
*/
const assert = require('assert');
@@@ -12,7 +12,7 @@ const { assetVersion } = require('../server/render/layout');
const { boot, check, done } = require('./helpers/boot');
const ASSET = 'css/app.css';
--const SHORT = 'public, max-age=300, stale-while-revalidate=86400';
++const SHORT = 'public, max-age=300, stale-while-revalidate=300';
(async () => {
const t = await boot();
ddiff --git a/test/home-short.test.js b/test/home-short.test.js
iindex a4015e6..ccfbce4 100644
---- a/test/home-short.test.js
++++ b/test/home-short.test.js
@@@ -25,10 +25,10 @@ const { boot, check, done } = require('./helpers/boot');
// The code samples: one pick block, a chip per sample, the first one picked.
assert.ok(text.includes('<div class="pick" id="pick-tools">'), 'the code samples are one pick block');
-- assert.match(text, /<nav class="pick-row" aria-label="The tools that reach a zone">/);
-- const chips = [...text.matchAll(/<a class="pick-chip" href="#(?:pp-tools-)?([a-z-]+)">()([^<]+)<\/a>/g)];
++ assert.match(text, /<div class=\"ov-parts ov-parts--front\" data-parts=\"\d+\">/, 'its parts are tabs on a phone');
++ const chips = [...text.matchAll(/<label for="ovp-[a-z0-9]+-(?:pp-tools-)?([a-z-]+)">()([^<]+)(?: <span class="ov-parts-n">[^<]*<\/span>)?<\/label>/g)];
assert.deepStrictEqual(chips.map((m) => m[1]), ['aws-cli', 'rclone', 'node', 'sdk'], 'a chip per sample');
-- assert.ok(!/type="radio"/.test(text), 'no chip is a radio: nothing is picked, every pane shows');
++ assert.ok(/<input type=\"radio\" class=\"ov-parts-r\"[^>]* checked>/.test(text), 'the first part is open on a phone (Shared pick(): tabs, 11-12)');
assert.strictEqual((text.match(/class="pick-pane"/g) || []).length, chips.length, 'one pane per chip');
// Every sample stays in the page for the crawlers.
for (const label of ['AWS CLI', 'rclone', 'Node (AWS SDK v3)', 'Manage zones (openvibe-sdk)']) {
ddiff --git a/test/perf-budget.test.js b/test/perf-budget.test.js
iindex 1de4d9b..67c12d9 100644
---- a/test/perf-budget.test.js
++++ b/test/perf-budget.test.js
@@@ -14,14 +14,14 @@ const { measure, check, format } = require('openvibe-shared/perf-budget');
// Budgets are set from the numbers measured on 2026-10-08 (the real ones, fresh database), rounded up with about 10%
// headroom; file counts are the measured counts and external files stay at 0.
const BUDGETS = {
-- htmlRawKB: 40, // 40: measured 39.5 with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 38.2: measured 36.2 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
++ htmlRawKB: 40.5, // 40.5 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 40: measured 39.5 with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 38.2: measured 36.2 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
htmlBrotliKB: 9.5, // 9.5: measured 9.1 with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip); 9 before; 7.1 openvibe-shared 4.15 footer: the compact footer opens into the whole one, and the pulse line; 6.2
jsFiles: 5, // 5 (theme-loader, web-runtime, navbar, footer, boost: openvibe-shared/shell)
jsRawKB: 394.5, // 2026-11-10: openvibe-shared 4.197.0 (the menu's row of places, the You tab's row, the Sign in mark, the tooltip); 393: measured 392.5 KB raw with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 376.4: measured 376.3 KB raw with openvibe-shared 4.186.0 (2026-11-10: the mark's Working and Thinking states, the Dock and the menu as one sheet, bare controls styled by the loader); 375.1: measured 367.1 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
jsBrotliKB: 94, // 94: measured 93.7 KB brotli with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 89.8: measured 89.7 KB brotli with openvibe-shared 4.186.0 (2026-11-10: the mark's Working and Thinking states, the Dock and the menu as one sheet, bare controls styled by the loader); 89.5: measured 87.5 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
-- cssFiles: 2, // 2 (app.css + the cached /shared/showcase.css)
-- cssRawKB: 47.6, // 47.6: measured 42.6 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
-- cssBrotliKB: 9, // 8.6 with 2026-11-01: phone table cards (2026-11-01); 8.3 with the phone pick and fold rules (2026-10-30); 7.7 with openvibe-shared 4.48.0 (the site switcher on the mark, the menu's Start tab and quick tools; Kit's touch hit areas and the phone navbar fix, 4.44-4.47.3); raised for openvibe-shared v4.39.0 (rail wrap, card sub/preview, 44 px touch targets, stats links, launcher columns: +1.3 KB raw over kit.css, room.css and showcase.css); measured 7.3
++ cssFiles: 3, // 3 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 2 (app.css + the cached /shared/showcase.css)
++ cssRawKB: 61, // 61 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 52 openvibe-shared v4.228.0 (2026-11-12: measured 51.6, raised by pin-bump from 47.6); 47.6: measured 42.6 with openvibe-shared 4.161.0, plus room for 4.162.0–4.163.0, 2026-11-09
++ cssBrotliKB: 10.5, // 10.5 openvibe-shared v4.228.0 (2026-11-12: the phone tabs, ov-parts.css; budgets grow for a feature); 9.5 openvibe-shared v4.228.0 (2026-11-12: measured 9.2, raised by pin-bump from 9); 8.6 with 2026-11-01: phone table cards (2026-11-01); 8.3 with the phone pick and fold rules (2026-10-30); 7.7 with openvibe-shared 4.48.0 (the site switcher on the mark, the menu's Start tab and quick tools; Kit's touch hit areas and the phone navbar fix, 4.44-4.47.3); raised for openvibe-shared v4.39.0 (rail wrap, card sub/preview, 44 px touch targets, stats links, launcher columns: +1.3 KB raw over kit.css, room.css and showcase.css); measured 7.3
externalFiles: 0, // 0
};