@bongos/core 1.19.565 → 1.19.567
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 +40 -20
- package/docs/adr/0254-a-relayed-link-is-contained-downward-or-it-is-not-published.md +119 -0
- package/docs/adr/README.md +1 -0
- package/docs/module-api-changelog.md +4 -0
- package/modules/platform-identity/origin-containment.js +77 -0
- package/modules/platform-identity/platform-identity.js +16 -27
- package/modules/platform-identity/project-stats.js +33 -1
- package/modules/platform-identity/routes/my-projects.js +4 -0
- package/modules/public-landing/public/projects.html +89 -53
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/src/module-api.js +1 -1
- package/tests/manage_settings_shared_read.mjs +146 -0
- package/tests/origin_containment.mjs +114 -0
- package/tests/project_door_ui.mjs +16 -2
- package/tests/project_stats.mjs +82 -14
- package/tests/projects_hub.mjs +24 -2
package/tests/projects_hub.mjs
CHANGED
|
@@ -1449,11 +1449,33 @@ test('the in-flight line reads open_intent only, and re-asks the manifest when t
|
|
|
1449
1449
|
test('the settings reads fire on entry + tab return only — never on the in-flight tick', () => {
|
|
1450
1450
|
assert.match(SCRIPT, /if \(!keepRepo\) loadVisibility\(inst\);/);
|
|
1451
1451
|
const load = fnHub('loadVisibility');
|
|
1452
|
-
assert.match(load,
|
|
1453
|
-
assert.match(load, /
|
|
1452
|
+
assert.match(load, /ensureSettings\(\)/, 'the row comes from the shared reader, not a GET of its own');
|
|
1453
|
+
assert.match(load, /ans\.status === 401 \? signInAgain\(\)/, 'a lapsed session is said as sign-in, not as an outage');
|
|
1454
1454
|
assert.match(load, /var asked = manageId;/, 'a stale answer must never describe a newer project');
|
|
1455
1455
|
});
|
|
1456
1456
|
|
|
1457
|
+
/* One read of the settings row per manage entry (task 1003582). Three cards
|
|
1458
|
+
render three different keys out of the SAME row, and each used to fetch it
|
|
1459
|
+
for itself — three identical round trips per entry, one more with every card
|
|
1460
|
+
added. tests/manage_settings_shared_read.mjs proves the reader's behaviour;
|
|
1461
|
+
this pins that all three cards actually go through it. */
|
|
1462
|
+
test('the three settings cards share ONE read of the row per manage entry', () => {
|
|
1463
|
+
const ensure = fnHub('ensureSettings');
|
|
1464
|
+
assert.match(ensure, /\/settings', \{ credentials: 'same-origin' \}/, 'GET /provisioning/instances/:id/settings — the one reader');
|
|
1465
|
+
assert.match(ensure, /if \(settingsPromise && settingsFor === manageId\) return settingsPromise;/,
|
|
1466
|
+
'memoised AND keyed on the project — a switch must never be served the last one’s row');
|
|
1467
|
+
for (const fn of ['loadVisibility', 'loadJoinability', 'loadDoor']) {
|
|
1468
|
+
assert.match(fnHub(fn), /ensureSettings\(\)/, `${fn} reads the row through the shared reader`);
|
|
1469
|
+
assert.doesNotMatch(fnHub(fn), /fetch\(/, `${fn} fires no GET of its own`);
|
|
1470
|
+
}
|
|
1471
|
+
assert.match(SCRIPT, /if \(!keepRepo\) forgetSettings\(\);/,
|
|
1472
|
+
'the memo is dropped on entry + tab return, so neither is ever served a cached row');
|
|
1473
|
+
/* only the READS are shared: each card still writes its own key */
|
|
1474
|
+
for (const fn of ['doVisSave', 'doJoinSave', 'doDoorSave']) {
|
|
1475
|
+
assert.match(fnHub(fn), /method: 'PATCH'/, `${fn} still PATCHes its own key`);
|
|
1476
|
+
}
|
|
1477
|
+
});
|
|
1478
|
+
|
|
1457
1479
|
/* ── how people join (task 1003044): the joinability toggle — the visibility
|
|
1458
1480
|
section's shape, key for key: the choice from the platform's row, what the
|
|
1459
1481
|
project runs from its own manifest (brand.project.joinability), the save's
|