@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.
Files changed (123) hide show
  1. package/.bongos-core.json +154 -124
  2. package/clients/bongos-client/README.md +1 -1
  3. package/clients/bongos-client/bongos-client.global.js +4 -0
  4. package/clients/bongos-client/index.cjs +4 -0
  5. package/clients/bongos-client/index.d.ts +5 -0
  6. package/clients/bongos-client/index.mjs +4 -0
  7. package/docs/adr/0402-helm-is-the-halls-look-and-the-hall-is-dark-only.md +142 -0
  8. package/docs/adr/README.md +1 -0
  9. package/docs/api/openapi.json +86 -2
  10. package/docs/api-reference.md +4 -2
  11. package/docs/copy-inventory.md +51 -50
  12. package/docs/copy-registry.json +121 -123
  13. package/docs/module-api-changelog.md +4 -0
  14. package/docs/page-inventory.json +2 -3
  15. package/docs/page-readings.json +226 -220
  16. package/modules/builder-settings/hall-view-prefs.js +50 -0
  17. package/modules/builder-settings/routes/settings.js +32 -0
  18. package/modules/hall-ui/public/ai-studio.html +5 -3
  19. package/modules/hall-ui/public/ai-studio.states.json +1 -0
  20. package/modules/hall-ui/public/atlas.html +3 -3
  21. package/modules/hall-ui/public/atlas.states.json +1 -0
  22. package/modules/hall-ui/public/blockers.html +3 -3
  23. package/modules/hall-ui/public/board-room.html +3 -3
  24. package/modules/hall-ui/public/board-room.states.json +1 -0
  25. package/modules/hall-ui/public/city.css +1 -3
  26. package/modules/hall-ui/public/city.html +6 -9
  27. package/modules/hall-ui/public/city.js +10 -55
  28. package/modules/hall-ui/public/city.states.json +7 -32
  29. package/modules/hall-ui/public/collab.html +3 -3
  30. package/modules/hall-ui/public/collab.states.json +1 -0
  31. package/modules/hall-ui/public/commands.html +3 -3
  32. package/modules/hall-ui/public/commands.states.json +1 -0
  33. package/modules/hall-ui/public/controls.css +63 -11
  34. package/modules/hall-ui/public/copy-desk.html +3 -3
  35. package/modules/hall-ui/public/copy-desk.states.json +1 -0
  36. package/modules/hall-ui/public/deploy.html +3 -3
  37. package/modules/hall-ui/public/deploy.states.json +1 -0
  38. package/modules/hall-ui/public/goal-map.html +4 -4
  39. package/modules/hall-ui/public/goals.html +3 -3
  40. package/modules/hall-ui/public/goals.states.json +1 -0
  41. package/modules/hall-ui/public/government.html +3 -3
  42. package/modules/hall-ui/public/government.states.json +1 -0
  43. package/modules/hall-ui/public/idea.html +3 -3
  44. package/modules/hall-ui/public/idea.states.json +1 -0
  45. package/modules/hall-ui/public/ideas.html +3 -3
  46. package/modules/hall-ui/public/ideas.states.json +1 -0
  47. package/modules/hall-ui/public/index-founding.states.json +1 -0
  48. package/modules/hall-ui/public/index-genesis-decide.states.json +1 -0
  49. package/modules/hall-ui/public/index-genesis-demo.states.json +1 -0
  50. package/modules/hall-ui/public/index-genesis.states.json +1 -0
  51. package/modules/hall-ui/public/index.html +5 -5
  52. package/modules/hall-ui/public/index.states.json +1 -0
  53. package/modules/hall-ui/public/market-watch-item.html +3 -3
  54. package/modules/hall-ui/public/market-watch-item.states.json +1 -0
  55. package/modules/hall-ui/public/market-watch-rules.html +3 -3
  56. package/modules/hall-ui/public/market-watch-rules.states.json +1 -0
  57. package/modules/hall-ui/public/market-watch.html +3 -3
  58. package/modules/hall-ui/public/market-watch.states.json +1 -0
  59. package/modules/hall-ui/public/modules.html +3 -3
  60. package/modules/hall-ui/public/modules.states.json +1 -0
  61. package/modules/hall-ui/public/money.html +3 -3
  62. package/modules/hall-ui/public/money.states.json +1 -0
  63. package/modules/hall-ui/public/my-agents.html +3 -3
  64. package/modules/hall-ui/public/my-agents.states.json +1 -0
  65. package/modules/hall-ui/public/options-menu.js +2 -1
  66. package/modules/hall-ui/public/primer.html +3 -3
  67. package/modules/hall-ui/public/primer.states.json +1 -0
  68. package/modules/hall-ui/public/profile.html +3 -3
  69. package/modules/hall-ui/public/profile.states.json +1 -0
  70. package/modules/hall-ui/public/project-settings.html +3 -3
  71. package/modules/hall-ui/public/roster.html +3 -3
  72. package/modules/hall-ui/public/roster.states.json +1 -0
  73. package/modules/hall-ui/public/settings-view.js +75 -0
  74. package/modules/hall-ui/public/settings.html +17 -4
  75. package/modules/hall-ui/public/settings.states.json +1 -0
  76. package/modules/hall-ui/public/shell-game.css +97 -42
  77. package/modules/hall-ui/public/shell-game.js +138 -40
  78. package/modules/hall-ui/public/shell.js +12 -43
  79. package/modules/hall-ui/public/street-card.states.json +1 -0
  80. package/modules/hall-ui/public/street.css +1 -5
  81. package/modules/hall-ui/public/street.html +5 -9
  82. package/modules/hall-ui/public/street.js +8 -59
  83. package/modules/hall-ui/public/street.states.json +7 -32
  84. package/modules/hall-ui/public/studio.html +3 -3
  85. package/modules/hall-ui/public/studio.states.json +1 -0
  86. package/modules/hall-ui/public/style.css +126 -65
  87. package/modules/hall-ui/public/task.html +3 -3
  88. package/modules/hall-ui/public/task.states.json +1 -0
  89. package/modules/hall-ui/public/thinking.html +4 -4
  90. package/modules/hall-ui/public/thinking.states.json +1 -0
  91. package/modules/hall-ui/public/tweak-editor.html +3 -3
  92. package/modules/hall-ui/public/tweak-editor.states.json +1 -0
  93. package/modules/hall-ui/public/visor.js +7 -1
  94. package/modules/hall-ui/public/watch.html +3 -3
  95. package/modules/hall-ui/public/watch.states.json +1 -0
  96. package/modules/hall-ui/public/work-founding.states.json +1 -0
  97. package/modules/hall-ui/public/work.html +3 -3
  98. package/modules/hall-ui/public/work.states.json +1 -0
  99. package/modules/hall-ui/records/game-mode.md +5 -4
  100. package/modules/hall-ui/records/start-screen.md +10 -2
  101. package/modules/hall-ui/specimens/components.states.json +2 -1
  102. package/modules/ui-design/public/brand.html +2 -2
  103. package/package-lock.json +2 -2
  104. package/package.json +1 -1
  105. package/release-notes.json +12 -0
  106. package/scripts/hall-preview/README.md +2 -3
  107. package/scripts/hall-preview/pref-writes.js +8 -1
  108. package/src/bongos/serve-internal.js +7 -2
  109. package/src/hall-helm.js +79 -0
  110. package/src/module-api.js +1 -1
  111. package/tests/design_reference.mjs +1 -1
  112. package/tests/hall_builders_page_pass.mjs +2 -1
  113. package/tests/hall_city.mjs +15 -29
  114. package/tests/hall_controls.mjs +52 -4
  115. package/tests/hall_fullscreen.mjs +42 -21
  116. package/tests/hall_helm.mjs +187 -0
  117. package/tests/hall_record_world.mjs +4 -2
  118. package/tests/hall_start_screen.mjs +103 -5
  119. package/tests/hall_street.mjs +13 -26
  120. package/tests/hall_topbar_320.mjs +4 -2
  121. package/tests/hall_view_prefs.mjs +42 -0
  122. package/tests/hall_visor.mjs +3 -2
  123. 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
+ });
@@ -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
- assert.deepEqual(rows, ['Claim a task C', 'Blockers B', 'Goal sky G', 'Your thinking T', 'Back to centre 0', 'Look around drag', 'Options Esc']);
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 = 'fb82186606e781b5';
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);