The intern standardizes routers on a chosen model; Ops settings are lists
Some checks are pending
CI / test 1/4 (push) Waiting to run
CI / test 2/4 (push) Waiting to run
CI / test 3/4 (push) Waiting to run
CI / test 4/4 (push) Waiting to run
CI / build (push) Waiting to run
CI / test (push) Blocked by required conditions
CI / translations (push) Waiting to run

Keep routers ahead gets a Model setting: the next generation when busy
(as before), or a model to standardize on. With a model, every POP on a
smaller one is swapped to it, the busiest first, within the monthly budget,
through the same upRouter click: never a step down, only unlocked models
that fit, and only where a second router carries the traffic or nothing
runs yet. Busy POPs on it only get more routers.

Every setting in the Standing orders sheet (each order's dials, budgets,
the cash floor) is a dropdown instead of a button that steps through the
values. The change handler passes a select's data-args, the actions take
the picked position (v) and still step without one for the MCP tools,
which now declare v as optional.
This commit is contained in:
Frederic Jung 2026-11-06 17:19:17 +00:00
parent 9d64aa0144
commit 1e7638c4b9
No known key found for this signature in database
16 changed files with 188 additions and 33 deletions

View file

@ -356,7 +356,9 @@ test('the Ops sheet works at 360 px in every language, from the NOC tab and the
assert.ok(ev('opsHired()'), lang);
doc.querySelector('#modalCard [data-act="opsToggle"]').click();
assert.equal(doc.querySelector('#modalCard [data-act="opsToggle"]').getAttribute('aria-pressed'), 'true', lang);
doc.querySelector('#modalCard [data-act="opsParam"]').click();
const sel = doc.querySelector('#modalCard select[data-chg="opsParam"]');
sel.value = String((sel.selectedIndex + 1) % sel.options.length);
sel.dispatchEvent(new dom.window.Event('change', { bubbles: true }));
const txt = doc.getElementById('modalCard').textContent;
assert.doesNotMatch(txt, /\bops\.[a-z_]+/, lang);
assert.ok(doc.querySelector('#modalCard select[data-chg="opsCity"]'), lang);
@ -495,7 +497,7 @@ test('the fat-fingered LAG member respects a paused transit order and per-POP ex
});
test('caches: the cash floor and a running-cost budget hold; the panel and the log show what a month costs', t => {
const { ev, errors } = game(t);
const { ev, dom, errors } = game(t);
hire(ev); on(ev, 'caches', { g: 1 });
ev('S.pops.fra.rgen=0;compute()'); // 100G ports: 100G boxes at $400/mo
const add = () => ev("utilityCaches('fra').add.filter(x=>(R.cityDem.fra||0)*NSH[x.net]>=1).length");
@ -515,7 +517,8 @@ test('caches: the cash floor and a running-cost budget hold; the panel and the l
ev('opsModal()');
const txt = ev("document.getElementById('modalCard').textContent");
assert.match(txt, /each box costs \$400\/mo/);
assert.match(txt, /Adds at most: \+\$1\.0k\/mo/);
const capSel = [...dom.window.document.querySelectorAll('#modalCard select[data-chg="opsCap"]')].find(x => x.dataset.args === '{"k":"caches"}');
assert.equal(capSel.closest('label').firstChild.textContent + ': ' + capSel.options[capSel.selectedIndex].textContent, 'Adds at most: +$1.0k/mo');
assert.match(txt, /This month: \$0 up front, \+\$800\/mo on the bill/);
ev('S.day+=monLen(S.day);S.ops.cap.caches=0'); shift(ev);
assert.equal(ev('S.ops.addMo.caches'), (ev('S.caches.length') - 2) * 400, 'a new month counts from zero');