From e2b3615a19cf8f344000bb1604e0e0e21558a288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germain=20Carr=C3=A9?= <666182+carsso@users.noreply.github.com> Date: Wed, 11 Nov 2026 15:35:50 +0100 Subject: [PATCH] Keep the Connections list working with 400G fabric ports (#342) --- CHANGELOG.md | 1 + src/game/94-dashboard/40-connections.js | 2 +- tests/nni.test.js | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a6467..d42c2b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project are documented here. The project follows ## [Unreleased] - Alien waves you list on a fiber yourself now stay listed. With the capacity market selling for you, the broker used to cut your listing down to what its settings allowed the next day, or take it off altogether when the route's demand was below your minimum. Your own listing now stays put, and the broker adds what its settings allow on top (#340). +- The Connections list in the NOC dashboard no longer stays blank when you sort it by load or show only NNI ports while a fabric port runs at 400G. A 400G fabric port is the fastest there is, so the list now offers it one more LAG member instead of a faster port that does not exist. ## [3.4.0] — 2026-11-10 diff --git a/src/game/94-dashboard/40-connections.js b/src/game/94-dashboard/40-connections.js index badc184..61caf58 100644 --- a/src/game/94-dashboard/40-connections.js +++ b/src/game/94-dashboard/40-connections.js @@ -26,7 +26,7 @@ function connUp(r){if(r.mine)return '';const nx=t=>PORT[t+1]&&portShown(t+1)?t+1 if(i>=0)h+=btn(tr('common.upgrade_port_price',{port:PORT[i].n,price:portMo(ixPortMo(c,i)*n)}),'buyIx',{city:c,tier:i},'sm',(!!S.pops[city]&&!portOk(city,i))||(!S.pops[city]&&i>1)); if(S.pops[city]&&!S.myIx[c]&&n=0){const c=NNI[i].mo*n;h+=btn(n>1?tr('common.upgrade_all_to_port_cost_mo',{port:NNI[i].n,cost:fmt$(c),mo:fmt$(c)}):tr('common.upgrade_port_price_mo',{port:NNI[i].n,price:fmt$(c)}),'buyNni',{city,prov,tier:i},'sm',S.cash { + const { ev, errors } = open(); + ev(`S.pops.fra.rgen=${fast(5)};ACT.buyNni({city:"fra",prov:FB,tier:2});compute()`); + assert.ok(ev('portShown(3)'), 'an 800G port is on sale, so nothing stops the list from offering one'); + for (const [k, cf] of [['use', '{}'], ['k', "{k:'nni'}"]]) { + const h = ev(`UI.connSort='${k}';UI.connDir=-1;UI.cf=${cf};connSection()`); + assert.match(h, /data-act="lagNni"/, `sorted by ${k}`); + assert.doesNotMatch(h, /data-act="buyNni"/, `sorted by ${k}: no 800G fabric port`); + } + assert.deepEqual(errors, []); +});