@bongos/core 1.19.503 → 1.19.505
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 +22 -17
- package/docs/copy-inventory.md +21 -21
- package/docs/copy-registry.json +24 -24
- package/docs/module-api-changelog.md +4 -0
- package/modules/hall-ui/public/shell.js +22 -3
- package/modules/hall-ui/public/task-detail.js +9 -4
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/src/module-api.js +1 -1
- package/tests/hall_nav.mjs +33 -0
- package/tests/promote_goal_id.mjs +4 -1
- package/tests/task_detail_ui.mjs +710 -0
package/tests/hall_nav.mjs
CHANGED
|
@@ -193,6 +193,39 @@ test('href check actually CATCHES a dead link', () => {
|
|
|
193
193
|
assert.equal(hrefResolves({ href: '/drachmae', external: false }), true);
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
+
// ── Community carries no rank flag (task 1003442, goal 1000075) ─────────────
|
|
197
|
+
|
|
198
|
+
// The nav ladder as shell.js gateAllows() defines it, for ONE viewer: a signed-in
|
|
199
|
+
// xenos. Restated here rather than imported because the point of this file is to
|
|
200
|
+
// check the rendered markup against the rule, not to trust the source twice.
|
|
201
|
+
const XENOS_SEES = { always: true, signed: true, work: false, member: false, government: false, archon: false };
|
|
202
|
+
// The gates that encode a RANK floor. 'signed' is not one of them — it asks
|
|
203
|
+
// whether you are here, not who you are.
|
|
204
|
+
const RANK_GATES = new Set(['member', 'work', 'government', 'archon']);
|
|
205
|
+
|
|
206
|
+
test('THE CORRECTION: Community shows a xenos two items, Collab and Builders', () => {
|
|
207
|
+
// Both items read 'member' until task 1003442, so a newcomer saw an empty
|
|
208
|
+
// Community group — while /builders/collab was already requireBuilderPage (no
|
|
209
|
+
// rank floor) and /builders/roster was already `null` in the page-gate ORACLE.
|
|
210
|
+
// The rank gate existed only in the nav list.
|
|
211
|
+
const community = parseNav(boot().sidebarHtml).find((g) => g.label === 'Community');
|
|
212
|
+
assert.ok(community, 'the Community group renders');
|
|
213
|
+
assert.equal(XENOS_SEES[community.headGate], true, 'the group HEAD is visible to a xenos');
|
|
214
|
+
const visible = community.items.filter((i) => XENOS_SEES[i.gate]);
|
|
215
|
+
assert.deepEqual(visible.map((i) => i.id), ['collab', 'roster'],
|
|
216
|
+
'a xenos sees exactly Collab and Builders');
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
test('neither Community page hides behind a rank the page itself does not enforce', () => {
|
|
220
|
+
// The invariant this task exists to restore: a nav flag may be narrower than
|
|
221
|
+
// the wall for cosmetic reasons (/profile does it), but it must never assert a
|
|
222
|
+
// RANK the page gate does not. /people keeps its rank flag legitimately — it
|
|
223
|
+
// fronts project.curate, which requireProjectCuratePage really does enforce.
|
|
224
|
+
const community = parseNav(boot().sidebarHtml).find((g) => g.label === 'Community');
|
|
225
|
+
const ranked = community.items.filter((i) => RANK_GATES.has(i.gate)).map((i) => i.id);
|
|
226
|
+
assert.deepEqual(ranked, ['people'], 'only /people carries a rank flag, and its API enforces one');
|
|
227
|
+
});
|
|
228
|
+
|
|
196
229
|
test('no group head is gated wider than its own items', () => {
|
|
197
230
|
const bad = parseNav(boot().sidebarHtml).filter(headOutOfRange).map((g) => g.label);
|
|
198
231
|
assert.deepEqual(bad, [], 'a head gated wider than every item would render a label over nothing');
|
|
@@ -294,7 +294,10 @@ await test('DEGRADES: the hall re-fetches goals when the version changes, newest
|
|
|
294
294
|
// Goals belong to a version; keeping stale options would offer a home the
|
|
295
295
|
// server would reject.
|
|
296
296
|
assert.match(HALL, /vsel\.addEventListener\('change'/);
|
|
297
|
-
|
|
297
|
+
// The second argument (task 1003516) scopes the filed goal hint to the version
|
|
298
|
+
// it was filed against — matched loosely so this pins the re-fetch, not the
|
|
299
|
+
// argument list.
|
|
300
|
+
assert.match(HALL, /await goalOptionsFor\(vsel\.value/);
|
|
298
301
|
});
|
|
299
302
|
|
|
300
303
|
await test('the CLI uses the GENERATED typed client method, not the raw escape hatch', () => {
|