feat(network): centralize proxy settings and add MCP routing (NAN-315) (#6372)

* feat(network): share proxy settings across features and MCP (NAN-315)

* fix(network): address shared proxy review regressions

* test(network): align rebased OAuth fixtures with runtime admission

* fix(webui): configure shared proxy without leaving connection drafts

* feat(webui): add optional shared proxy authentication editor

* fix(webui): align proxy save tests and loading skeleton
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-22 15:49:27 +08:00
1 parent 872a83340d
commit 084b6bb394
181 files changed
+3740 -807

No files matched your search

+6 -2
View File
@@ -74,14 +74,18 @@ for (const width of [390, 1440]) for (const locale of ["en", "zh-CN"]) {
await settle(page);
const selector = section === "overview" ? "section button.group" : section === "models" ? '[data-testid^="model-call-order-row"], .settings-footer' : section === "about" ? ".settings-list-row" : ".settings-row";
const notificationDetails = section === "notifications" ? ", .settings-list-inset > .border-t, section > p" : "";
const loaded = await boxes(target.locator(selector + notificationDetails));
const proxyForm = section === "advanced" ? ", [data-shared-proxy-editor]" : "";
const loaded = await boxes(target.locator(selector + notificationDetails + proxyForm));
const proxyAddress = section === "advanced" ? await boxes(target.locator('[data-shared-proxy-editor] input')) : null;
const loadedControls = section === "notifications" ? await boxes(target.getByRole("switch")) : null;
const readingControl = section === "appearance" ? await boxes(target.getByRole("radiogroup")) : null;
await page.goto(fixture("settings", "loading", extra));
await settle(page);
const skeletonSelector = section === "overview" ? "[data-overview-skeleton-row]" : section === "models" ? "[data-model-preset-skeleton], .settings-footer" : section === "about" ? ".settings-list-row" : "[data-settings-skeleton-row]";
const skeleton = await boxes(target.locator(skeletonSelector + notificationDetails));
const proxySkeleton = section === "advanced" ? ", [data-shared-proxy-skeleton]" : "";
const skeleton = await boxes(target.locator(skeletonSelector + notificationDetails + proxySkeleton));
sameBoxes(skeleton, loaded, section);
if (proxyAddress) sameBoxes(await boxes(target.locator("[data-proxy-address-skeleton]")), proxyAddress, "shared proxy address");
if (readingControl) sameBoxes(await boxes(target.locator("[data-skeleton-reading-size]")), readingControl);
if (loadedControls) {
const skeletonControls = await boxes(target.locator("[data-skeleton-switch]"));