Skip to content

The agent that grows with you

refactor(desktop): drop leftovers of the removed backend pool subsystem

Tekniume6caec13852e
diff --git a/apps/desktop/electron/dashboard-token.test.ts b/apps/desktop/electron/dashboard-token.test.ts
index c7681d84b8d..880e3b3a7c1 100644
--- a/apps/desktop/electron/dashboard-token.test.ts
+++ b/apps/desktop/electron/dashboard-token.test.ts
@@ -14,7 +14,6 @@ import {
dashboardIndexUrl,
extractInjectedDashboardToken,
fetchPublicText,
- isAttachedBackendTokenDrifted,
isForeignBackendToken,
resolveServedDashboardToken
} from './dashboard-token'
@@ -119,19 +118,6 @@ test('adoptServedDashboardToken refuses a foreign token when our child is dead',
)
})
-test('isAttachedBackendTokenDrifted flags a live backend serving a different token', () => {
- const cases = [
- [{ servedToken: 'new-token', adoptedToken: 'old-token' }, true],
- [{ servedToken: 'old-token', adoptedToken: 'old-token' }, false],
- [{ servedToken: null, adoptedToken: 'old-token' }, false],
- [{ servedToken: '', adoptedToken: 'old-token' }, false]
- ]
-
- for (const [input, expected] of cases) {
- assert.equal(isAttachedBackendTokenDrifted(input as any), expected, JSON.stringify(input))
- }
-})
-
test('adoptServedDashboardToken falls back to the spawn token when the fetch fails', async () => {
const logs = []
diff --git a/apps/desktop/electron/dashboard-token.ts b/apps/desktop/electron/dashboard-token.ts
index 0af46904d14..42f21485343 100644
--- a/apps/desktop/electron/dashboard-token.ts
+++ b/apps/desktop/electron/dashboard-token.ts
@@ -101,25 +101,12 @@ async function adoptServedDashboardToken(baseUrl, spawnToken, { childAlive, labe
return servedToken
}
-/**
- * True when a *live* attached backend is now serving a session token
- * different from the one we adopted at attach time — a backend recycled by an
- * external supervisor (e.g. launchd `KeepAlive`) into a new process on the
- * same port. `/api/health` (and other liveness probes) are public routes that
- * a recycled backend still answers 200 to, so a plain readiness probe cannot
- * see this; only re-reading the served token can.
- */
-function isAttachedBackendTokenDrifted({ servedToken, adoptedToken }) {
- return Boolean(servedToken) && servedToken !== adoptedToken
-}
-
export {
adoptServedDashboardToken,
dashboardIndexUrl,
DEFAULT_TOKEN_FETCH_TIMEOUT_MS,
extractInjectedDashboardToken,
fetchPublicText,
- isAttachedBackendTokenDrifted,
isForeignBackendToken,
resolveServedDashboardToken
}
diff --git a/apps/desktop/src/app/settings/settings-manifest.ts b/apps/desktop/src/app/settings/settings-manifest.ts
index 3cb03c1a2bf..708c50a31c7 100644
--- a/apps/desktop/src/app/settings/settings-manifest.ts
+++ b/apps/desktop/src/app/settings/settings-manifest.ts
@@ -162,16 +162,6 @@ export const SETTINGS_MANIFEST = {
keywords: ['devtools', 'developer tools', 'f12', 'inspector', 'debug'],
copy: t => ({ label: t.settings.config.disableF12Title, description: t.settings.config.disableF12Desc })
},
- warmBotBackends: {
- subpage: 'desktop',
- keywords: ['pool', 'backends', 'bots', 'warm', 'concurrency', 'limit'],
- copy: t => ({ label: t.settings.poolLimits.warmBotBackendsTitle })
- },
- backendIdleTimeout: {
- subpage: 'desktop',
- keywords: ['pool', 'backends', 'idle', 'timeout', 'milliseconds'],
- copy: t => ({ label: t.settings.poolLimits.backendIdleTimeoutTitle })
- },
quickEntry: {
subpage: 'desktop',
keywords: ['quick entry', 'global shortcut', 'spotlight', 'summon', 'prompt anywhere'],
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index 679e01991b0..b8ca5edbd07 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -1503,12 +1503,6 @@ export const deOverrides = {
}
}
},
- poolLimits: {
- warmBotBackendsAria: 'Bot-Backends vorwärmen',
- warmBotBackendsTitle: 'Bot-Backends vorwärmen',
- backendIdleTimeoutAria: 'Leerlauf-Timeout des Backends in Millisekunden',
- backendIdleTimeoutTitle: 'Leerlauf-Timeout des Backends'
- },
customEndpoints: {
active: 'Aktiv',
apiKeySet: 'API-Schlüssel gesetzt',
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 09c00ec72c2..0c21a949158 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -1189,12 +1189,6 @@ export const en: Translations = {
}
}
},
- poolLimits: {
- warmBotBackendsAria: 'Warm bot backends',
- warmBotBackendsTitle: 'Warm Bot Backends',
- backendIdleTimeoutAria: 'Backend idle timeout in milliseconds',
- backendIdleTimeoutTitle: 'Backend Idle Timeout'
- },
customEndpoints: {
active: 'Active',
apiKeySet: 'API key set',
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index 5557514ceca..309fa05cf72 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -1506,12 +1506,6 @@ export const esOverrides = {
}
}
},
- poolLimits: {
- warmBotBackendsAria: 'Backends de bots en caliente',
- warmBotBackendsTitle: 'Backends de bots en caliente',
- backendIdleTimeoutAria: 'Tiempo de inactividad del backend en milisegundos',
- backendIdleTimeoutTitle: 'Tiempo de inactividad del backend'
- },
customEndpoints: {
active: 'Activo',
apiKeySet: 'Clave API configurada',
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index cf5e860d128..3ad5c49a819 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -1509,12 +1509,6 @@ export const frOverrides = {
}
}
},
- poolLimits: {
- warmBotBackendsAria: 'Backends de bots maintenus actifs',
- warmBotBackendsTitle: 'Backends de bots actifs',
- backendIdleTimeoutAria: "Délai d'inactivité du backend en millisecondes",
- backendIdleTimeoutTitle: "Délai d'inactivité du backend"
- },
customEndpoints: {
active: 'Actif',
apiKeySet: 'Clé API définie',
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index b51b673c744..e46f795c970 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -964,12 +964,6 @@ export interface Translations extends NoticeTranslations {
full: { title: string; description: string; consequence: string }
}
}
- poolLimits: {
- warmBotBackendsAria: string
- warmBotBackendsTitle: string
- backendIdleTimeoutAria: string
- backendIdleTimeoutTitle: string
- }
customEndpoints: {
active: string
apiKeySet: string
diff --git a/apps/desktop/src/i18n/zh-hant_settings.ts b/apps/desktop/src/i18n/zh-hant_settings.ts
index d05092dfa8c..4f92fc6617d 100644
--- a/apps/desktop/src/i18n/zh-hant_settings.ts
+++ b/apps/desktop/src/i18n/zh-hant_settings.ts
@@ -709,12 +709,6 @@ export const zhHantSettings = {
}
}
},
- poolLimits: {
- warmBotBackendsAria: '預熱機器人後端',
- warmBotBackendsTitle: '預熱機器人後端',
- backendIdleTimeoutAria: '後端閒置逾時(毫秒)',
- backendIdleTimeoutTitle: '後端閒置逾時(毫秒)'
- },
customEndpoints: {
active: '已啟用',
apiKeySet: '已設定 API 金鑰',
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 054725d9f93..d26d82d4ef4 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -1214,12 +1214,6 @@ export const zh = defineLocale({
}
}
},
- poolLimits: {
- warmBotBackendsAria: '预热机器人后端',
- warmBotBackendsTitle: '预热机器人后端',
- backendIdleTimeoutAria: '后端空闲超时(毫秒)',
- backendIdleTimeoutTitle: '后端空闲超时(毫秒)'
- },
customEndpoints: {
active: '已启用',
apiKeySet: '已设置 API 密钥',
diff --git a/apps/desktop/src/store/recovery-requests.ts b/apps/desktop/src/store/recovery-requests.ts
index 38cc4806023..8ab6870ed9f 100644
--- a/apps/desktop/src/store/recovery-requests.ts
+++ b/apps/desktop/src/store/recovery-requests.ts
@@ -5,8 +5,8 @@ import { atom } from 'nanostores'
* no knowledge of the active profile — chiefly notification action buttons
* fired from stores. The shell controller (`app/contrib/wiring.tsx`) owns
* `navigate` and the active profile, so it consumes these and performs the
- * navigation / restart. Same shape as `$poolLimitsSettingsRequest` and
- * `$billingSettingsRequest`, generalised to any in-app route.
+ * navigation / restart. Same shape as `$billingSettingsRequest`, generalised
+ * to any in-app route.
*
* Both atoms carry a `seq` so an identical request twice in a row (the user
* clicks the same toast button again) still fires.