Refactor VPN proxy components and update related behavior
Build and Deploy Gateway / build-and-push (push) Successful in 20s
Build and Deploy Gateway / deploy (push) Successful in 13s

This commit is contained in:
2026-08-11 01:27:46 +03:00
parent c89e56942a
commit aa9c959368
58 changed files with 4234 additions and 2755 deletions
+4 -4
View File
@@ -26,8 +26,8 @@ test('server picker has one public feature owner without legacy shims', () => {
assert.match(overview, /import \{ ServerPicker \} from '\.\.\/features\/servers\/index\.js'/);
assert.equal((overview.match(/<ServerPicker/g) || []).length, 1);
assert.doesNotMatch(picker, /from ['"][^'"]*\/api\/|\bapi\./);
assert.match(overview, /const selectedServerId = pendingServerId \|\| state\?\.selection\?\.desiredServerId \|\| ''/);
assert.match(overview, /setPendingServerId\(serverId\);[\s\S]*if \(connected && serverId\) onApply\(serverId\)/);
assert.match(overview, /const selectedServerId = desiredProfile\?\.desiredServerId \|\| ''/);
assert.match(overview, /function selectServer\(profile: ProfileSnapshot, serverId: string\)[\s\S]*onApply\(profile\.id, serverId\)[\s\S]*onSelectProfileServer\(profile\.id, serverId\)/);
});
const fixtures = (count) => Array.from({ length: count }, (_, index) => ({
@@ -70,7 +70,7 @@ test('server picker validates unknown ping payloads before publishing results',
]) {
assert.throws(() => parseServerPingResults(payload), TypeError);
}
assert.match(picker, /parseServerPingResults\(await pingServers\(ids\)\)/);
assert.match(picker, /parseServerPingResults\(await pingServers\(profileId, ids\)\)/);
});
test('server picker checks health only on manual refresh and bounds the result window', () => {
@@ -78,7 +78,7 @@ test('server picker checks health only on manual refresh and bounds the result w
assert.doesNotMatch(picker, /checkVisible\(\);/);
assert.match(picker, /onClick={checkVisible}/);
assert.match(picker, /\{ \.\.\.current\[id\], checking: true \}/);
assert.match(picker, /900 - \(performance\.now\(\) - startedAt\)/);
assert.match(picker, /Math\.max\(900, Math\.ceil\(elapsed \/ 900\) \* 900\)/);
assert.match(picker, /\{ \.\.\.current\[id\], checking: false \}/);
assert.match(picker, /\.slice\(page \* SERVER_RESULT_WINDOW, \(page \+ 1\) \* SERVER_RESULT_WINDOW\)/);
assert.match(picker, /\.slice\(0, 30\)/);