From 7dec81568e38ce44e2c9c7326ef6377d5c0d9c2e Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 11 Sep 2026 03:06:27 -0700 Subject: [PATCH] test(desktop): trim salvaged pool tests to invariants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop two PrimaryProfilePin cases that only restate the constructor defaults and blank-string normalisation, and the wiring-routing test that froze POOL_LIMITS_SETTINGS_ROUTE to a literal string — a snapshot of the constant, not a behaviour contract. The two kept pin tests cover the bug (a live primary keeps answering for its booted profile after the stored preference moves; teardown releases the pin), and the notifications tests cover the toast action end-to-end. --- .../desktop/electron/primary-profile-pin.test.ts | 16 ---------------- .../src/app/contrib/wiring-routing.test.ts | 11 +---------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/apps/desktop/electron/primary-profile-pin.test.ts b/apps/desktop/electron/primary-profile-pin.test.ts index 1ea65305f2..f4595bd6dc 100644 --- a/apps/desktop/electron/primary-profile-pin.test.ts +++ b/apps/desktop/electron/primary-profile-pin.test.ts @@ -4,14 +4,6 @@ import { test } from 'vitest' import { PrimaryProfilePin } from './primary-profile-pin' -test('with no live primary, the stored preference (or default) wins', () => { - const pin = new PrimaryProfilePin() - - assert.equal(pin.resolve(() => null), 'default') - assert.equal(pin.resolve(() => ' '), 'default') - assert.equal(pin.resolve(() => 'claude'), 'claude') -}) - test('a live primary keeps answering for its booted profile after the preference moves', () => { const pin = new PrimaryProfilePin() let preference: null | string = 'default' @@ -37,11 +29,3 @@ test('teardown releases the pin so the next start follows the preference', () => assert.equal(pin.booted, null) assert.equal(pin.resolve(() => 'claude'), 'claude') }) - -test('pinning normalises blank input to default', () => { - const pin = new PrimaryProfilePin() - - assert.equal(pin.pin(''), 'default') - assert.equal(pin.pin(undefined), 'default') - assert.equal(pin.pin(' grok '), 'grok') -}) diff --git a/apps/desktop/src/app/contrib/wiring-routing.test.ts b/apps/desktop/src/app/contrib/wiring-routing.test.ts index 2f5a8472d8..cb981d40d0 100644 --- a/apps/desktop/src/app/contrib/wiring-routing.test.ts +++ b/apps/desktop/src/app/contrib/wiring-routing.test.ts @@ -1,15 +1,6 @@ import { describe, expect, it } from 'vitest' -import { - findStoredIdForRuntimeId, - POOL_LIMITS_SETTINGS_ROUTE, - resolveRoutingSessionId, - resolveSessionRpcOwner -} from './wiring-routing' - -it('targets the Advanced settings surface for pool-cap recovery', () => { - expect(POOL_LIMITS_SETTINGS_ROUTE).toBe('/settings?tab=config:advanced') -}) +import { findStoredIdForRuntimeId, resolveRoutingSessionId, resolveSessionRpcOwner } from './wiring-routing' describe('findStoredIdForRuntimeId', () => { it('reverse-resolves a runtime id to its stored id', () => {