@bongos/core 1.20.46 → 1.20.47
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 +41 -31
- package/docs/copy-inventory.md +151 -148
- package/docs/copy-registry.json +266 -199
- package/docs/module-api-changelog.md +2 -0
- package/docs/page-inventory.json +2 -1
- package/docs/page-readings.json +90 -90
- package/modules/hall-ui/public/bulk-toolbar.js +291 -0
- package/modules/hall-ui/public/goals-page.js +29 -44
- package/modules/hall-ui/public/goals-render.js +33 -21
- package/modules/hall-ui/public/goals.html +12 -16
- package/modules/hall-ui/public/style.css +74 -3
- package/modules/hall-ui/public/work.css +4 -66
- package/modules/hall-ui/public/work.html +2 -1
- package/modules/hall-ui/public/work.js +17 -236
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +6 -0
- package/src/module-api.js +1 -1
- package/tests/bulk_toolbar.mjs +202 -0
- package/tests/claim_action.mjs +13 -4
- package/tests/goal_category_ui.mjs +1 -0
- package/tests/goal_criterion_confirm_ui.mjs +2 -0
- package/tests/goal_forest_page.mjs +1 -0
- package/tests/goal_invite_consent.mjs +1 -1
- package/tests/goal_mine_lens.mjs +1 -0
- package/tests/hall_board_world.mjs +1 -1
- package/tests/hall_mine_lens.mjs +1 -0
package/tests/claim_action.mjs
CHANGED
|
@@ -264,8 +264,8 @@ await test('both boards CONSTRUCT the shared action, not just its error text', (
|
|
|
264
264
|
|
|
265
265
|
await test('every claim/release entry point routes through it', () => {
|
|
266
266
|
const sites = {
|
|
267
|
-
'work.js': ['doClaim', 'doRelease'
|
|
268
|
-
'goals-page.js': ['doGoalClaim', 'doGoalRelease'
|
|
267
|
+
'work.js': ['doClaim', 'doRelease'],
|
|
268
|
+
'goals-page.js': ['doGoalClaim', 'doGoalRelease'],
|
|
269
269
|
};
|
|
270
270
|
for (const [f, fns] of Object.entries(sites)) {
|
|
271
271
|
const src = read('modules', 'hall-ui', 'public', f);
|
|
@@ -278,6 +278,15 @@ await test('every claim/release entry point routes through it', () => {
|
|
|
278
278
|
`${f}: ${fn} still maps its own refusal`);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
+
// Both boards' BULK claim/release live in the shared toolbar now (task 1003141),
|
|
282
|
+
// built over the same action — so the same rule is checked there, once.
|
|
283
|
+
const bulk = read('modules', 'hall-ui', 'public', 'bulk-toolbar.js');
|
|
284
|
+
for (const fn of ['doBulkClaim', 'doBulkRelease']) {
|
|
285
|
+
const m = bulk.match(new RegExp(`async function ${fn}\\([^)]*\\) \\{[\\s\\S]*?\\n \\}`));
|
|
286
|
+
assert.ok(m, `bulk-toolbar.js: ${fn} not found`);
|
|
287
|
+
assert.match(m[0], /claimAction\.(claimMany|releaseMany)\(/, `bulk-toolbar.js: ${fn} does not go through the shared action`);
|
|
288
|
+
assert.doesNotMatch(m[0], /friendlyClaimError\(/, `bulk-toolbar.js: ${fn} maps its own refusal`);
|
|
289
|
+
}
|
|
281
290
|
});
|
|
282
291
|
|
|
283
292
|
await test('no call site reloads on top of the action\'s own refresh', async () => {
|
|
@@ -287,7 +296,7 @@ await test('no call site reloads on top of the action\'s own refresh', async ()
|
|
|
287
296
|
// twice. work.js's doBulkClaim is the correct shape: redraw the toolbar,
|
|
288
297
|
// never re-fetch. A finally that awaits a loader is the tell.
|
|
289
298
|
const src = read('modules', 'hall-ui', 'public', 'goals-page.js');
|
|
290
|
-
for (const fn of ['doGoalClaim', 'doGoalRelease'
|
|
299
|
+
for (const fn of ['doGoalClaim', 'doGoalRelease']) {
|
|
291
300
|
const m = src.match(new RegExp(`async function ${fn}\\([^)]*\\) \\{[\\s\\S]*?\\n \\}`));
|
|
292
301
|
assert.ok(m, `${fn} not found`);
|
|
293
302
|
assert.doesNotMatch(m[0], /finally \{[\s\S]*?await loadGoalTasks\(/,
|
|
@@ -393,7 +402,7 @@ await test('the cache-bust moved on every page whose script changed', () => {
|
|
|
393
402
|
]) {
|
|
394
403
|
const html = read('modules', 'hall-ui', 'public', page);
|
|
395
404
|
for (const s of scripts) {
|
|
396
|
-
assert.match(html, new RegExp(s.replace('.', '\\.') + '\\?v=2026-09-
|
|
405
|
+
assert.match(html, new RegExp(s.replace('.', '\\.') + '\\?v=2026-09-30-bulktoolbar'), `${page}: ${s} not busted`);
|
|
397
406
|
}
|
|
398
407
|
}
|
|
399
408
|
});
|
|
@@ -126,6 +126,7 @@ async function renderList() {
|
|
|
126
126
|
// task 1003458: the page loads claim-action.js before this script; the stub
|
|
127
127
|
// must mirror that, or the destructure of window.OTBClaimAction throws.
|
|
128
128
|
vm.runInContext(read('modules/hall-ui/public/claim-action.js'), sandbox, { filename: 'claim-action.js' });
|
|
129
|
+
vm.runInContext(read('modules/hall-ui/public/bulk-toolbar.js'), sandbox, { filename: 'bulk-toolbar.js' }); // task 1003141
|
|
129
130
|
vm.runInContext(TASK_LIB_SRC, sandbox, { filename: 'task-lib.js' });
|
|
130
131
|
vm.runInContext(GOALS_LIB_SRC, sandbox, { filename: 'goals-lib.js' });
|
|
131
132
|
vm.runInContext(GOAL_FOREST_RENDER_SRC, sandbox, { filename: 'goal-forest-render.js' });
|
|
@@ -157,6 +157,8 @@ async function render({ rank = 'metic', goalStatus = 'open', criteria = Object.v
|
|
|
157
157
|
// must mirror that, or the destructure of window.OTBClaimAction throws.
|
|
158
158
|
vm.runInContext(fs.readFileSync(path.join(ROOT, 'modules/hall-ui/public/claim-action.js'), 'utf8'), sandbox, { filename: 'claim-action.js' });
|
|
159
159
|
vm.runInContext(TASK_LIB_SRC, sandbox, { filename: 'task-lib.js' });
|
|
160
|
+
// task 1003141: goals-render.js builds the shared bulk toolbar at boot.
|
|
161
|
+
vm.runInContext(fs.readFileSync(path.join(ROOT, 'modules/hall-ui/public/bulk-toolbar.js'), 'utf8'), sandbox, { filename: 'bulk-toolbar.js' });
|
|
160
162
|
vm.runInContext(GOALS_LIB_SRC, sandbox, { filename: 'goals-lib.js' });
|
|
161
163
|
vm.runInContext(GOAL_FOREST_RENDER_SRC, sandbox, { filename: 'goal-forest-render.js' });
|
|
162
164
|
vm.runInContext(GOALS_RENDER_SRC, sandbox, { filename: 'goals-render.js' });
|
|
@@ -80,6 +80,7 @@ async function boot({ status = 200, fail = false, payload = { nodes: [], edges:
|
|
|
80
80
|
// task 1003458: the page loads claim-action.js before this script; the stub
|
|
81
81
|
// must mirror that, or the destructure of window.OTBClaimAction throws.
|
|
82
82
|
vm.runInContext(read('claim-action.js'), sandbox, { filename: 'claim-action.js' });
|
|
83
|
+
vm.runInContext(read('bulk-toolbar.js'), sandbox, { filename: 'bulk-toolbar.js' }); // task 1003141
|
|
83
84
|
vm.runInContext(RENDER_JS, sandbox, { filename: 'goals-render.js' });
|
|
84
85
|
|
|
85
86
|
const state = { current: 7, forest: null, forestError: false };
|
|
@@ -171,7 +171,7 @@ function harness({ pendingRequests = [] } = {}) {
|
|
|
171
171
|
vm.createContext(sandbox);
|
|
172
172
|
// task 1003458: claim-action.js sits between task-lib and goals-render on the
|
|
173
173
|
// real page (goals.html); the stub mirrors that order.
|
|
174
|
-
for (const f of ['hall-kit.js', 'task-lib.js', 'claim-action.js', 'goals-lib.js', 'goal-forest-render.js', 'goals-render.js']) {
|
|
174
|
+
for (const f of ['hall-kit.js', 'task-lib.js', 'claim-action.js', 'bulk-toolbar.js', 'goals-lib.js', 'goal-forest-render.js', 'goals-render.js']) {
|
|
175
175
|
vm.runInContext(read(P + f), sandbox, { filename: f });
|
|
176
176
|
}
|
|
177
177
|
|
package/tests/goal_mine_lens.mjs
CHANGED
|
@@ -150,6 +150,7 @@ async function boot({
|
|
|
150
150
|
// task 1003458: the page loads claim-action.js before this script; the stub
|
|
151
151
|
// must mirror that, or the destructure of window.OTBClaimAction throws.
|
|
152
152
|
vm.runInContext(hall('claim-action.js'), sandbox, { filename: 'claim-action.js' });
|
|
153
|
+
vm.runInContext(hall('bulk-toolbar.js'), sandbox, { filename: 'bulk-toolbar.js' }); // task 1003141
|
|
153
154
|
vm.runInContext(GOALS_RENDER_SRC, sandbox, { filename: 'goals-render.js' });
|
|
154
155
|
vm.runInContext(GOALS_PAGE_SRC, sandbox, { filename: 'goals-page.js' });
|
|
155
156
|
for (let i = 0; i < 30; i += 1) await new Promise((r) => setTimeout(r, 0));
|
|
@@ -80,7 +80,7 @@ test('.task IS the panel — --bg-card at the full radius, with no drawn edge at
|
|
|
80
80
|
// gets missed: "Git" came back 17x24 after a height-only fix.
|
|
81
81
|
for (const sel of ['.task__select', '.wip__select']) {
|
|
82
82
|
test(`${sel} is a 24px target with a 14px drawn box`, () => {
|
|
83
|
-
const css =
|
|
83
|
+
const css = styleCss; // .wip__select joined .task__select here when the goal board borrowed it (task 1003141)
|
|
84
84
|
const box = rule(css, sel);
|
|
85
85
|
assert.ok(box, `${sel} has a rule`);
|
|
86
86
|
assert.match(box, /width:\s*24px/, 'the HIT AREA is 24px — this is what the floor measures');
|
package/tests/hall_mine_lens.mjs
CHANGED
|
@@ -204,6 +204,7 @@ function bootWorkBoard({ signedIn = true, goalsFail = false } = {}) {
|
|
|
204
204
|
// task 1003458: the page loads claim-action.js before this script; the stub
|
|
205
205
|
// must mirror that, or the destructure of window.OTBClaimAction throws.
|
|
206
206
|
vm.runInContext(fs.readFileSync(path.join(HALL, 'claim-action.js'), 'utf8'), sandbox, { filename: 'claim-action.js' });
|
|
207
|
+
vm.runInContext(fs.readFileSync(path.join(HALL, 'bulk-toolbar.js'), 'utf8'), sandbox, { filename: 'bulk-toolbar.js' }); // task 1003141
|
|
207
208
|
vm.runInContext(WORK_JS, sandbox, { filename: 'work.js' });
|
|
208
209
|
(documentObj.listeners.DOMContentLoaded || []).forEach((fn) => fn());
|
|
209
210
|
|