openvibers/openvibe.wiki Commits

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

OP OpenVibers committed 14 h ago · 2881807ff7 · 8 files, +25 −24

* 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)

Changes

ddiff --git a/README.md b/README.md
iindex 95cb54a..8844656 100644
---- a/README.md
++++ b/README.md
@@@ -319,7 +319,7 @@ Production: `/opt/openvibe.wiki`, env `/etc/openvibe/wiki.env`, unit
- PostgreSQL 18 and Valkey 9 (OpenVibe.Host `roles/data/`, ADR-035): every read and write is async through
`openvibe-sdk/db`; Valkey holds the per-actor limit counters (optional: without `VALKEY_URL` they count per process).
- `openvibe-publishing` v1.7.0 (async PostgreSQL stores, ingest and publication chassis), `openvibe-contracts`
-- v0.379.0, `openvibe-shared` v4.225.0
++ v0.379.0, `openvibe-shared` v4.228.0
(Frame, release, metrics, readiness, SEO helpers, legal pages), `openvibe-sdk` v0.161.0 (db, auth, PostgreSQL
events outbox, per-actor limits, account export and deletion, testing) — pinned release tarballs.
- OpenVibe.Network (SSO, JWKS, service principal `wiki`), OpenVibe.Events, OpenVibe.Community,
@@@ -449,6 +449,6 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
- openvibe-contracts: v0.417.0
- openvibe-sdk: v0.161.0
--- openvibe-shared: v4.225.0
++- openvibe-shared: v4.228.0
- openvibe-publishing: v1.7.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex be10cfc..916a58d 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -9,10 +9,10 @@
"domain": "openvibe.wiki",
"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-publishing v1.7.0",
-- "openvibe-shared v4.225.0",
++ "openvibe-shared v4.228.0",
"openvibe-sdk v0.161.0"
],
"capabilities": [
ddiff --git a/package-lock.json b/package-lock.json
iindex 3bc3808..04e99ad 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -17,7 +17,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.7.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": {
@@@ -1277,9 +1277,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 fff99b7..1ff8242 100644
---- a/package.json
++++ b/package.json
@@@ -28,7 +28,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.7.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 b7c2fde..ea119e1 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,11 +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 = '', panes }) {
-- if (!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('');
-- return `<div class="pick" id="pick-${esc(key)}"><div class="pick-bar"><div class="pick-head"><h2>${esc(head || label)}</h2></div><nav class="pick-row" aria-label="${esc(label)}">${chips}</nav></div><div class="pick-body">${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 })) });
}
ddiff --git a/test/asset-cache.test.js b/test/asset-cache.test.js
iindex 5772ef7..d2d7aaf 100644
---- a/test/asset-cache.test.js
++++ b/test/asset-cache.test.js
@@@ -16,12 +16,12 @@ const { assetVersion } = require('../server/render/layout');
assert.strictEqual(r.headers.get('cache-control'), 'public, max-age=31536000, immutable', 'the current hash is immutable');
r = await fetch(`${h.base}/css/wiki.css?v=0123456789`);
assert.strictEqual(r.status, 200);
-- assert.strictEqual(r.headers.get('cache-control'), 'public, max-age=300, stale-while-revalidate=86400', 'another ?v= is never pinned');
++ assert.strictEqual(r.headers.get('cache-control'), 'public, max-age=300, stale-while-revalidate=300', 'another ?v= is never pinned');
r = await fetch(`${h.base}/css/wiki.css?v=deadbeefdeadbeef`);
assert.strictEqual(r.status, 200);
-- assert.strictEqual(r.headers.get('cache-control'), 'public, max-age=300, stale-while-revalidate=86400', 'a hex but wrong ?v= is not immutable');
++ assert.strictEqual(r.headers.get('cache-control'), 'public, max-age=300, stale-while-revalidate=300', 'a hex but wrong ?v= is not immutable');
r = await fetch(`${h.base}/css/wiki.css`);
-- assert.strictEqual(r.headers.get('cache-control'), 'public, max-age=300, stale-while-revalidate=86400');
++ assert.strictEqual(r.headers.get('cache-control'), 'public, max-age=300, stale-while-revalidate=300');
console.log('asset cache: all checks passed');
} finally { await h.stop(); }
})().catch((e) => { console.error(e); process.exit(1); });
ddiff --git a/test/home-short.test.js b/test/home-short.test.js
iindex 1936eb3..3b186d7 100644
---- a/test/home-short.test.js
++++ b/test/home-short.test.js
@@@ -40,10 +40,10 @@ const data = {
const text = r.text;
assert.ok(text.includes('<div class="pick" id="pick-read">'), 'the pages to start with are one pick block');
-- assert.match(text, /<nav class="pick-row" aria-label="Pages to start with">/);
-- const chips = [...text.matchAll(/<a class="pick-chip" href="#(?:pp-read-)?([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-read-)?([a-z]+)">()([^<]+)(?: <span class="ov-parts-n">[^<]*<\/span>)?<\/label>/g)];
assert.deepStrictEqual(chips.map((m) => m[1]), ['linked', 'recent'], 'a chip per list');
-- 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 list stays in the page for the crawlers.
assert.ok(text.includes('Most linked pages') && text.includes('Recently revised'), 'both lists are in the page');
@@@ -66,9 +66,9 @@ const data = {
const rules = [];
const grouped = String(views.home({ spaces, recent: [], shelves: new Map([[spaces[0].id, shelf]]), groups, actor: { kind: 'anonymous' }, rules }));
assert.ok(grouped.includes('<div class="pick" id="pick-shelf-openvibe">'), 'the groups are one pick block');
-- const groupChips = [...grouped.matchAll(/<a class="pick-chip" href="#(?:pp-shelf-openvibe-)?([a-z-]+)">()([^<]+)<\/a>/g)];
++ const groupChips = [...grouped.matchAll(/<label for="ovp-shelf-openvibe-(?:pp-shelf-openvibe-)?([a-z-]+)">()([^<]+)(?: <span class="ov-parts-n">[^<]*<\/span>)?<\/label>/g)];
assert.deepStrictEqual(groupChips.map((m) => m[1]), ['watch-stream', 'your-openvibe', 'platform-and-libraries'], 'a chip per group');
-- assert.ok(!/type="radio"/.test(grouped), 'no chip is a radio: nothing is picked, every pane shows');
++ assert.ok(/<input type=\"radio\" class=\"ov-parts-r\"[^>]* checked>/.test(grouped), 'the first part is open on a phone (Shared pick(): tabs, 11-12)');
// Every page stays in the page.
assert.strictEqual((grouped.match(/class="sc-card wk-h-card"/g) || []).length, 3, 'every page card is in the page');
ddiff --git a/test/perf-budget.test.js b/test/perf-budget.test.js
iindex 994769b..11bc620 100644
---- a/test/perf-budget.test.js
++++ b/test/perf-budget.test.js
@@@ -12,13 +12,13 @@ const { spawn } = require('child_process');
const { measure, check, format } = require('openvibe-shared/perf-budget');
const BUDGETS = {
-- htmlRawKB: 50.5, // 50.5 openvibe-shared v4.202.0 (2026-11-11: measured 50.5, raised by pin-bump from 50); 50: measured 49.6 with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 48.2: measured 46.2 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
++ htmlRawKB: 51, // 51 openvibe-shared v4.228.0 (2026-11-12: measured 50.9, raised by pin-bump from 50.5); 50.5 openvibe-shared v4.202.0 (2026-11-11: measured 50.5, raised by pin-bump from 50); 50: measured 49.6 with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 48.2: measured 46.2 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
htmlBrotliKB: 11.5, // 11.5: measured 11.0-11.1 with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 11: measured 10.5 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
jsFiles: 5, // 5 (theme-loader, web-runtime, navbar, footer, boost: openvibe-shared/shell adds web-runtime, 2026-10-04)
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 with openvibe-shared 4.190.0 (2026-11-10: the site name's dropdown, the footer's online strip, the balances pill); 376.7: measured 368.7 with openvibe-shared 4.163.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, // 1
-- cssRawKB: 53.6, // 53.6: measured 48.6 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
++ cssRawKB: 58.5, // 58.5 openvibe-shared v4.228.0 (2026-11-12: measured 58.4, raised by pin-bump from 53.6); 53.6: measured 48.6 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
cssBrotliKB: 11.3, // 11.3: measured 10.1 with openvibe-shared 4.163.0, plus room for 4.162.0–4.163.0, 2026-11-09
externalFiles: 1, // 0
};