@bongos/core 1.24.80 → 1.24.82
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 +154 -124
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +4 -0
- package/clients/bongos-client/index.cjs +4 -0
- package/clients/bongos-client/index.d.ts +5 -0
- package/clients/bongos-client/index.mjs +4 -0
- package/docs/adr/0402-helm-is-the-halls-look-and-the-hall-is-dark-only.md +142 -0
- package/docs/adr/README.md +1 -0
- package/docs/api/openapi.json +86 -2
- package/docs/api-reference.md +4 -2
- package/docs/copy-inventory.md +51 -50
- package/docs/copy-registry.json +121 -123
- package/docs/module-api-changelog.md +4 -0
- package/docs/page-inventory.json +2 -3
- package/docs/page-readings.json +226 -220
- package/modules/builder-settings/hall-view-prefs.js +50 -0
- package/modules/builder-settings/routes/settings.js +32 -0
- package/modules/hall-ui/public/ai-studio.html +5 -3
- package/modules/hall-ui/public/ai-studio.states.json +1 -0
- package/modules/hall-ui/public/atlas.html +3 -3
- package/modules/hall-ui/public/atlas.states.json +1 -0
- package/modules/hall-ui/public/blockers.html +3 -3
- package/modules/hall-ui/public/board-room.html +3 -3
- package/modules/hall-ui/public/board-room.states.json +1 -0
- package/modules/hall-ui/public/city.css +1 -3
- package/modules/hall-ui/public/city.html +6 -9
- package/modules/hall-ui/public/city.js +10 -55
- package/modules/hall-ui/public/city.states.json +7 -32
- package/modules/hall-ui/public/collab.html +3 -3
- package/modules/hall-ui/public/collab.states.json +1 -0
- package/modules/hall-ui/public/commands.html +3 -3
- package/modules/hall-ui/public/commands.states.json +1 -0
- package/modules/hall-ui/public/controls.css +63 -11
- package/modules/hall-ui/public/copy-desk.html +3 -3
- package/modules/hall-ui/public/copy-desk.states.json +1 -0
- package/modules/hall-ui/public/deploy.html +3 -3
- package/modules/hall-ui/public/deploy.states.json +1 -0
- package/modules/hall-ui/public/goal-map.html +4 -4
- package/modules/hall-ui/public/goals.html +3 -3
- package/modules/hall-ui/public/goals.states.json +1 -0
- package/modules/hall-ui/public/government.html +3 -3
- package/modules/hall-ui/public/government.states.json +1 -0
- package/modules/hall-ui/public/idea.html +3 -3
- package/modules/hall-ui/public/idea.states.json +1 -0
- package/modules/hall-ui/public/ideas.html +3 -3
- package/modules/hall-ui/public/ideas.states.json +1 -0
- package/modules/hall-ui/public/index-founding.states.json +1 -0
- package/modules/hall-ui/public/index-genesis-decide.states.json +1 -0
- package/modules/hall-ui/public/index-genesis-demo.states.json +1 -0
- package/modules/hall-ui/public/index-genesis.states.json +1 -0
- package/modules/hall-ui/public/index.html +5 -5
- package/modules/hall-ui/public/index.states.json +1 -0
- package/modules/hall-ui/public/market-watch-item.html +3 -3
- package/modules/hall-ui/public/market-watch-item.states.json +1 -0
- package/modules/hall-ui/public/market-watch-rules.html +3 -3
- package/modules/hall-ui/public/market-watch-rules.states.json +1 -0
- package/modules/hall-ui/public/market-watch.html +3 -3
- package/modules/hall-ui/public/market-watch.states.json +1 -0
- package/modules/hall-ui/public/modules.html +3 -3
- package/modules/hall-ui/public/modules.states.json +1 -0
- package/modules/hall-ui/public/money.html +3 -3
- package/modules/hall-ui/public/money.states.json +1 -0
- package/modules/hall-ui/public/my-agents.html +3 -3
- package/modules/hall-ui/public/my-agents.states.json +1 -0
- package/modules/hall-ui/public/options-menu.js +2 -1
- package/modules/hall-ui/public/primer.html +3 -3
- package/modules/hall-ui/public/primer.states.json +1 -0
- package/modules/hall-ui/public/profile.html +3 -3
- package/modules/hall-ui/public/profile.states.json +1 -0
- package/modules/hall-ui/public/project-settings.html +3 -3
- package/modules/hall-ui/public/roster.html +3 -3
- package/modules/hall-ui/public/roster.states.json +1 -0
- package/modules/hall-ui/public/settings-view.js +75 -0
- package/modules/hall-ui/public/settings.html +17 -4
- package/modules/hall-ui/public/settings.states.json +1 -0
- package/modules/hall-ui/public/shell-game.css +97 -42
- package/modules/hall-ui/public/shell-game.js +138 -40
- package/modules/hall-ui/public/shell.js +12 -43
- package/modules/hall-ui/public/street-card.states.json +1 -0
- package/modules/hall-ui/public/street.css +1 -5
- package/modules/hall-ui/public/street.html +5 -9
- package/modules/hall-ui/public/street.js +8 -59
- package/modules/hall-ui/public/street.states.json +7 -32
- package/modules/hall-ui/public/studio.html +3 -3
- package/modules/hall-ui/public/studio.states.json +1 -0
- package/modules/hall-ui/public/style.css +126 -65
- package/modules/hall-ui/public/task.html +3 -3
- package/modules/hall-ui/public/task.states.json +1 -0
- package/modules/hall-ui/public/thinking.html +4 -4
- package/modules/hall-ui/public/thinking.states.json +1 -0
- package/modules/hall-ui/public/tweak-editor.html +3 -3
- package/modules/hall-ui/public/tweak-editor.states.json +1 -0
- package/modules/hall-ui/public/visor.js +7 -1
- package/modules/hall-ui/public/watch.html +3 -3
- package/modules/hall-ui/public/watch.states.json +1 -0
- package/modules/hall-ui/public/work-founding.states.json +1 -0
- package/modules/hall-ui/public/work.html +3 -3
- package/modules/hall-ui/public/work.states.json +1 -0
- package/modules/hall-ui/records/game-mode.md +5 -4
- package/modules/hall-ui/records/start-screen.md +10 -2
- package/modules/hall-ui/specimens/components.states.json +2 -1
- package/modules/ui-design/public/brand.html +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +12 -0
- package/scripts/hall-preview/README.md +2 -3
- package/scripts/hall-preview/pref-writes.js +8 -1
- package/src/bongos/serve-internal.js +7 -2
- package/src/hall-helm.js +79 -0
- package/src/module-api.js +1 -1
- package/tests/design_reference.mjs +1 -1
- package/tests/hall_builders_page_pass.mjs +2 -1
- package/tests/hall_city.mjs +15 -29
- package/tests/hall_controls.mjs +52 -4
- package/tests/hall_fullscreen.mjs +42 -21
- package/tests/hall_helm.mjs +187 -0
- package/tests/hall_record_world.mjs +4 -2
- package/tests/hall_start_screen.mjs +103 -5
- package/tests/hall_street.mjs +13 -26
- package/tests/hall_topbar_320.mjs +4 -2
- package/tests/hall_view_prefs.mjs +42 -0
- package/tests/hall_visor.mjs +3 -2
- package/tests/nav_permission_atoms.mjs +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// tests/hall_view_prefs.mjs — the game-or-classic choice kept on the account
|
|
2
|
+
// (task 1005200, modules/builder-settings/hall-view-prefs.js), and the two routes
|
|
3
|
+
// that read and write it.
|
|
4
|
+
import { test } from 'node:test';
|
|
5
|
+
import assert from 'node:assert/strict';
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { createRequire } from 'node:module';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
const ROOT = fileURLToPath(new URL('..', import.meta.url));
|
|
13
|
+
const prefs = require('../modules/builder-settings/hall-view-prefs.js');
|
|
14
|
+
|
|
15
|
+
test('never chosen is null, not a default view: the sign-in chooser asks', () => {
|
|
16
|
+
assert.equal(prefs.storedView({}), null);
|
|
17
|
+
assert.equal(prefs.storedView(null), null);
|
|
18
|
+
assert.equal(prefs.storedView({ hall_view: 'fullscreen' }), null, 'an unknown value is not a choice');
|
|
19
|
+
assert.deepEqual(prefs.describeForApi({ hall_view: 'game' }), { view: 'game', views: ['game', 'classic'] });
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('a PATCH takes exactly { view: game | classic }', () => {
|
|
23
|
+
assert.deepEqual(prefs.validatePatch({ view: 'classic' }), { ok: true, view: 'classic' });
|
|
24
|
+
assert.equal(prefs.validatePatch({}).ok, false, 'no view');
|
|
25
|
+
assert.equal(prefs.validatePatch({ view: 'both' }).ok, false);
|
|
26
|
+
assert.equal(prefs.validatePatch({ view: 'game', extra: 1 }).ok, false, 'unknown keys refused');
|
|
27
|
+
assert.equal(prefs.validatePatch([]).ok, false);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('saving the view keeps every other behaviour preference', () => {
|
|
31
|
+
const before = { wandering: 2, widgets: 'rich', interaction: { verbosity: 'concise' } };
|
|
32
|
+
const after = prefs.applyView(before, 'game');
|
|
33
|
+
assert.deepEqual(after, { ...before, hall_view: 'game' });
|
|
34
|
+
assert.equal(before.hall_view, undefined, 'pure: the input is not changed');
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('the routes: own builder only, GET and PATCH on /me/hall-view', () => {
|
|
38
|
+
const src = fs.readFileSync(path.join(ROOT, 'modules/builder-settings/routes/settings.js'), 'utf8');
|
|
39
|
+
assert.match(src, /router\.get\('\/me\/hall-view', api\.requireBuilder,/);
|
|
40
|
+
assert.match(src, /router\.patch\('\/me\/hall-view', api\.requireBuilder,/);
|
|
41
|
+
assert.match(src, /hallViewPrefs\.applyView\(existing, v\.view\)/, 'writes through the pure shaper');
|
|
42
|
+
});
|
package/tests/hall_visor.mjs
CHANGED
|
@@ -151,7 +151,7 @@ test('in game mode the glass shows the place, the main action, the sprite and th
|
|
|
151
151
|
}));
|
|
152
152
|
assert.equal(g.shown, 'block');
|
|
153
153
|
assert.equal(g.place, 'Test city');
|
|
154
|
-
assert.match(g.main, /^Claim a task
|
|
154
|
+
assert.match(g.main, /^Goal sky/, 'Claim a task opens a classic page, so it is off the glass in game mode (task 1005200)');
|
|
155
155
|
assert.equal(g.who, 'Artisan');
|
|
156
156
|
assert.equal(g.credits, '56,021 credits');
|
|
157
157
|
assert.equal(g.sprite, '/builders/characters/artisan.png');
|
|
@@ -189,7 +189,8 @@ test('the sheet lists the character\'s actions, then this place, and runs a scen
|
|
|
189
189
|
const { ctx, page } = await open();
|
|
190
190
|
await page.click('[data-visor-sheet]');
|
|
191
191
|
const rows = await page.$$eval('.visor__sheet .visor__row', (r) => r.map((x) => [...x.children].map((c) => c.textContent).join(' ')));
|
|
192
|
-
|
|
192
|
+
// task 1005200: Claim a task and Blockers open classic pages, so they are off the glass.
|
|
193
|
+
assert.deepEqual(rows, ['Goal sky G', 'Your thinking T', 'Back to centre 0', 'Look around drag', 'Options Esc']);
|
|
193
194
|
await page.click('[data-visor-scene="0"]');
|
|
194
195
|
assert.deepEqual(await page.evaluate(() => ({ centred: window.centred, open: OTBVisor.isOpen() })), { centred: true, open: false });
|
|
195
196
|
await ctx.close();
|
|
@@ -103,7 +103,7 @@ test('the hall-preview fixture carries every atom /me resolves', () => {
|
|
|
103
103
|
// task 1005070: the remembered nav (the rail paints before /me).
|
|
104
104
|
// task 1005088: the sidebar mark is drawn by reference to the one brand mark.
|
|
105
105
|
// task 1005144: My agents, Project settings, Permissions and Modules left for the options menu.
|
|
106
|
-
const SHELL_SHA = '
|
|
106
|
+
const SHELL_SHA = '89f6f166ed22a8ee';
|
|
107
107
|
|
|
108
108
|
test('shell.js has not changed without its cache-bust being bumped', () => {
|
|
109
109
|
const actual = crypto.createHash('sha256').update(SHELL).digest('hex').slice(0, 16);
|