@bongos/core 1.24.25 → 1.24.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bongos-core.json +173 -108
- package/docs/adr/0307-autobongos-a-deterministic-supervisor-and-agentic-workers.md +12 -0
- package/docs/copy-inventory.md +280 -256
- package/docs/copy-registry.json +572 -306
- package/docs/module-api-changelog.md +4 -0
- package/docs/page-inventory.json +10 -4
- package/docs/page-readings.json +4337 -4313
- package/docs/recipes/ui-look-before-you-ship.md +1 -0
- package/modules/autonomy/fence.js +16 -1
- package/modules/government/protected-surfaces.json +2 -0
- package/modules/hall-ui/public/ai-studio.html +2 -2
- package/modules/hall-ui/public/atlas.html +1 -1
- package/modules/hall-ui/public/blockers.html +2 -2
- package/modules/hall-ui/public/blockers.js +3 -1
- package/modules/hall-ui/public/board-room.html +3 -1
- package/modules/hall-ui/public/city.html +1 -1
- package/modules/hall-ui/public/collab.html +4 -4
- package/modules/hall-ui/public/collab.js +4 -0
- package/modules/hall-ui/public/commands.html +3 -3
- package/modules/hall-ui/public/copy-desk.html +3 -3
- package/modules/hall-ui/public/core-move-notice.js +9 -6
- package/modules/hall-ui/public/criterion-uat-ui.js +1 -1
- package/modules/hall-ui/public/deploy-handoff.js +203 -0
- package/modules/hall-ui/public/deploy.html +6 -2
- package/modules/hall-ui/public/deploy.js +7 -1
- package/modules/hall-ui/public/diagrams.html +1 -1
- package/modules/hall-ui/public/drachmae.html +2 -2
- package/modules/hall-ui/public/fleet.html +3 -1
- package/modules/hall-ui/public/gate.html +3 -1
- package/modules/hall-ui/public/goal-map.html +1 -1
- package/modules/hall-ui/public/goals-page.js +1 -1
- package/modules/hall-ui/public/goals.css +3 -2
- package/modules/hall-ui/public/goals.html +3 -3
- package/modules/hall-ui/public/goals.js +1 -1
- package/modules/hall-ui/public/government.html +3 -1
- package/modules/hall-ui/public/hall-widgets.js +9 -9
- package/modules/hall-ui/public/idea.html +1 -1
- package/modules/hall-ui/public/ideas.html +3 -3
- package/modules/hall-ui/public/index.html +3 -1
- package/modules/hall-ui/public/lightbulb.js +1 -1
- package/modules/hall-ui/public/market-watch-item.html +2 -2
- package/modules/hall-ui/public/market-watch-rules.html +2 -2
- package/modules/hall-ui/public/market-watch-settings.html +3 -1
- package/modules/hall-ui/public/market-watch.html +2 -2
- package/modules/hall-ui/public/modules.html +2 -2
- package/modules/hall-ui/public/my-agents.html +3 -3
- package/modules/hall-ui/public/primer.html +2 -2
- package/modules/hall-ui/public/profile.html +6 -6
- package/modules/hall-ui/public/project-settings.html +3 -1
- package/modules/hall-ui/public/ranks.html +4 -4
- package/modules/hall-ui/public/roadmap.html +2 -2
- package/modules/hall-ui/public/roster.html +2 -2
- package/modules/hall-ui/public/sessions.html +3 -1
- package/modules/hall-ui/public/settings-software-update.js +23 -9
- package/modules/hall-ui/public/settings-specialities.js +1 -1
- package/modules/hall-ui/public/settings.html +10 -6
- package/modules/hall-ui/public/settings.js +3 -0
- package/modules/hall-ui/public/shell.js +25 -73
- package/modules/hall-ui/public/street.html +1 -1
- package/modules/hall-ui/public/studio.html +1 -1
- package/modules/hall-ui/public/studio.js +3 -3
- package/modules/hall-ui/public/style.css +209 -40
- package/modules/hall-ui/public/task-detail.js +2 -2
- package/modules/hall-ui/public/task.html +1 -1
- package/modules/hall-ui/public/thinking.html +1 -1
- package/modules/hall-ui/public/tweak-editor.html +2 -2
- package/modules/hall-ui/public/update-pill.js +623 -0
- package/modules/hall-ui/public/watch.html +3 -1
- package/modules/hall-ui/public/watch.js +1 -1
- package/modules/hall-ui/public/work.html +4 -4
- package/modules/hall-ui/records/loader.md +35 -0
- package/modules/hall-ui/records/update-pill.md +12 -0
- package/modules/lifecycle/github-push.js +1 -0
- package/modules/lifecycle/routes/tasks.js +2 -2
- package/modules/lifecycle/runner-self-guard.js +122 -0
- package/modules/lifecycle/runner-self.js +154 -0
- package/modules/public-landing/public/account.html +3 -3
- package/modules/public-landing/public/assets/cosmos.css +45 -0
- package/modules/public-landing/public/community.html +4 -4
- package/modules/public-landing/public/connections.html +1 -1
- package/modules/public-landing/public/guild.html +1 -1
- package/modules/public-landing/public/invitations.html +4 -4
- package/modules/public-landing/public/projects.html +26 -26
- package/modules/status-ui/public/index.html +2 -2
- package/modules/status-ui/public/index.states.json +12 -0
- package/modules/status-ui/public/status.js +10 -2
- package/modules/status-ui/public/style.css +57 -0
- package/modules/ui-design/kit/README.md +1 -1
- package/modules/ui-design/kit/serve.js +8 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +24 -0
- package/scripts/bongos/autobongos-loop.js +4 -0
- package/scripts/bongos/autobongos-run.js +21 -4
- package/scripts/bongos/autobongos-tweak-lane.js +5 -3
- package/scripts/bongos/ship-flow.js +20 -0
- package/scripts/hall-preview/README.md +1 -0
- package/scripts/hall-preview/server.js +9 -0
- package/src/bongos/apex-hall-redirects.js +53 -0
- package/src/bongos/serve-internal.js +3 -18
- package/src/module-api.js +1 -1
- package/tests/autobongos_host_access.mjs +5 -3
- package/tests/autobongos_self_modification.mjs +420 -0
- package/tests/core_update_banner.mjs +6 -92
- package/tests/core_upgrade_owner_door.mjs +4 -56
- package/tests/deploy_handoff.mjs +206 -0
- package/tests/government_protected_surfaces.mjs +15 -0
- package/tests/hall_loading.mjs +153 -0
- package/tests/hub_connections_page.mjs +1 -1
- package/tests/hub_invitations_page.mjs +1 -1
- package/tests/loading_mark.mjs +203 -0
- package/tests/nav_permission_atoms.mjs +3 -2
- package/tests/software_update.mjs +39 -2
- package/tests/update_pill.mjs +431 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// tests/loading_mark.mjs — the Bongos-mark loader on the apex pages and the status page
|
|
2
|
+
// (task 1005053, goal 1000095; the hall's own is task 1005043).
|
|
3
|
+
//
|
|
4
|
+
// Owner ask, 2026-11-03: a smooth load screen with the Bongos logo anywhere the
|
|
5
|
+
// software waits for data, in the spirit of monday.com's Vibe data loaders. The
|
|
6
|
+
// apex pages (cosmos.css) and the status page (its own sheet) each carry the same
|
|
7
|
+
// CSS component, .loading-mark, in their own tokens; a page opts in by putting the
|
|
8
|
+
// class on the placeholder it already had, whose words stay as the caption. These
|
|
9
|
+
// cases read the real sheets and pages, per surface: the loader keeps DESIGN.md's
|
|
10
|
+
// motion and colour rules, its rest frame is the logo, and no waiting placeholder
|
|
11
|
+
// is left as a bare line of text.
|
|
12
|
+
import assert from 'node:assert/strict';
|
|
13
|
+
import { test } from 'node:test';
|
|
14
|
+
import fs from 'node:fs';
|
|
15
|
+
import path from 'node:path';
|
|
16
|
+
import vm from 'node:vm';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
|
|
19
|
+
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
20
|
+
const LANDING = path.join(ROOT, 'modules', 'public-landing', 'public');
|
|
21
|
+
const STATUS = path.join(ROOT, 'modules', 'status-ui', 'public');
|
|
22
|
+
const read = (dir, f) => fs.readFileSync(path.join(dir, f), 'utf8').replace(/\r\n/g, '\n');
|
|
23
|
+
|
|
24
|
+
const COSMOS = read(LANDING, 'assets/cosmos.css');
|
|
25
|
+
const STATUS_CSS = read(STATUS, 'style.css');
|
|
26
|
+
const APEX_PAGES = ['account', 'community', 'connections', 'guild', 'invitations', 'projects'];
|
|
27
|
+
|
|
28
|
+
// The loader's section of a sheet: from its banner to the last of its keyframes.
|
|
29
|
+
function section(css, banner) {
|
|
30
|
+
const start = css.indexOf(banner);
|
|
31
|
+
assert.ok(start > -1, `the loader's banner is in the sheet: ${banner}`);
|
|
32
|
+
const end = css.indexOf('@keyframes loading-mark-breathe', start);
|
|
33
|
+
assert.ok(end > start, 'the loader section ends on its breath');
|
|
34
|
+
return css.slice(start, css.indexOf('}', css.indexOf('}', end) + 1) + 1);
|
|
35
|
+
}
|
|
36
|
+
const SURFACES = {
|
|
37
|
+
apex: { css: COSMOS, loader: section(COSMOS, '/* ── the loader (task 1005053') },
|
|
38
|
+
status: { css: STATUS_CSS, loader: section(STATUS_CSS, '/* ---------- The loader (task 1005053') },
|
|
39
|
+
};
|
|
40
|
+
const flat = (s) => s.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\s+/g, ' ');
|
|
41
|
+
const masksOf = (css) => [...css.matchAll(/url\("data:image\/svg\+xml,([^"]+)"\)/g)].map((m) => decodeURIComponent(m[1]));
|
|
42
|
+
function keyframes(css, name) {
|
|
43
|
+
const m = css.match(new RegExp(`@keyframes ${name} ?\\{`));
|
|
44
|
+
assert.ok(m, `@keyframes ${name} exists`);
|
|
45
|
+
let depth = 1, i = m.index + m[0].length;
|
|
46
|
+
for (; i < css.length && depth; i++) depth += css[i] === '{' ? 1 : css[i] === '}' ? -1 : 0;
|
|
47
|
+
return css.slice(m.index + m[0].length, i - 1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
test('the apex loader is the bar\'s own Bongos mark, and the status loader is the same mark', () => {
|
|
51
|
+
// The apex bar draws the mark inline (account.html's .bongosMark); the loader's
|
|
52
|
+
// two masks carry exactly its arc, core and dot, so the loader IS the logo.
|
|
53
|
+
const bar = read(LANDING, 'account.html');
|
|
54
|
+
const arc = bar.match(/<path class="mr" d="([^"]+)"/)[1];
|
|
55
|
+
assert.match(bar, /<circle class="mp" cx="100" cy="100" r="55"/);
|
|
56
|
+
assert.match(bar, /<circle cx="156" cy="46" r="12" style="fill:var\(--accent\)"\/>/);
|
|
57
|
+
const [ring, dot] = masksOf(SURFACES.apex.loader);
|
|
58
|
+
assert.ok(ring.includes(`d='${arc}'`), 'the ring is the bar mark\'s arc');
|
|
59
|
+
assert.ok(ring.includes("<circle cx='100' cy='100' r='55'/>"), 'the core is the bar mark\'s core');
|
|
60
|
+
assert.ok(dot.includes("<circle cx='156' cy='46' r='12'/>"), 'the dot is the bar mark\'s dot');
|
|
61
|
+
// The status page has no Bongos mark of its own: its loader carries the apex's two
|
|
62
|
+
// masks byte for byte, so the two surfaces cannot drift into two logos.
|
|
63
|
+
assert.deepEqual(masksOf(SURFACES.status.loader), masksOf(SURFACES.apex.loader));
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
for (const [name, { css, loader }] of Object.entries(SURFACES)) {
|
|
67
|
+
test(`${name}: it moves in CSS only, on transform and filter only, and rests on the logo`, () => {
|
|
68
|
+
for (const frame of ['loading-mark-arrive', 'loading-mark-turn', 'loading-mark-breathe']) {
|
|
69
|
+
const body = keyframes(css, frame);
|
|
70
|
+
const props = [...body.matchAll(/([a-z-]+)\s*:/g)].map((m) => m[1]);
|
|
71
|
+
assert.ok(props.length, `${frame} animates something`);
|
|
72
|
+
for (const p of props) assert.ok(['transform', 'filter'].includes(p), `${frame} animates ${p}, not transform or filter`);
|
|
73
|
+
}
|
|
74
|
+
// The turn has no `from`, so 0deg (the logo's own pose, the dot top right) is where
|
|
75
|
+
// it starts and where the Kill Switch leaves it; the arrival and the breath have no
|
|
76
|
+
// `to`, so their resting value is the element as styled, fully shown.
|
|
77
|
+
assert.match(keyframes(css, 'loading-mark-turn'), /^\s*to ?\{ ?transform: ?rotate\(1turn\); ?\}\s*$/);
|
|
78
|
+
assert.match(keyframes(css, 'loading-mark-arrive'), /^\s*from ?\{/);
|
|
79
|
+
assert.match(keyframes(css, 'loading-mark-breathe'), /^\s*from ?\{/);
|
|
80
|
+
// It arrives 240ms late, so a read that answers faster never shows it.
|
|
81
|
+
assert.match(flat(loader), /\.loading-mark ?\{[^}]*animation: ?loading-mark-arrive 500ms cubic-bezier\(\.16, ?1, ?\.3, ?1\) 240ms both;/);
|
|
82
|
+
// The Kill Switch stops every animation, the pseudo-elements included.
|
|
83
|
+
assert.match(flat(css), /@media \(prefers-reduced-motion: ?reduce\) ?\{ ?\*, ?\*::before, ?\*::after ?\{ ?animation: ?none !important; ?transition: ?none !important; ?\} ?\}/);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
test(`${name}: every colour is a token; the black in the masks is alpha, not paint`, () => {
|
|
87
|
+
const css = flat(loader);
|
|
88
|
+
assert.doesNotMatch(css, /#[0-9a-fA-F]{3,8}\b|rgba?\(|hsla?\(/, 'no colour literal');
|
|
89
|
+
const paints = [...css.matchAll(/(?:background|color): ?([^;]+);/g)].map((m) => m[1].trim());
|
|
90
|
+
assert.equal(paints.length, 3, 'the ink, the dot and the caption are painted');
|
|
91
|
+
for (const p of paints) assert.match(p, /^(var\(--[a-z-]+\)|color-mix\(in srgb, ?var\(--ink\) 30%, ?var\(--bg-card\)\))$/, `${p} is a token or a mix of one`);
|
|
92
|
+
// The one accent is the dot: the live thing on a waiting page (the One Warm Thing Rule).
|
|
93
|
+
assert.equal((css.match(/var\(--accent\)/g) || []).length, 1, 'the accent paints the dot alone');
|
|
94
|
+
const masks = masksOf(loader);
|
|
95
|
+
assert.equal(masks.length, 2, 'two masks: the ring and core, and the dot');
|
|
96
|
+
for (const m of masks) assert.doesNotMatch(m.replace(/stroke='black'|fill='none'/g, ''), /fill='|stroke='|#/, 'a mask carries no colour of its own');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test(`${name}: the dot shares the ring's grid cell, so no page padding can knock it off`, () => {
|
|
100
|
+
const css = flat(loader);
|
|
101
|
+
assert.match(css, /\.loading-mark ?\{[^}]*display: ?grid;/);
|
|
102
|
+
assert.match(css, /\.loading-mark::before, ?\.loading-mark::after ?\{[^}]*grid-area: ?1 ?\/ ?1;/);
|
|
103
|
+
assert.doesNotMatch(css, /position: ?absolute|top: ?|left: ?/, 'nothing is positioned by hand');
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
test('apex: three sizes, and a hidden placeholder stays hidden', () => {
|
|
108
|
+
const css = flat(SURFACES.apex.loader);
|
|
109
|
+
assert.match(css, /\.loading-mark--page ?\{[^}]*--lm-size: ?64px;/);
|
|
110
|
+
assert.match(css, /\.loading-mark--inline ?\{[^}]*--lm-size: ?16px;[^}]*grid-template-columns: ?var\(--lm-size\) minmax\(0, ?1fr\);/);
|
|
111
|
+
// The loader is display: grid, which outranks the browser's own [hidden]; the
|
|
112
|
+
// apex pages put a placeholder away with .hidden, so cosmos's rule must win.
|
|
113
|
+
assert.match(COSMOS, /\[hidden\]\{display:none !important;\}/);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
test('apex: every waiting placeholder wears the loader, in the markup and as the scripts write it', () => {
|
|
117
|
+
// A status line rewritten IN PLACE (its words become the answer) keeps its plain
|
|
118
|
+
// words: the loader belongs to a placeholder that is hidden or replaced when the
|
|
119
|
+
// data lands. Each one is named here with why.
|
|
120
|
+
const IN_PLACE = new Set([
|
|
121
|
+
"community.html:say('Searching…')", // the search's status line, rewritten with the count
|
|
122
|
+
"projects.html:hint('h-renderKey', 'Checking with Render…')", // the Render key's hint, rewritten with the answer
|
|
123
|
+
"projects.html:say('Reading your organisations from GitHub…')", // the org picker's status line
|
|
124
|
+
"projects.html:say('Checking with GitHub…')", // the same line
|
|
125
|
+
"projects.html:inviteSay(id, 'Finding your project’s invite page…'", // the invite box's message, after a press
|
|
126
|
+
"projects.html:inviteSay(id, 'Finding the guild’s members…'", // the same, for a guild
|
|
127
|
+
]);
|
|
128
|
+
const WAIT_WORD = '(?:Loading|Reading|Opening|Checking|Finding|Searching|Looking|Fetching)';
|
|
129
|
+
const ELEMENT = new RegExp(`<(p|div|li|span|td)\\b([^>]*)>\\s*${WAIT_WORD}\\b[^<]*…\\s*<\\/\\1>`, 'g');
|
|
130
|
+
const LITERAL = new RegExp(`[a-zA-Z]+\\((?:id, )?'${WAIT_WORD}[^']*…'`, 'g');
|
|
131
|
+
const misses = [];
|
|
132
|
+
for (const page of APEX_PAGES) {
|
|
133
|
+
const html = read(LANDING, `${page}.html`);
|
|
134
|
+
for (const m of html.matchAll(ELEMENT)) {
|
|
135
|
+
if (!/\bloading-mark\b/.test(m[2])) misses.push(`${page}.html: ${m[0].slice(0, 100)}`);
|
|
136
|
+
}
|
|
137
|
+
for (const line of html.split('\n')) {
|
|
138
|
+
for (const m of line.matchAll(LITERAL)) {
|
|
139
|
+
if (/loading-mark/.test(line) || /pickNote\('[^']*', true\)/.test(line)) continue;
|
|
140
|
+
const key = `${page}.html:${m[0]}`;
|
|
141
|
+
if (!IN_PLACE.has(key) && !IN_PLACE.has(`${key})`)) misses.push(key);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
assert.deepEqual(misses, [], 'every waiting placeholder wears the loader');
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
test('apex: each page waits with the size that fits it', () => {
|
|
149
|
+
const html = Object.fromEntries(APEX_PAGES.map((p) => [p, read(LANDING, `${p}.html`)]));
|
|
150
|
+
// a page with nothing else to show yet: the page size
|
|
151
|
+
for (const [page, words] of [['account', 'Reading your account…'], ['connections', 'Reading your connections…'], ['guild', 'Reading this guild…'], ['invitations', 'Reading your invitations…']]) {
|
|
152
|
+
assert.ok(html[page].includes(`<p class="loading loading-mark loading-mark--page" id="loading" role="status">${words}</p>`), `${page} waits on the page loader`);
|
|
153
|
+
}
|
|
154
|
+
assert.ok(html.projects.includes('<div class="loading loading-mark loading-mark--page" id="loading" role="status">Reading your projects…</div>'));
|
|
155
|
+
assert.ok(html.projects.includes('<div class="loading loading-mark loading-mark--page" id="mLoading" role="status">Reading the project…</div>'));
|
|
156
|
+
// a section of a page: the default
|
|
157
|
+
for (const id of ['homeLoading', 'boardLoading', 'weekLoading', 'recruitLoading']) {
|
|
158
|
+
assert.match(html.community, new RegExp(`<p class="commMsg loading-mark" id="${id}" role="status">`), `community's ${id}`);
|
|
159
|
+
}
|
|
160
|
+
// a line in a band or a list: inline. The manage page's thirteen sections each wait on
|
|
161
|
+
// their own read, so a mark the height of the line keeps the page from jumping.
|
|
162
|
+
assert.equal((html.projects.match(/><p class="finePrint loading-mark loading-mark--inline" role="status">(?:Reading the project…|Reading the project’s settings…|Checking the repository on GitHub…)<\/p><\/div>/g) || []).length, 14);
|
|
163
|
+
assert.ok(html.account.includes('<p class="aWhat loading-mark loading-mark--inline" id="waysLoading" role="status">'));
|
|
164
|
+
assert.ok(html.account.includes('<p class="aWhat loading-mark loading-mark--inline" id="buildingLoading" role="status">'));
|
|
165
|
+
assert.ok(html.projects.includes('<div id="ghBusy" class="hint loading-mark loading-mark--inline" role="status" hidden>'));
|
|
166
|
+
// the scripts write them back the same way, and the picker's first open wears it too
|
|
167
|
+
for (const call of ['repoVisMsg(', 'visMsg(', 'joinMsg(', 'doorMsg(', 'envMsg(']) {
|
|
168
|
+
assert.ok(html.projects.includes(`${call}'<p class="finePrint loading-mark loading-mark--inline" role="status">`), `${call} writes the loader`);
|
|
169
|
+
}
|
|
170
|
+
for (const call of ['visRuns(', 'joinRuns(']) {
|
|
171
|
+
assert.ok(html.projects.includes(`${call}'<span class="loading-mark loading-mark--inline" role="status">Checking what the project is running…</span>');`), `${call} writes the loader`);
|
|
172
|
+
}
|
|
173
|
+
assert.match(html.projects, /wait\.className = 'finePrint loading-mark loading-mark--inline'; wait\.setAttribute\('role', 'status'\);/);
|
|
174
|
+
assert.match(html.invitations, /li\.className = 'joinList__note' \+ \(waiting \? ' loading-mark loading-mark--inline' : ''\);/);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test('status: its two waiting tablets wear the loader, and a failed or empty read stops it', () => {
|
|
178
|
+
const html = read(STATUS, 'index.html');
|
|
179
|
+
assert.ok(html.includes('<div id="versions" class="versions">\n <p class="empty loading-mark" role="status">The masons are at their tools…</p>'));
|
|
180
|
+
assert.ok(html.includes('<div id="world-snapshot" class="world-snapshot">\n <p class="empty loading-mark" role="status">The cartographers are still at their survey…</p>'));
|
|
181
|
+
// the header's "Tablet being consulted…" is rewritten in place before any read
|
|
182
|
+
// starts (stampRefreshTime), so it is never a wait and keeps its plain words
|
|
183
|
+
assert.match(html, /<span class="herm__updated" id="last-updated">Tablet being consulted…<\/span>/);
|
|
184
|
+
// The Kill Switch is the last thing in the status sheet, so nothing can outrank it.
|
|
185
|
+
assert.match(STATUS_CSS.trimEnd(), /@media \(prefers-reduced-motion: reduce\) \{\n {2}\*, \*::before, \*::after \{ animation: none !important; transition: none !important; \}\n\}$/);
|
|
186
|
+
|
|
187
|
+
const js = read(STATUS, 'status.js');
|
|
188
|
+
// the three ways a tablet can end its wait without data each stop the loader
|
|
189
|
+
assert.match(js, /\} catch \(_\) \{\n {4}stopWaiting\(els\.worldSnapshot\);\n {4}return;\n {2}\}/);
|
|
190
|
+
assert.match(js, /if \(snapshots\.length === 0\) \{ stopWaiting\(els\.worldSnapshot\); return; \}/);
|
|
191
|
+
assert.match(js, /loadVersions\(\)\.catch\(\(e\) => \{ stopWaiting\(els\.versions\); console\.error\('versions', e\); \}\)/);
|
|
192
|
+
// ...and stopWaiting itself, run: it takes the class off and leaves the words alone.
|
|
193
|
+
const src = js.match(/function stopWaiting\(el\) \{[\s\S]*?\n\}/)[0];
|
|
194
|
+
const removed = [];
|
|
195
|
+
const wait = { textContent: 'The masons are at their tools…', classList: { remove: (c) => removed.push(c) } };
|
|
196
|
+
const host = { querySelectorAll: (sel) => (sel === '.loading-mark' ? [wait] : []) };
|
|
197
|
+
const ctx = vm.createContext({});
|
|
198
|
+
vm.runInContext(`${src}; this.stopWaiting = stopWaiting;`, ctx);
|
|
199
|
+
ctx.stopWaiting(host);
|
|
200
|
+
ctx.stopWaiting(null);
|
|
201
|
+
assert.deepEqual(removed, ['loading-mark']);
|
|
202
|
+
assert.equal(wait.textContent, 'The masons are at their tools…');
|
|
203
|
+
});
|
|
@@ -93,8 +93,9 @@ test('the hall-preview fixture carries every atom /me resolves', () => {
|
|
|
93
93
|
// says a held core version was tried and rolled back; task 1004731: the one-time
|
|
94
94
|
// "Upgraded to core X" notice after a move; task 1004826: Standing is Accomplishments;
|
|
95
95
|
// task 1004846: the new logo (its bump landed late, in task 1004852); task 1004938: the
|
|
96
|
-
// Market Watch settings nav item and its fuel glyph
|
|
97
|
-
|
|
96
|
+
// Market Watch settings nav item and its fuel glyph; task 1005041: the Update pill replaced the
|
|
97
|
+
// core-update banner.
|
|
98
|
+
const SHELL_SHA = '9e32caf8aa17dd36';
|
|
98
99
|
|
|
99
100
|
test('shell.js has not changed without its cache-bust being bumped', () => {
|
|
100
101
|
const actual = crypto.createHash('sha256').update(SHELL).digest('hex').slice(0, 16);
|
|
@@ -345,11 +345,15 @@ test('read only when its group opens — most visits to Settings are for somethi
|
|
|
345
345
|
|
|
346
346
|
const answerWith = (over) => ok({ ...FIXTURE, ...over, update: { ...FIXTURE.update, ...(over.update || {}) } });
|
|
347
347
|
|
|
348
|
+
// task 1005041: the button runs the Update pill's in-place flow, so it no longer reads as a
|
|
349
|
+
// trip off-site; its href stays the hub's door only for a page whose pill script did not load,
|
|
350
|
+
// and the hint names the hub whose small window opens for a moment.
|
|
348
351
|
test('a hosted project\'s button names the hub it opens; a self-hosted one names the command', async () => {
|
|
349
352
|
const hub = bootPanel(() => answerWith({ door: { kind: 'hub', url: 'https://cloudbongos.com/deploy?project=mercury' } }));
|
|
350
353
|
await hub.settle();
|
|
351
|
-
assert.match(hub.body(), /href="https:\/\/cloudbongos\.com\/deploy\?project=mercury">Update to [\d.]
|
|
352
|
-
assert.
|
|
354
|
+
assert.match(hub.body(), /href="https:\/\/cloudbongos\.com\/deploy\?project=mercury">Update to [\d.]+</);
|
|
355
|
+
assert.doesNotMatch(hub.body(), /↗/, 'it updates in place; it is not a link off-site any more');
|
|
356
|
+
assert.match(hub.body(), /A small window from cloudbongos\.com opens for a moment/);
|
|
353
357
|
|
|
354
358
|
const cli = bootPanel(() => answerWith({ door: { kind: 'cli', url: null } }));
|
|
355
359
|
await cli.settle();
|
|
@@ -504,6 +508,39 @@ test('the platform, which runs the door, keeps /deploy behind its own page gate'
|
|
|
504
508
|
assert.match(String(r.location), /auth|sign/i, 'and is sent to sign in, as before');
|
|
505
509
|
});
|
|
506
510
|
|
|
511
|
+
// ── the door on the hub's apex (task 1004736) ─────────────────────────────────
|
|
512
|
+
//
|
|
513
|
+
// Every hosted project's Update button is `<hub origin>/deploy?project=<slug>` — the IdP
|
|
514
|
+
// origin, or HUB_UPGRADE_URL built from the hub's public origin — and on cloudbongos.com
|
|
515
|
+
// that origin is the apex, where /deploy was a 404 (2026-10-14). The page is the hall's,
|
|
516
|
+
// on builders.<apex>. The hub answers the apex address with the hall's, so every link
|
|
517
|
+
// already written into a project's web.env works without that project moving its core.
|
|
518
|
+
|
|
519
|
+
function getOn(port, p, host) {
|
|
520
|
+
return new Promise((resolve, reject) => {
|
|
521
|
+
const req = http.request({ host: '127.0.0.1', port, path: p, headers: { Host: host } }, (res) => { res.resume(); res.on('end', () => resolve({ status: res.statusCode, location: res.headers.location })); });
|
|
522
|
+
req.on('error', reject);
|
|
523
|
+
req.end();
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
test('the apex /deploy sends the owner to the hall\'s door for the same project (task 1004736)', async () => {
|
|
528
|
+
const port = await startServer({ [MODULE_ENV]: '1' });
|
|
529
|
+
for (const p of ['/deploy?project=toast', '/deploy.html?project=toast', '/deploy/?project=toast']) {
|
|
530
|
+
const r = await getOn(port, p, 'hall.test');
|
|
531
|
+
assert.equal(r.status, 302, p);
|
|
532
|
+
assert.equal(r.location, 'https://builders.hall.test/deploy?project=toast', `${p}: the project is carried, so the door opens on it`);
|
|
533
|
+
}
|
|
534
|
+
const bare = await getOn(port, '/deploy', 'hall.test');
|
|
535
|
+
assert.equal(bare.location, 'https://builders.hall.test/deploy', 'no project → the door itself');
|
|
536
|
+
for (const p of ['/deployments', '/deploy/x', '/api/deploy']) {
|
|
537
|
+
const r = await getOn(port, p, 'hall.test');
|
|
538
|
+
assert.notEqual(String(r.location || '').includes('builders.hall.test/deploy'), true, `${p} is not the door`);
|
|
539
|
+
}
|
|
540
|
+
const onHall = await getOn(port, '/deploy?project=toast', 'builders.hall.test');
|
|
541
|
+
assert.doesNotMatch(String(onHall.location || ''), /^https:\/\/builders\./, 'on the hall itself the page is served, not bounced');
|
|
542
|
+
});
|
|
543
|
+
|
|
507
544
|
// ── the project's OWN update rule reaches the offer (task 1004535) ────────────
|
|
508
545
|
//
|
|
509
546
|
// The live defect, 2026-10-02: cloudbongos's rule on /deploy is `minor` and the sweep
|