The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: purge low-value tests, lane js05 (169 removed)
teknium151766a72a3d0
diff --git a/apps/desktop/src/lib/update-copy.test.ts b/apps/desktop/src/lib/update-copy.test.tsindex 3d4781c4508..67dcbdf4318 100644--- a/apps/desktop/src/lib/update-copy.test.ts+++ b/apps/desktop/src/lib/update-copy.test.ts@@ -29,10 +29,4 @@ describe('resolveUpdateCopy', () => {// Body must NOT pretend there are notes — it states they're unavailable.expect(r.body).toBe(copy.availableBodyNoChangelog)})-- it('no changelog on client: same honest degrade', () => {- const r = resolveUpdateCopy({ target: 'client', shownItems: 0, copy })- expect(r.title).toBe('New update available')- expect(r.body).toBe(copy.availableBodyNoChangelog)- })})diff --git a/apps/desktop/src/lib/version-status.test.ts b/apps/desktop/src/lib/version-status.test.tsindex 0ea94080399..50f6dc3bac9 100644--- a/apps/desktop/src/lib/version-status.test.ts+++ b/apps/desktop/src/lib/version-status.test.ts@@ -42,10 +42,6 @@ describe('resolveVersionStatus', () => {expect(status.hasUpdate).toBe(true)})- it('names the client as one of two versions in remote mode', () => {- expect(client({ remote: true, version: '0.4.2' }).label).toBe('client v0.4.2')- })-it('falls back to the sha, then to unknown, when there is no version', () => {expect(client({ sha: 'abc1234' }).label).toBe('abc1234')expect(client({ sha: 'abc1234' }).unknown).toBe(false)@@ -63,15 +59,6 @@ describe('resolveVersionStatus', () => {expect(client({ applying: true, restarting: true, version: '0.4.2' }).label).toBe('v0.4.2 · restart')})- it('leads the tooltip with the apply message while applying', () => {- expect(client({ applyMessage: 'Pulling…', applying: true, version: '0.4.2' }).tooltip).toBe(- 'Pulling… · Hermes Desktop v0.4.2'- )- expect(client({ applying: true, version: '0.4.2' }).tooltip).toBe(- `${copy.updateInProgress} · Hermes Desktop v0.4.2`- )- })-it('labels the backend target distinctly and never claims a client sha', () => {const status = backend({ sha: 'abc1234', version: '0.4.2' })diff --git a/apps/desktop/src/lib/wake-indicator.test.ts b/apps/desktop/src/lib/wake-indicator.test.tsindex eff63154686..3e98dc56919 100644--- a/apps/desktop/src/lib/wake-indicator.test.ts+++ b/apps/desktop/src/lib/wake-indicator.test.ts@@ -30,17 +30,4 @@ describe('wake indicator lifecycle', () => {expect(setState).not.toHaveBeenCalled()})-- it('deduplicates repeated visual states', async () => {- const setState = vi.fn()- vi.stubGlobal('window', { hermesDesktop: { wakeIndicator: { setState } } })- const { activateWakeIndicator, clearWakeIndicator } = await import('./wake-indicator')-- activateWakeIndicator()- activateWakeIndicator()- clearWakeIndicator()- clearWakeIndicator()-- expect(setState.mock.calls.map(([state]) => state)).toEqual(['detected', 'hidden'])- })})diff --git a/apps/desktop/src/lib/wake-sound.test.ts b/apps/desktop/src/lib/wake-sound.test.tsindex 0da3f3e3049..48d05af653d 100644--- a/apps/desktop/src/lib/wake-sound.test.ts+++ b/apps/desktop/src/lib/wake-sound.test.ts@@ -56,20 +56,6 @@ describe('playWakeSound', () => {$hapticsMuted.set(false)})- it('plays a two-note rising chime when sound is on', () => {- playWakeSound()-- // G5 then C6 — two enveloped oscillators, both routed onward.- expect(oscillators).toHaveLength(2)- expect(oscillators[0].frequency.setValueAtTime).toHaveBeenCalledWith(783.99, expect.any(Number))- expect(oscillators[1].frequency.setValueAtTime).toHaveBeenCalledWith(1046.5, expect.any(Number))-- for (const osc of oscillators) {- expect(osc.start).toHaveBeenCalled()- expect(osc.stop).toHaveBeenCalled()- }- })-it('stays silent when the shared sound-mute toggle is on', () => {$hapticsMuted.set(true)playWakeSound()diff --git a/apps/desktop/src/plugins/hermes-bots/avatar.face-clock.test.ts b/apps/desktop/src/plugins/hermes-bots/avatar.face-clock.test.tsindex d3b65d63f55..c3f16b45939 100644--- a/apps/desktop/src/plugins/hermes-bots/avatar.face-clock.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/avatar.face-clock.test.ts@@ -220,27 +220,6 @@ describe('the hand-rolled rAF path (older shells)', () => {})describe('the SDK budgeted-loop path', () => {- it('paints a thinking gaze and eases back without a discontinuity', async () => {- const { captured } = captureLoop()- const { startFaceClock } = await loadClock()- const face = mountFace()- face.innerHTML = '<ellipse data-hb-el="1"/><circle data-hb-dot="1"/>'- face.setAttribute('data-hb-mood', 'think')- startFaceClock()- captured.draw!(1000)- observer!.emit([{ isIntersecting: true, target: face }])- captured.draw!(2000)- const eye = face.querySelector('ellipse')!- const gaze = eye.getAttribute('cy')- expect(Number(face.querySelector('circle')!.getAttribute('opacity'))).toBeGreaterThan(0)- face.setAttribute('data-hb-mood', 'idle')- captured.draw!(2067)- expect(eye.getAttribute('cy')).toBe(gaze)- captured.draw!(2667)- expect(Number(eye.getAttribute('cy'))).toBeCloseTo(17.2)- expect(Number(face.querySelector('circle')!.getAttribute('opacity'))).toBe(0)- })-interface CapturedLoop {draw: (now: number) => voididleWhen: () => boolean@@ -270,17 +249,6 @@ describe('the SDK budgeted-loop path', () => {return { calls, captured }}- it('hands the paint to the SDK loop and schedules no rAF of its own', async () => {- const { calls } = captureLoop()- const { startFaceClock } = await loadClock()-- mountFace()- startFaceClock()-- expect(calls.fps).toBe(15)- expect(frames.size).toBe(0)- })-it('reports idleness from visible-face state and wakes on visibility', async () => {const { calls, captured } = captureLoop()const { startFaceClock } = await loadClock()@@ -301,22 +269,6 @@ describe('the SDK budgeted-loop path', () => {expect(calls.wake).toBeGreaterThanOrEqual(2)})- it('disposes the loop and drops the window handle on stop', async () => {- const { calls } = captureLoop()- const { startFaceClock, stopFaceClock } = await loadClock()-- mountFace()- startFaceClock()-- const live = observer!-- stopFaceClock()-- expect(calls.dispose).toBe(1)- expect(live.disconnected).toBe(true)- expect(window.__hbFaceClock).toBeUndefined()- })-it('keeps a single clock across plugin loads', async () => {// Parked on `window` so a second load adopts the running clock instead of// starting a rival loop.diff --git a/apps/desktop/src/plugins/hermes-bots/avatar.test.tsx b/apps/desktop/src/plugins/hermes-bots/avatar.test.tsxindex d911f3ad99e..e7fa5aab33d 100644--- a/apps/desktop/src/plugins/hermes-bots/avatar.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/avatar.test.tsx@@ -120,18 +120,6 @@ describe('rendering a blob face', () => {expect('traits' in opts).toBe(false)})- it('passes the locked seed and the pinned silhouette’s trait', async () => {- const { BotFace } = await import('./avatar')-- render(<BotFace color="#38bdf8" name="inbox-triage" shape="blobatar:abc:sun" size={32} />)-- const [seed, opts] = lastBlobCall()-- expect(seed).toBe('abc')- expect(opts.traits?.shape).toBeGreaterThanOrEqual(BANDS.sun[0])- expect(opts.traits?.shape).toBeLessThan(BANDS.sun[1])- })-it('puts every silhouette inside its own frozen band', async () => {const { BLOB_KINDS, BotFace } = await import('./avatar')@@ -158,25 +146,6 @@ describe('rendering a blob face', () => {})})-describe('catchlight contrast follows the pupil, not the body', () => {- const catchlights = (container: HTMLElement) =>- ['l', 'r'].map(side => container.querySelector(`[data-hb-hl-${side}]`)?.getAttribute('fill'))-- it('puts a DARK sparkle on the cream pupils of a dark body', async () => {- const { BotFace } = await import('./avatar')- const { container } = render(<BotFace color="#3b0910" name="oxblood" shape="circle" />)-- expect(catchlights(container)).toEqual(['rgba(0,0,0,0.6)', 'rgba(0,0,0,0.6)'])- })-- it('keeps the white sparkle on the dark pupils of a light body', async () => {- const { BotFace } = await import('./avatar')- const { container } = render(<BotFace color="#f5e6c8" name="cream" shape="circle" />)-- expect(catchlights(container)).toEqual(['rgba(255,255,255,0.85)', 'rgba(255,255,255,0.85)'])- })-})-// Last: re-mocking the SDK re-links the whole avatar graph, so anything after// this would be running against the swapped module.describe('an SDK that predates blobatarSvg', () => {diff --git a/apps/desktop/src/plugins/hermes-bots/bot-row.test.tsx b/apps/desktop/src/plugins/hermes-bots/bot-row.test.tsxindex 7004e668996..443ae6973b5 100644--- a/apps/desktop/src/plugins/hermes-bots/bot-row.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/bot-row.test.tsx@@ -16,18 +16,13 @@*/import type * as HermesSdk from '@hermes/plugin-sdk'-import { act, fireEvent, render, screen, within } from '@testing-library/react'-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { act, fireEvent, render, screen } from '@testing-library/react'+import { beforeEach, describe, expect, it, vi } from 'vitest'-import { BotRow, GroupRow } from './bot-row'+import { BotRow } from './bot-row'import { $groupChats } from './group-chat'import { translateBotsIn } from './i18n-test-helper'-import type { GroupMember, RosterRow } from './types'--// Which shipped bundle the rendered rows resolve their strings against. `en`-// matches the literals this file once carried, so a case that has to prove a-// string comes from the catalog reads the same row under `ja`.-const locale = vi.hoisted(() => ({ current: 'en' as 'en' | 'ja' | 'zh' }))+import type { RosterRow } from './types'const { ensureAgent, ensureBotMetadata, notifyError, openRosterBot, requestProfile, warmAgent, warmProfile } =vi.hoisted(() => ({@@ -48,7 +43,7 @@ vi.mock('@hermes/plugin-sdk', async importOriginal => {host: { ...sdk.host, ensureAgent, notifyError, requestProfile, warmAgent, warmProfile },// The plugin bundle normally lands via `ctx.i18n.register` at load, so// without this every localized label in the row renders empty.- usePluginI18n: () => translateBotsIn(locale.current)+ usePluginI18n: () => translateBotsIn('en')}})@@ -205,80 +200,6 @@ describe('context-menu mutations hydrate the alias first', () => {})})-describe('the bot row context menu speaks the active language', () => {- afterEach(() => {- locale.current = 'en'- })-- it('renders the pin/hide toggles and the groups entry from the catalog, not English literals', async () => {- // Regression guard for the roster menu items that stayed hardcoded after- // the bundle landed: under `zh` no English label may survive.- locale.current = 'zh'- fireEvent.contextMenu(renderRow({ name: 'worker', connectionId: 'local' }))-- const menu = await screen.findByRole('menu')-- expect(within(menu).getByText('置顶')).toBeTruthy()- expect(within(menu).getByText('隐藏')).toBeTruthy()- expect(within(menu).getByText('管理群聊…')).toBeTruthy()- expect(within(menu).queryByText('Pin to top')).toBeNull()- expect(within(menu).queryByText('Hide')).toBeNull()- expect(within(menu).queryByText('Manage groups…')).toBeNull()- })-})--describe('a group row', () => {- const members = [{ name: 'alpha' }, { name: 'beta' }, { name: 'gamma' }] as GroupMember[]-- const row = (- <GroupRow- active={false}- group="crew"- members={members}- needsYou={false}- onDisband={noop}- onNewSection={noop}- onOpen={noop}- />- )-- beforeEach(() => {- locale.current = 'en'- })-- it('previews an empty room and describes it to assistive tech in the active language', () => {- const english = render(row)-- expect(english.getByText('3 bots')).toBeTruthy()- expect(english.getByRole('button', { name: 'crew, 3 bots, 3 of 3 available' })).toBeTruthy()- english.unmount()-- locale.current = 'ja'- const japanese = render(row)-- expect(japanese.getByText('ボット3体')).toBeTruthy()- expect(japanese.getByRole('button', { name: 'crew, ボット3体, 3体中3体が利用可能' })).toBeTruthy()- })-- it('names the reader in the active language when their line is the latest, without touching the log marker', () => {- // 'You' is the persisted author sentinel on the log entry; only its rendering localizes.- act(() =>- $groupChats.set({- crew: { log: [{ at: 1, from: { kind: 'user', name: 'You' }, text: 'ship it' }], running: false, watermarks: {} }- })- )- locale.current = 'zh'-- const chinese = render(row)-- expect(chinese.getByText('你: ship it')).toBeTruthy()- expect(chinese.queryByText(/^You:/)).toBeNull()- expect($groupChats.get().crew.log[0].from.name).toBe('You')-- act(() => $groupChats.set({}))- })-})-describe('age label reflects the last worker run, not only the last conversation (#105874)', () => {const nowSec = () => Date.now() / 1000diff --git a/apps/desktop/src/plugins/hermes-bots/canonical-chat-creation.test.ts b/apps/desktop/src/plugins/hermes-bots/canonical-chat-creation.test.tsindex 7c3b8906588..b6606cc1899 100644--- a/apps/desktop/src/plugins/hermes-bots/canonical-chat-creation.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/canonical-chat-creation.test.ts@@ -214,7 +214,10 @@ describe('the lazy row is materialized before anything else touches it', () => {it('falls back to English when the bundle has not registered yet', async () => {// Creation can race plugin registration; an unresolved key must never// reach the model as the literal `bot.kickoff`.- expect(await kickoffTextSent()).toBe('Hey, tell me about yourself!')+ const text = await kickoffTextSent()++ expect(text.trim()).not.toBe('')+ expect(text).not.toContain('bot.kickoff')})it('retries navigation after the compat kickoff when the eager title is unsupported', async () => {diff --git a/apps/desktop/src/plugins/hermes-bots/canonical-chat-open-failure-toast.test.ts b/apps/desktop/src/plugins/hermes-bots/canonical-chat-open-failure-toast.test.tsindex 8c7945a99d0..c0a61450e89 100644--- a/apps/desktop/src/plugins/hermes-bots/canonical-chat-open-failure-toast.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/canonical-chat-open-failure-toast.test.ts@@ -73,14 +73,12 @@ describe('notifyBotOpenFailure', () => {const toast = lastToast()expect(toast.kind).toBe('error')- expect(toast.title).toBe('This bot lives on an older Hermes')- expect(toast.message).toBe('Update Studio Mac, then try again.')+ expect(toast.message).toContain('Studio Mac')expect(toast.message).not.toContain(raw)expect(toast.detail).toBe(raw)expect(`${toast.title} ${toast.message}`).not.toMatch(/gateway|backend|worker/i)expect(hostMock.notifyError).not.toHaveBeenCalled()- expect(toast.action?.label).toBe('Open Gateways')toast.action?.onClick()expect(hostMock.navigate).toHaveBeenCalledWith('/settings?tab=gateway')})@@ -93,44 +91,11 @@ describe('notifyBotOpenFailure', () => {const toast = lastToast()expect(toast.kind).toBe('error')- expect(toast.title).toBe('Hermes couldn’t reach the computer this bot runs on')- expect(toast.message).toBe('Check it is online and try again.')expect(toast.message).not.toContain(raw)expect(toast.detail).toBe(raw)expect(`${toast.title} ${toast.message}`).not.toMatch(/gateway|backend|worker/i)- expect(toast.action?.label).toBe('Open Gateways')toast.action?.onClick()expect(hostMock.navigate).toHaveBeenCalledWith('/settings?tab=gateway')expect(hostMock.notifyError).not.toHaveBeenCalled()})-- it('open step: names the bot, raw error in detail, same Gateways action', async () => {- const { notifyBotOpenFailure } = await load()-- notifyBotOpenFailure(new Error('session.list timed out'), BOT, 'open', 'Ops Bot')-- const toast = lastToast()- expect(toast.title).toBe('Could not open Ops Bot’s chat')- expect(toast.message).toBe('Try again.')- expect(toast.detail).toBe('session.list timed out')- expect(toast.action?.label).toBe('Open Gateways')- })-- it('resolves copy through the plugin i18n bundle when one is registered', async () => {- pluginCtx.current = {- i18n: {- t: (key: string, ...args: unknown[]) =>- key === 'bot.openNeedsUpdateMessage' ? `[ja] update ${String(args[0])}` : `[ja] ${key}`- }- }- const { notifyBotOpenFailure } = await load()-- notifyBotOpenFailure(new Error('unknown method'), BOT, 'open')-- expect(lastToast()).toMatchObject({- title: '[ja] bot.openNeedsUpdateTitle',- message: '[ja] update Studio Mac',- action: { label: '[ja] bot.openGateways' }- })- })})diff --git a/apps/desktop/src/plugins/hermes-bots/create-group-chat-dialog.picker-row-truncate.test.tsx b/apps/desktop/src/plugins/hermes-bots/create-group-chat-dialog.picker-row-truncate.test.tsxdeleted file mode 100644index 99d0ff69090..00000000000--- a/apps/desktop/src/plugins/hermes-bots/create-group-chat-dialog.picker-row-truncate.test.tsx+++ /dev/null@@ -1,89 +0,0 @@-/**- * The New Group Chat picker rows are `label` flex containers wrapping a- * `min-w-0 flex-1` text column whose lines are `truncate`. A flex/grid item- * defaults to `min-width: auto`, so without `min-w-0` on the label itself the- * row can never shrink below its longest line (`@handle · in "A", "B", …`),- * `truncate` never engages, and the list widens past the viewport. The first- * click then focuses a checkbox that sits off-screen and scrolls every name- * out of view (PR #90624: wrapper 593px in a 414px viewport, scrollLeft 0 →- * 178.38 on click; 414px / 0 → 0 with the class).- *- * jsdom does no layout, so this asserts the contract the layout engine needs:- * the row label must opt out of the auto minimum width.- */--import type * as HermesSdk from '@hermes/plugin-sdk'-import { cleanup, render, screen } from '@testing-library/react'-import { afterEach, beforeAll, describe, expect, it, vi } from 'vitest'--import { translateBots } from './i18n-test-helper'-import type { RosterRow } from './types'--vi.mock('@hermes/plugin-sdk', async importOriginal => {- const original = await importOriginal<typeof HermesSdk>()-- return {- ...original,- host: {- ...original.host,- connections: vi.fn(async () => []),- notify: vi.fn(),- notifyError: vi.fn(),- request: vi.fn(async () => ({})),- requestProfile: vi.fn(async () => ({}))- },- // The plugin bundle normally lands via `ctx.i18n.register` at load.- usePluginI18n: () => translateBots- }-})--vi.setConfig({ testTimeout: 30_000 })--const LONG_NAME = 'An Extraordinarily Long Bot Name That Would Widen The Picker Row Past The Dialog Edge'--const roster: RosterRow[] = [- { connectionId: 'local', display_name: LONG_NAME, name: 'long-bot' },- { connectionId: 'local', name: 'short' }-]--beforeAll(async () => {- // Radix Dialog reaches for APIs jsdom does not implement.- Element.prototype.scrollIntoView = () => undefined- Element.prototype.hasPointerCapture = () => false- Element.prototype.releasePointerCapture = () => undefined- Element.prototype.setPointerCapture = () => undefined- await import('./create-dialog')-}, 120_000)--afterEach(() => {- cleanup()-})--describe('CreateGroupChatDialog picker rows', () => {- it('lets the row label shrink so long bot names truncate instead of widening the list', async () => {- const { CreateGroupChatDialog } = await import('./create-dialog')-- render(<CreateGroupChatDialog onClose={() => undefined} onCreated={() => undefined} open roster={roster} />)-- const nameCell = screen.getByText(LONG_NAME)- const label = nameCell.closest('label')-- expect(label).not.toBeNull()- // The row is a flex container AND a grid item; both default to- // `min-width: auto`, which is what defeats the inner `truncate`.- expect(label!.className.split(/\s+/)).toContain('min-w-0')- expect(label!.className.split(/\s+/)).toContain('flex')- // The text column it wraps is the one that actually ellipsizes.- expect(nameCell.className.split(/\s+/)).toContain('truncate')- expect(nameCell.parentElement!.className.split(/\s+/)).toEqual(expect.arrayContaining(['min-w-0', 'flex-1']))-- // Every row gets the same treatment, not just the long one.- const labels = screen.getAllByRole('checkbox').map(box => box.closest('label'))-- expect(labels).toHaveLength(roster.length)-- for (const row of labels) {- expect(row!.className.split(/\s+/)).toContain('min-w-0')- }- })-})diff --git a/apps/desktop/src/plugins/hermes-bots/cron-create-dialog.test.tsx b/apps/desktop/src/plugins/hermes-bots/cron-create-dialog.test.tsxindex 2d05299e417..6aa556bcb3c 100644--- a/apps/desktop/src/plugins/hermes-bots/cron-create-dialog.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/cron-create-dialog.test.tsx@@ -90,17 +90,6 @@ describe('the dialog names the bot, never its object', () => {})describe('where the run\u2019s output lands', () => {- it('offers run history and the bot\u2019s own chat', () => {- render(<CreateRoutineDialog bot={{ name: 'ops' }} onClose={() => undefined} open />)-- fireEvent.click(controlUnder('Send results to'))-- const options = screen.getAllByRole('option').map(option => option.textContent)-- expect(options).toContain('Run history only')- expect(options.some(option => option?.includes('chat (bot responds)'))).toBe(true)- })-it('sends no deliver param by default \u2014 history only', async () => {render(<CreateRoutineDialog bot={{ name: 'ops' }} onClose={() => undefined} open />)fillRequiredFields()diff --git a/apps/desktop/src/plugins/hermes-bots/cron-detail.test.tsx b/apps/desktop/src/plugins/hermes-bots/cron-detail.test.tsxindex 43af45964ab..fd51ce1dcd2 100644--- a/apps/desktop/src/plugins/hermes-bots/cron-detail.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/cron-detail.test.tsx@@ -28,7 +28,7 @@ vi.mock('@hermes/plugin-sdk', async importOriginal => {return { ...sdk, host: { ...sdk.host, request } }})-const { RoutineDetailDialog, RoutineRow, routineDetailIssue, routineDetailRows, routineLastResult } =+const { RoutineDetailDialog, RoutineRow, routineDetailIssue, routineDetailRows } =await import('./cron')const activeJob: RoutineJob = {@@ -91,22 +91,6 @@ describe('the facts the row never showed', () => {expect(valueOf(passthrough, 'Schedule')).toBe('0 9 * * 1-5')})- it('spells out every last_status the scheduler writes', () => {- // The gateway's literal set is closed; each one gets a human reading, and- // delivery_failed in particular must not read as a success.- expect(routineLastResult('ok')).toBe('Succeeded')- expect(routineLastResult('error')).toBe('Failed')- expect(routineLastResult('delivery_failed')).toBe('Ran, but delivery failed')- expect(routineLastResult('blocked_config')).toBe('Blocked by configuration (not run)')- // Unknown literals pass through rather than vanish.- expect(routineLastResult('something_new')).toBe('something_new')- expect(routineLastResult(undefined)).toBeNull()-- expect(valueOf(routineDetailRows({ ...activeJob, last_status: 'delivery_failed' }), 'Last result')).toBe(- 'Ran, but delivery failed'- )- })-it('explains a failing or scheduler-paused job in failure order', () => {expect(routineDetailIssue(activeJob)).toBeNull()expect(routineDetailIssue({ ...activeJob, paused_reason: 'too many failures' })).toBe('too many failures')diff --git a/apps/desktop/src/plugins/hermes-bots/cron-rpc-error.test.ts b/apps/desktop/src/plugins/hermes-bots/cron-rpc-error.test.tsindex 4619bfe2740..a190fce39d0 100644--- a/apps/desktop/src/plugins/hermes-bots/cron-rpc-error.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/cron-rpc-error.test.ts@@ -87,22 +87,6 @@ describe('a rejection always reaches React with a string name', () => {expect(() => react19Format(error)).not.toThrow()})- it('copies a sealed Error even where assignment would have worked', async () => {- const weird = new Error('sealed')-- Object.defineProperty(weird, 'name', { configurable: true, value: 32000, writable: true })- Object.seal(weird)-- const error = await rejectionFrom(weird)-- expect(error).not.toBe(weird)- expect(typeof error.name).toBe('string')- expect(error.message).toMatch(/sealed/)- // Assignment would have succeeded on a sealed writable property; we still- // copy so React 19 never sees a numeric name even if mutation is possible.- expect(weird.name).toBe(32000)- })-it('passes an ordinary Error through untouched', async () => {const original = new Error('gateway rejected the pause')diff --git a/apps/desktop/src/plugins/hermes-bots/data.identity.test.ts b/apps/desktop/src/plugins/hermes-bots/data.identity.test.tsindex f7f7e946409..43040ea74ff 100644--- a/apps/desktop/src/plugins/hermes-bots/data.identity.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/data.identity.test.ts@@ -83,14 +83,6 @@ describe('the @handle a bot answers to', () => {})describe('renamed bots stay taggable', () => {- // Discord report, Aug 2026: renaming a bot — Bot Mode title or `hermes- // profile rename` display_name — must change what you can @-tag it with,- // while the old profile handle keeps resolving.- it('reduces a friendly name to its slugged and collapsed forms', () => {- expect(mentionNameForms('Research Buddy')).toEqual(['research-buddy', 'researchbuddy'])- expect(mentionNameForms('Ops')).toEqual(['ops'])- })-it('drops reserved tokens so a rename cannot hijack a built-in tag', () => {expect(mentionNameForms('Hermes')).toEqual([])expect(mentionNameForms('@everyone')).toEqual([])@@ -280,10 +272,6 @@ describe('roster search narrows without re-ranking', () => {expect(filterBots(richer, {}, 'deployment checklist')[0].name).toBe('reviewer')expect(filterBots(richer, {}, 'work studio')[0].name).toBe('reviewer')})-- it('returns the existing roster reference for a blank query', () => {- expect(filterBots(roster, meta, ' ')).toBe(roster)- })})describe('unreachable same-name twins (#92286)', () => {diff --git a/apps/desktop/src/plugins/hermes-bots/group-activity.test.ts b/apps/desktop/src/plugins/hermes-bots/group-activity.test.tsindex 199424c2669..4c2ddaafb3b 100644--- a/apps/desktop/src/plugins/hermes-bots/group-activity.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/group-activity.test.ts@@ -302,20 +302,4 @@ describe('feed shape', () => {expect(feed(room, 'Volatile').length).toBeGreaterThan(0)expect([...room.gateway.storage.keys()]).not.toContain('group-activity')})-- it('labels read like a person wrote them, with settled/cancelled as room-level lines', async () => {- const { activity } = await loadRoom()-- const label = (event: Omit<GroupActivityEntry, 'at' | 'epoch'>) =>- activity.groupActivityLabel({ at: 0, epoch: 0, ...event })-- expect(label({ kind: 'queued', member: 'You' })).toBe('You sent a message')- expect(label({ kind: 'replied', member: 'research' })).toBe('research replied')- expect(label({ kind: 'timed-out', member: 'ops' })).toBe('ops took too long')- expect(label({ kind: 'failed', member: 'ops', reason: 'slot wait timed out' })).toBe(- 'ops hit an error — slot wait timed out'- )- expect(label({ kind: 'cancelled', member: null })).toBe('turn interrupted by a newer message')- expect(label({ kind: 'settled', member: null })).toBe('turn settled')- })})diff --git a/apps/desktop/src/plugins/hermes-bots/group-chat-parts.test.tsx b/apps/desktop/src/plugins/hermes-bots/group-chat-parts.test.tsxindex 76d49e70d02..e68624df760 100644--- a/apps/desktop/src/plugins/hermes-bots/group-chat-parts.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/group-chat-parts.test.tsx@@ -171,36 +171,6 @@ describe('insertion', () => {expect(options().some(label => label.startsWith('@builder'))).toBe(true)expect(options().some(label => label.startsWith('@undefined'))).toBe(false)})-- it('paints the popover on the elevated surface token, never a translucent fill (#113713)', async () => {- const { input } = await mount()-- typeInto(input, '@')-- // `--ui-bg-primary` is a hover/interactive FILL (accent mixed into a 10%- // base over transparent) — on it the transcript read straight through the- // menu. Floating menus sit on `--ui-bg-elevated`, an opaque surface.- const menu = screen.getByRole('button', { name: /^@everyone/ }).parentElement-- expect(menu?.className).toContain('bg-(--ui-bg-elevated)')- expect(menu?.className).not.toMatch(/bg-\(--ui-bg-(?:primary|secondary|tertiary)\)/)- })-})--// #89884: the composer used to be a single-line Input whose form submitted on-// every Enter, so multi-line room prompts were impossible.-describe('sizing (#95300)', () => {- it('sizes from its content up to a viewport-bounded cap and scrolls beyond it, while starting at one row', async () => {- const { input } = await mount()-- // Chromium's field-sizing does the growing; the contract the room relies- // on is the class set: content-sized, capped, scrolling past the cap,- // and a single compact row when empty.- expect(input.rows).toBe(1)- expect(input.classList.contains('field-sizing-content')).toBe(true)- expect(input.classList.contains('max-h-[min(50vh,24rem)]')).toBe(true)- expect(input.classList.contains('overflow-y-auto')).toBe(true)- })})describe('keyboard (#89884)', () => {diff --git a/apps/desktop/src/plugins/hermes-bots/group-chat-view.inline-code.test.tsx b/apps/desktop/src/plugins/hermes-bots/group-chat-view.inline-code.test.tsxdeleted file mode 100644index b9dc2e124cc..00000000000--- a/apps/desktop/src/plugins/hermes-bots/group-chat-view.inline-code.test.tsx+++ /dev/null@@ -1,90 +0,0 @@-import { readFileSync } from 'node:fs'-import { dirname, resolve } from 'node:path'-import { fileURLToPath } from 'node:url'--import { cleanup, render } from '@testing-library/react'-import type { ReactNode } from 'react'-import { afterEach, beforeAll, expect, it, vi } from 'vitest'--import { translateBots } from './i18n-test-helper'--// Room bodies render through the shell's message renderer, whose markdown-// root is `aui-md prose` — the same container the 1:1 chat uses, minus the-// `[data-slot='aui_assistant-message-content']` ancestor that scopes the-// themed inline-code rule in styles.css. Without a room-owned hook the room's-// `<code>` falls through to Tailwind Typography's fixed near-black ink, which-// is invisible on every dark theme (#114086). The stubs below emit the two-// shapes the room can produce (renderer path, raw Streamdown fallback) so the-// real stylesheet's cascade decides, not a regex over the source text.-vi.mock('@hermes/plugin-sdk', async () => {- const { pluginSdkMock, createGroupGateway } = await import('./group-test-utils')- const base = await pluginSdkMock(createGroupGateway().host)-- const Button = ({ children, onClick, title }: { children?: ReactNode; onClick?: () => void; title?: string }) => (- <button onClick={onClick} title={title}>- {children}- </button>- )-- return {- ...base,- Button,- RowButton: Button,- cn: (...values: unknown[]) => values.filter(Boolean).join(' '),- Codicon: () => null,- CopyButton: () => null,- Switch: () => null,- ConfirmDialog: () => null,- Dialog: () => null,- DialogContent: () => null,- DialogDescription: () => null,- DialogFooter: () => null,- DialogHeader: () => null,- DialogTitle: () => null,- Input: () => null,- MessageTextContent: ({ text }: { text: string }) => (- <div className="aui-md prose">- <p>- set <code data-testid="renderer-code">{text}</code> first- </p>- </div>- ),- Tip: ({ children }: { children: ReactNode }) => children,- relativeTime: () => 'now',- useI18n: () => ({ t: { common: { cancel: 'Cancel', save: 'Save' } } }),- usePluginI18n: () => translateBots- }-})-vi.mock('./avatar', () => ({ avatarColor: () => '#888', botAppearance: () => ({}), BotFace: () => null }))-vi.mock('./group-chat-parts', () => ({- GroupClarifyCard: () => null,- GroupImageControls: () => null,- GroupMentionInput: () => null-}))--const STYLES = resolve(dirname(fileURLToPath(import.meta.url)), '../../styles.css')--beforeAll(() => {- Element.prototype.scrollIntoView = vi.fn()- const sheet = document.createElement('style')- sheet.textContent = readFileSync(STYLES, 'utf8')- document.head.appendChild(sheet)-})-afterEach(cleanup)--it('themes inline code in room message bodies with the chat inline-code tokens', async () => {- const { $groupChats } = await import('./group-chat')- const { GroupChatWorkspace } = await import('./group-chat-view')-- const log = [- { id: 'm1', thread: 'a', from: { kind: 'member' as const, name: 'builder' }, text: 'discover_models', at: 1 }- ]-- $groupChats.set({ Room: { log, watermarks: {}, sessions: {} } })-- const { getByTestId } = render(<GroupChatWorkspace group="Room" members={[{ name: 'builder' }] as never} />)- const style = getComputedStyle(getByTestId('renderer-code'))-- expect(style.color).toBe('var(--ui-inline-code-foreground)')- expect(style.background).toBe('var(--ui-inline-code-background)')-})diff --git a/apps/desktop/src/plugins/hermes-bots/group-compress.test.tsx b/apps/desktop/src/plugins/hermes-bots/group-compress.test.tsxindex 194993035d6..66cbfe79b4e 100644--- a/apps/desktop/src/plugins/hermes-bots/group-compress.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/group-compress.test.tsx@@ -139,11 +139,7 @@ it('the room settings dialog offers Compress history per member and reports theawait waitFor(() => expect(state.gateway!.rpcFor('session.compress')).toHaveLength(1))const notify = state.gateway!.host.notify as ReturnType<typeof vi.fn>- await waitFor(() =>- expect(notify.mock.calls.map(([toast]) => (toast as { message: string }).message)).toContain(- 'Compressed 1 room session for Mason — 1588 → 134'- )- )+ await waitFor(() => expect(notify).toHaveBeenCalled())// Only mason's session was touched — critic never had one and none was created.expect(state.gateway!.rpcFor('session.create')).toHaveLength(0)})diff --git a/apps/desktop/src/plugins/hermes-bots/group-hold-status.test.tsx b/apps/desktop/src/plugins/hermes-bots/group-hold-status.test.tsxindex c54a237e11b..e8f119d2930 100644--- a/apps/desktop/src/plugins/hermes-bots/group-hold-status.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/group-hold-status.test.tsx@@ -58,24 +58,6 @@ afterEach(() => {})describe('durable group holds', () => {- it('shows an accessible all-members status without relying on the activity feed', async () => {- const { GroupHoldStatus } = await import('./group-hold-status')-- render(- <GroupHoldStatus- holds={{ builder: { at: 2 }, research: { at: 1 } }}- memberLabel={member => member.title || member.name}- members={MEMBERS}- />- )-- const status = screen.getByRole('status')-- expect(status.textContent).toContain('All 2 bots are paused')- expect(status.textContent).toContain('Mention a paused bot or send @all resume to release them.')- expect(status.querySelector('[data-icon="debug-pause"]')).not.toBeNull()- })-it('keeps unmatched holds visible instead of reporting all current members held', async () => {const { GroupHoldStatus } = await import('./group-hold-status')diff --git a/apps/desktop/src/plugins/hermes-bots/group-mention-text.test.tsx b/apps/desktop/src/plugins/hermes-bots/group-mention-text.test.tsxindex 1969f05af19..f1a3bb1b360 100644--- a/apps/desktop/src/plugins/hermes-bots/group-mention-text.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/group-mention-text.test.tsx@@ -46,11 +46,11 @@ describe('group mention rendering', () => {const text = '@planner compare the options, then @user picks; mail [email protected] — @everyone review'const html = renderToStaticMarkup(<>{renderGroupMentionText(text, members)}</>)- expect(html).toContain('<span class="ref font-medium" data-ref="agent"')+ expect(html).toContain('data-ref="agent"')expect(html).toContain('data-ref="human"')expect(html).toContain('data-ref="broadcast"')// `@example.com` is not a room identity — no span around it.- expect(html).not.toContain('data-ref="agent" title="Bot in this room">@example')+ expect(html).not.toMatch(/data-ref="[^"]*"[^>]*>@example/)expect(html.replace(/<[^>]+>/g, '')).toBe(text)})})diff --git a/apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts b/apps/desktop/src/plugins/hermes-bots/group-rounds.test.tsindex cc95e66eee1..b32fa360e00 100644--- a/apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts@@ -516,21 +516,9 @@ describe('round lifecycle', () => {const replies = log(room, 'Sentinel').filter(entry => entry.from.kind === 'member')expect(replies).toHaveLength(1)- expect(replies[0].text).toContain('The model returned no response after processing tool results')+ expect(replies[0].text.trim()).not.toBe('')expect(replies[0].text).not.toContain('(empty)')})-- it('leaves normal replies untouched', async () => {- const room = await loadRoom({ turn: ({ profile }) => (profile === 'research' ? 'I am not empty.' : '(pass)') })-- room.rounds.sendToGroupChat('Sentinel2', [{ name: 'research', title: '' }], '@research hi')- await settle(room, 'Sentinel2')-- const replies = log(room, 'Sentinel2').filter(entry => entry.from.kind === 'member')-- expect(replies).toHaveLength(1)- expect(replies[0].text).toBe('I am not empty.')- })})describe('per-member delta', () => {@@ -847,24 +835,6 @@ describe('turn prompt', () => {expect(peer).toMatch(/group chat with Bobby \(@bobby\)/)})-- it('asks for full-quality results and short chatter, not short results', async () => {- const { rounds } = await loadRoom()- const { buildGroupChatTurnPrompt } = await import('./group-round-prompt')-- const prompt = buildGroupChatTurnPrompt({- deltaLines: [],- groupName: 'Core',- members: [- { name: 'research', title: '' },- { name: 'builder', title: '' }- ],- viewer: { name: 'research', title: '' }- })-- expect(prompt).toMatch(/never thin out real content/i)- expect(prompt).toMatch(/Keep chatter short/i)- })})describe('attachments', () => {@@ -1037,57 +1007,9 @@ describe('attachments', () => {await settle(room, 'PdfFail')expect(room.gateway.calls).toHaveLength(1)- expect(room.gateway.calls[0].prompt).toContain('could not be staged into your session')expect(room.gateway.calls[0].prompt).toContain('notes.pdf')expect(room.gateway.calls[0].prompt).not.toContain('Attached files staged in your session workspace:')})-- it('appends the file.attach ref_text to the member turn prompt', async () => {- const room = await loadRoom()- const doc: Attachment = { data: 'data:text/plain;base64,aGVsbG8=', kind: 'file', name: 'notes.txt' }-- room.rounds.sendToGroupChat(- 'Refs',- [- { name: 'research', title: '' },- { name: 'builder', title: '' }- ],- 'read the notes',- null,- [doc]- )- await settle(room, 'Refs')-- expect(room.gateway.calls).toHaveLength(2)-- for (const call of room.gateway.calls) {- expect(call.prompt).toContain('Attached files staged in your session workspace:')- expect(call.prompt).toContain('notes.txt → @file:attachments/notes.txt')- }- })-- it('names attachments in the transcript line, labelling PDFs and files distinctly', async () => {- const { rounds } = await loadRoom()- const { formatGroupChatLine } = await import('./group-round-prompt')- const pdf: Attachment = { data: 'data:application/pdf;base64,JVBERi0=', kind: 'pdf', name: 'spec.pdf' }- const doc: Attachment = { data: 'data:text/plain;base64,aGVsbG8=', kind: 'file', name: 'notes.txt' }- const line = (entry: Partial<GroupMessage>) => formatGroupChatLine(entry as GroupMessage, 'research')-- expect(line({ from: { kind: 'user', name: 'You' }, images: [IMG], text: 'see attached' })).toBe(- 'You (user): see attached [attached image: screenshot.png]'- )- expect(line({ from: { kind: 'user', name: 'You' }, text: 'plain' })).toBe('You (user): plain')- expect(- line({- from: { kind: 'member', name: 'builder' },- images: [{ data: 'data:image/png;base64,x' } as Attachment],- text: 'made this'- })- ).toBe('builder: made this [attached image: image]')- expect(line({ from: { kind: 'user', name: 'You' }, images: [pdf, doc, IMG], text: 'here' })).toBe(- 'You (user): here [attached PDF: spec.pdf] [attached file: notes.txt] [attached image: screenshot.png]'- )- })})// #93129: a bot told to stop must STAY stopped.@@ -1109,12 +1031,6 @@ describe('member holds (#93129)', () => {expect([...rounds.classifyGroupHoldDirective('stop', [], false).hold]).toEqual([])})- it('still holds on "don\'t stop @x" — the documented conservative trade-off', async () => {- const { rounds } = await loadRoom()-- expect([...rounds.classifyGroupHoldDirective("don't stop @impl", ['impl'], false).hold]).toEqual(['impl'])- })-it('does not trigger on "stop" inside another word', async () => {const { rounds } = await loadRoom()diff --git a/apps/desktop/src/plugins/hermes-bots/group-turns.test.ts b/apps/desktop/src/plugins/hermes-bots/group-turns.test.tsindex edcd4223ee1..bd979d29a46 100644--- a/apps/desktop/src/plugins/hermes-bots/group-turns.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/group-turns.test.ts@@ -387,7 +387,7 @@ describe('per-turn socket lease', () => {expect(resumes.length).toBeGreaterThan(0)for (const resume of resumes) {- expect(resume).toMatchObject({ spawnPriority: 'foreground', timeoutMs: 180_000 })+ expect(resume).toMatchObject({ spawnPriority: 'foreground' })}expect(room.gateway.rpcFor('session.create')).toEqual([expect.objectContaining({ spawnPriority: 'foreground' })])@@ -403,15 +403,6 @@ describe('per-turn socket lease', () => {expect(room.gateway.timeline.at(-1)).toBe('release')})- it('is released after the turn — the refcount returns to zero', async () => {- const room = await loadRoom({ turn: () => 'done' })-- await room.turns.runGroupChatMemberTurn('Room', ROUTED_MEMBER, 'hi', 't1', [])-- expect(room.gateway.refcount()).toBe(0)- expect(room.gateway.disposals()).toBe(1)- })-it('is released even when the turn fails', async () => {const room = await loadRoom({ failEverySubmitWith: new Error('backend exploded') })diff --git a/apps/desktop/src/plugins/hermes-bots/hide-bot-chats.test.ts b/apps/desktop/src/plugins/hermes-bots/hide-bot-chats.test.tsindex ffe45119b7d..6f5da6e126a 100644--- a/apps/desktop/src/plugins/hermes-bots/hide-bot-chats.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/hide-bot-chats.test.ts@@ -140,19 +140,6 @@ describe('the id half: group room member sessions', () => {expect(hiddenCalls().every(([, options]) => options.hidden)).toBe(true)})- it('never consults a stored canonical pointer', async () => {- // Canonical Bot Chats are hidden by the TITLE sweep below — they are- // identified by name, not by pointer. The load-time reconciliation reads- // no bot-meta chat id and issues no id-verification RPC.- groupChats.value = { Core: { sessions: { alpha: 'room-core-a' } } }- lastRoster.value = [{ name: 'alpha' } as RosterRow]-- await runSweep()-- expect(requestForBotMock).not.toHaveBeenCalled()- expect(hostMock.request).not.toHaveBeenCalled()- })-it('routes a remote member session through its immutable persisted owner', async () => {const owner = {name: 'worker',diff --git a/apps/desktop/src/plugins/hermes-bots/i18n.test.ts b/apps/desktop/src/plugins/hermes-bots/i18n.test.tsdeleted file mode 100644index d2d162d8477..00000000000--- a/apps/desktop/src/plugins/hermes-bots/i18n.test.ts+++ /dev/null@@ -1,70 +0,0 @@-/**- * The English bundle is the message shape. ja / zh / zh-hant must cover the- * same leaves so a locale switch never falls through to a raw key — and the- * interpolators must still splice their arguments, not drop them.- */--import { describe, expect, it } from 'vitest'--import { BOTS_LOCALES } from './i18n'--type Leaf = string | ((...args: never[]) => string)--function leafEntries(node: unknown, prefix = ''): Array<[string, Leaf]> {- if (typeof node === 'function' || typeof node === 'string') {- return [[prefix, node as Leaf]]- }-- return Object.entries(node as Record<string, unknown>).flatMap(([key, value]) =>- leafEntries(value, prefix ? `${prefix}.${key}` : key)- )-}--const en = BOTS_LOCALES.en-const ja = BOTS_LOCALES.ja-const zh = BOTS_LOCALES.zh-const zhHant = BOTS_LOCALES['zh-hant']--describe('BOTS_LOCALES', () => {- it('covers the English key tree in every shipped locale', () => {- expect(ja).toBeDefined()- expect(zh).toBeDefined()- expect(zhHant).toBeDefined()-- const enPaths = leafEntries(en).map(([path]) => path)-- expect(leafEntries(ja).map(([path]) => path)).toEqual(enPaths)- expect(leafEntries(zh).map(([path]) => path)).toEqual(enPaths)- expect(leafEntries(zhHant).map(([path]) => path)).toEqual(enPaths)- })-- it('translates user-visible chrome instead of echoing English', () => {- const samples = ['roster.emptyTitle', 'bot.newTitle', 'group.manageTitle', 'tools.skillsHub'] as const- const enByPath = Object.fromEntries(leafEntries(en))-- for (const locale of [ja, zh, zhHant]) {- const byPath = Object.fromEntries(leafEntries(locale))-- for (const path of samples) {- expect(byPath[path]).not.toBe(enByPath[path])- }- }- })-- it('keeps interpolator arguments in the translated string', () => {- const sentinel = 'QUERY_SENTINEL'- const gateway = 'GATEWAY_SENTINEL'-- for (const locale of [en, ja, zh, zhHant]) {- const byPath = Object.fromEntries(leafEntries(locale))- const queryFn = byPath['roster.noMatchQuery'] as (query: string) => string- const bothFn = byPath['roster.noMatchQueryOn'] as (query: string, gateway: string) => string- const reasonFn = byPath['roster.rosterUnavailable'] as (reason: string) => string-- expect(queryFn(sentinel)).toContain(sentinel)- expect(bothFn(sentinel, gateway)).toContain(sentinel)- expect(bothFn(sentinel, gateway)).toContain(gateway)- expect(reasonFn(sentinel)).toContain(sentinel)- }- })-})diff --git a/apps/desktop/src/plugins/hermes-bots/pet.test.tsx b/apps/desktop/src/plugins/hermes-bots/pet.test.tsxindex 8fc9dd5ff40..e89e90fd99a 100644--- a/apps/desktop/src/plugins/hermes-bots/pet.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/pet.test.tsx@@ -83,25 +83,6 @@ afterEach(() => {})describe('the pet gallery', () => {- it('reserves paint space around boundary tiles inside the bounded scroller', async () => {- const PetTab = await loadPetTab()- const view = render(<PetTab image={null} onImage={vi.fn()} />)- await waitFor(() => expect(view.container.querySelector('img')).toBeTruthy())- const tile = view.getByText('Axolotl').closest('button')!- const scroller = tile.parentElement!.parentElement!-- // The selection ring paints one pixel outside each tile. The scrollport- // must leave room for it even at the first/last row and outer columns.- const style = getComputedStyle(scroller)-- for (const side of ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'] as const) {- expect(parseFloat(style[side]) || 0).toBeGreaterThanOrEqual(1)- }-- expect(parseFloat(style.maxHeight)).toBeGreaterThan(0)- view.unmount()- })-it('keeps selection while scrolling for more and resets the search window', async () => {useQueryMock.mockReturnValue({data: {@@ -127,7 +108,6 @@ describe('the pet gallery', () => {fireEvent.scroll(scroller)expect(view.getByText('Pet 47')).toBeTruthy()expect(view.queryByText('Pet 48')).toBeNull()- expect(first.className).toContain('ring-1')fireEvent.change(view.getByRole('textbox'), { target: { value: 'Pet 59' } })expect(view.getByText('Pet 59')).toBeTruthy()fireEvent.change(view.getByRole('textbox'), { target: { value: '' } })diff --git a/apps/desktop/src/plugins/hermes-bots/plugin-panes.test.tsx b/apps/desktop/src/plugins/hermes-bots/plugin-panes.test.tsxindex 14921547f2f..ac07b81e72a 100644--- a/apps/desktop/src/plugins/hermes-bots/plugin-panes.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/plugin-panes.test.tsx@@ -169,24 +169,6 @@ afterEach(() => {})describe('the Bots pane dock', () => {- it('center-stacks into the sessions zone as a standing invariant', () => {- paneStores()-- const harness = recordingContext()-- plugin.register(harness.ctx)-- const data = harness.find('pane')!.data!-- expect(data.dock).toEqual({ enforce: true, pane: 'sessions', pos: 'center' })- // A 'bottom' split was the old workaround for the lone-pane auto-hide trap.- expect((data.dock as { pos: string }).pos).not.toBe('bottom')- // No heal token: the invariant runs at every adoption, unconditionally.- expect(data).not.toHaveProperty('heal')-- harness.dispose()- })-it('renders its tab label from the live locale, not the register-time string', () => {paneStores()@@ -205,8 +187,8 @@ describe('the Bots pane dock', () => {</I18nProvider>)- expect(inLocale('ru')).toBe('Боты')- expect(inLocale('en')).toBe('Bots')+ expect(inLocale('en')).toBeTruthy()+ expect(inLocale('ru')).not.toBe(inLocale('en'))harness.dispose()})@@ -225,16 +207,7 @@ describe('the Scheduled jobs pane', () => {mocks.botChatOwnsWorkspace.mockReturnValue(true)store(`hermes-bots:pane`).set(true)- const routines = harness.find('routines')!-- expect(routines.data).toMatchObject({- // Repairs persisted layouts that stranded the tile in the Bots tab strip.- dock: { enforce: true, pane: 'workspace', pos: 'right' },- placement: 'main'- })- // Glanceable, not something you sit in: it arrives as the right edge's- // vertical tab and takes no width off the chat until the user opens it.- expect(routines.data!.defaultCollapsed).toBe(true)+ expect(harness.find('routines')).toBeTruthy()harness.dispose()})diff --git a/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.ts b/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.tsindex 9d75423936c..465026729e5 100644--- a/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/plugin.mentions.test.ts@@ -225,7 +225,6 @@ describe('Bot Chat reset guard', () => {hostMock.notify.mockClear()expect(await handler({ text })).toEqual({ text: '/compact' })expect(hostMock.notify).toHaveBeenCalledOnce()- expect(hostMock.notify).toHaveBeenCalledWith(expect.objectContaining({ title: 'This chat never resets' }))}}@@ -436,20 +435,6 @@ describe('the mention middleware', () => {expect(result.text).not.toMatch(/ — on /)})- it('teaches no shellout and forbids forwarding the user’s text verbatim', async () => {- // The class behind #91397 / #91304 / #91339: the renderer used to compose- // a `hermes -p …` handoff, giving the model a second send path and a way- // to relay the raw draft.- const { handler } = await contributions({ focused: 'research', profiles: [{ name: 'research' }, { name: 'ops' }] })- const result = await handler({ text: 'ask @ops to summarize' })-- expect(result.text).not.toMatch(/hermes -p/)- expect(result.text).not.toMatch(/terminal call/i)- expect(result.text).not.toMatch(/background=true/)- expect(result.text).toMatch(/compose your own message/i)- expect(result.text).toMatch(/never forward/i)- })-it('keeps a poisoned bot title inert prose', async () => {// Nothing here is a command line, so there is nothing to break out of —// the invariant that matters is that no hermes command is ever emitted.diff --git a/apps/desktop/src/plugins/hermes-bots/profile-config-capabilities.test.tsx b/apps/desktop/src/plugins/hermes-bots/profile-config-capabilities.test.tsxindex f0e2ee43ba0..fccbc47aebb 100644--- a/apps/desktop/src/plugins/hermes-bots/profile-config-capabilities.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/profile-config-capabilities.test.tsx@@ -267,36 +267,4 @@ describe('a build with no Capabilities exports at all', () => {expect(screen.getByText('remote-mcp')).toBeTruthy()expect(screen.getByRole('button', { name: /Set up/ })).toBeTruthy()})-- it('says so plainly when the profile has no MCP servers', async () => {- await renderEditor(bareBuild, localBot, { mcp: [] })-- expect(screen.getByText('No MCP servers configured or in the catalog.')).toBeTruthy()- })-})--describe('the model catalog read', () => {- it('#95279: rides the bot\u2019s captured route and never forces a refresh', async () => {- sdk.exports = {}- vi.resetModules()-- const { ModelPicker } = await import('./model-picker')-- render(- withQueryClient(<ModelPicker bot={remoteBot} onChange={() => undefined} value={{ model: '', provider: '' }} />)- )-- // No `refresh`: a forced network read on every mount bypassed the- // staleTime cache, so each Bots view remount re-entered the spinner and- // discarded the user's staged selection mid-edit.- expect(sdk.requestProfile).toHaveBeenCalledWith(- expect.objectContaining({ connectionId: 'remote-a' }),- 'model.options',- {- explicit_only: false,- include_unconfigured: true- }- )- expect(sdk.request).not.toHaveBeenCalled()- })})diff --git a/apps/desktop/src/plugins/hermes-bots/profile-ops.test.ts b/apps/desktop/src/plugins/hermes-bots/profile-ops.test.tsindex 76d6b33fdf7..691175201da 100644--- a/apps/desktop/src/plugins/hermes-bots/profile-ops.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/profile-ops.test.ts@@ -126,14 +126,6 @@ describe('duplicating a bot', () => {expect(name).not.toBe(base)})- it('ensures the source bot has its metadata before cloning', async () => {- // clone_from copies the profile dir; the source's Bot Chat has to exist- // first or the clone inherits a half-built profile.- await duplicateBot({ name: 'ops' } as RosterRow, [])-- expect(ensureBotMetadataMock).toHaveBeenCalledTimes(1)- })-it('only collides against rows on the SAME connection', async () => {// A same-named bot on another gateway is a different agent entirely.const bot = {diff --git a/apps/desktop/src/plugins/hermes-bots/relay-deliver-budget.test.ts b/apps/desktop/src/plugins/hermes-bots/relay-deliver-budget.test.tsdeleted file mode 100644index 97c82ad8fe0..00000000000--- a/apps/desktop/src/plugins/hermes-bots/relay-deliver-budget.test.ts+++ /dev/null@@ -1,70 +0,0 @@-import { readFileSync } from 'node:fs'-import { join } from 'node:path'--import { describe, expect, it } from 'vitest'--// #93911 review follow-up: the Desktop deadline for bot_relay.deliver mirrors-// three backend numbers. Nothing in the type system links a TS constant to a-// Python default, so this file is the seam: it reads the backend sources and-// fails when a mirror drifts or the settlement margin stops being positive.-// Without it, raising the backend turn timeout would silently reintroduce-// #93911 — the client giving up before a valid typed settlement arrives.--const relaySource = readFileSync(join(process.cwd(), 'src/plugins/hermes-bots/relay.ts'), 'utf8')-const repoRoot = join(process.cwd(), '..', '..')-const configDefaults = readFileSync(join(repoRoot, 'hermes_cli/config_defaults.py'), 'utf8')-const relayPlumbing = readFileSync(join(repoRoot, 'tools/bot_relay.py'), 'utf8')--function tsConstant(name: string): number {- const match = relaySource.match(new RegExp(`const ${name} = ([0-9_]+)`))- expect(match, `${name} must stay a literal so this test can read it`).toBeTruthy()-- return Number(match![1].replaceAll('_', ''))-}--function pyConstant(name: string): number {- const match = relayPlumbing.match(new RegExp(`^${name}\\s*=\\s*(\\d+)`, 'm'))- expect(match, `${name} must exist as a literal in tools/bot_relay.py`).toBeTruthy()-- return Number(match![1])-}--describe('bot_relay.deliver budget mirrors', () => {- it('mirrors the backend turn-lock default', () => {- const lockWaitMatch = configDefaults.match(/"turn_wait_seconds":\s*(\d+)/)-- expect(lockWaitMatch, 'bot_mode.turn_wait_seconds default must exist in config_defaults.py').toBeTruthy()- expect(tsConstant('RELAY_TURN_LOCK_WAIT_MS')).toBe(Number(lockWaitMatch![1]) * 1000)- })-- it('mirrors the backend per-attempt turn timeout', () => {- // The backend names both numbers explicitly (tools/bot_relay.py) so the mirror is a- // constant-to-constant check, not a count of textual subprocess.run(...) call sites.- expect(tsConstant('RELAY_TURN_ATTEMPT_MS')).toBe(pyConstant('TURN_ATTEMPT_TIMEOUT_SECONDS') * 1000)- expect(tsConstant('RELAY_TURN_MAX_ATTEMPTS')).toBe(pyConstant('TURN_MAX_ATTEMPTS'))- })-- it('shares its settlement margin with the sender-side waiter budget', () => {- // tests/tools/test_bot_relay.py checks that REPLY_WAIT_SECONDS exceeds the rebuilt sum.- expect(tsConstant('RELAY_DELIVER_SETTLEMENT_MARGIN_MS')).toBe(- pyConstant('DESKTOP_DELIVER_SETTLEMENT_MARGIN_SECONDS') * 1000- )- })-- it('keeps the client deadline strictly greater than the backend ceiling', () => {- const margin = tsConstant('RELAY_DELIVER_SETTLEMENT_MARGIN_MS')-- // Strictly greater, not equal: a backend that answers at its own limit- // still has to serialize and transport that answer.- expect(margin, 'settlement margin must be positive').toBeGreaterThan(0)-- // The call site must pass the composed budget, not a bare literal.- const drain = relaySource.slice(- relaySource.indexOf('async function drainRelayOutboxes'),- relaySource.indexOf('export function startBotRelay')- )-- expect(drain).toMatch(/'bot_relay\.deliver'[\s\S]{0,400}RELAY_DELIVER_TIMEOUT_MS/)- expect(drain).not.toMatch(/'bot_relay\.deliver'[\s\S]{0,400}\d{6,}/)- })-})diff --git a/apps/desktop/src/plugins/hermes-bots/routing.test.ts b/apps/desktop/src/plugins/hermes-bots/routing.test.tsindex 47adfffeab3..476f9e66d7b 100644--- a/apps/desktop/src/plugins/hermes-bots/routing.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/routing.test.ts@@ -262,32 +262,6 @@ describe('requestForBot rides the bot’s own source', () => {})})- it('passes a foreground spawnPriority through to host.requestProfile and keeps untagged calls at three args', async () => {- // #105104: the Bot Chat open is a user click. Its RPC must reach the SDK- // with the dial tag; passive roster warming (no options) must keep the- // exact call shape older shells expect.- hostMock.requestProfile.mockResolvedValue({})- const bot = { connectionId: 'local', name: 'ops', sourceScoped: true } as RosterRow-- await requestForBot(bot, 'session.list', {}, { spawnPriority: 'foreground' })- await requestForBot(bot, 'profiles.list', {})-- expect(hostMock.requestProfile).toHaveBeenNthCalledWith(- 1,- expect.objectContaining({ connectionId: 'local', profile: 'ops' }),- 'session.list',- {},- undefined,- { spawnPriority: 'foreground' }- )- expect(hostMock.requestProfile).toHaveBeenNthCalledWith(- 2,- expect.objectContaining({ connectionId: 'local', profile: 'ops' }),- 'profiles.list',- {}- )- })-it('fails closed rather than falling back to the ambient request', async () => {// A scoped row whose shell predates requestProfile must NOT silently// execute against whichever gateway happens to be active.diff --git a/apps/desktop/src/plugins/hermes-bots/row-helpers.test.ts b/apps/desktop/src/plugins/hermes-bots/row-helpers.test.tsindex 009b5ed245e..be8f19bf4b0 100644--- a/apps/desktop/src/plugins/hermes-bots/row-helpers.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/row-helpers.test.ts@@ -193,11 +193,6 @@ describe('the roster activity filter', () => {// A bot with no activity at all counts as older, never recent.expect(rosterActivityMatches({}, 'older', NOW)).toBe(true)})-- it('reads the live pulse for the active filter', () => {- expect(rosterActivityMatches({ active: true }, 'active', NOW)).toBe(true)- expect(rosterActivityMatches({ active: false }, 'active', NOW)).toBe(false)- })})describe('which row owns the workspace highlight', () => {diff --git a/apps/desktop/src/plugins/hermes-bots/soul.test.ts b/apps/desktop/src/plugins/hermes-bots/soul.test.tsindex 813111ce3ab..aaccd315766 100644--- a/apps/desktop/src/plugins/hermes-bots/soul.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/soul.test.ts@@ -78,20 +78,6 @@ describe('appending the protocol to an existing SOUL', () => {expect(sectionCount(twice)).toBe(1)})- it('points at the real CLI verb, not the plural that does not exist', async () => {- const { ensureMessagingProtocol } = await loadSoul()- const soul = ensureMessagingProtocol('', 'default', roster)-- expect(soul).toMatch(/run `hermes profile list` for the LIVE/)- expect(soul).not.toMatch(/hermes profiles list/)- })-- it('seeds an empty SOUL with the section alone', async () => {- const { ensureMessagingProtocol } = await loadSoul()-- expect(ensureMessagingProtocol('', 'ops', [])).toMatch(/^## Messaging other agents/)- expect(ensureMessagingProtocol('', 'ops', [])).toMatch(/- \(none yet\)/)- })})describe('composeSoul', () => {diff --git a/apps/desktop/src/plugins/kanban/board-switcher.test.tsx b/apps/desktop/src/plugins/kanban/board-switcher.test.tsxindex 03c5d5c5d33..dc5539f9d85 100644--- a/apps/desktop/src/plugins/kanban/board-switcher.test.tsx+++ b/apps/desktop/src/plugins/kanban/board-switcher.test.tsx@@ -1,5 +1,5 @@import { QueryClient, QueryClientProvider } from '@tanstack/react-query'-import { cleanup, fireEvent, render, screen } from '@testing-library/react'+import { cleanup, render, screen } from '@testing-library/react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'// Test harness supplies the host's locale registration, as plugin loading does.@@ -49,18 +49,4 @@ describe('board switcher', () => {expect(await screen.findByText('Shipping')).toBeTruthy()})- // The trigger is projected into the Kanban page header as the board's own name, so it- // must announce itself as a control: a visible "Board" label, a "Board: …"- // accessible name, and a "Switch board" tooltip on hover.- it('identifies the current board switcher as a control', async () => {- mount()-- const trigger = await screen.findByRole('button', { name: 'Board: Shipping' })-- expect(trigger.textContent).toContain('Board')-- fireEvent.pointerMove(trigger, { pointerType: 'mouse' })-- expect((await screen.findByRole('tooltip')).textContent).toContain('Switch board')- })})diff --git a/apps/desktop/src/plugins/kanban/completion-notify.test.ts b/apps/desktop/src/plugins/kanban/completion-notify.test.tsindex ad25517eb6f..2790d28d663 100644--- a/apps/desktop/src/plugins/kanban/completion-notify.test.ts+++ b/apps/desktop/src/plugins/kanban/completion-notify.test.ts@@ -331,12 +331,11 @@ describe('notification content', () => {await m.onKanbanEventsFrame('smoke', [ev(101, 'completed', { summary: 'Done', artifacts: [] })])- expect(lastNotify()).toEqual({+ expect(lastNotify()).toMatchObject({kind: 'success',- title: 'Task completed',message: 'Done',detail: 't101',- action: { label: 'Open Kanban', onClick: expect.any(Function) }+ action: { onClick: expect.any(Function) }})})@@ -351,17 +350,6 @@ describe('notification content', () => {expect(lastNotify().detail).toBe('t101 · report.md')})- it('multiple artifacts: "<N> artifacts"', async () => {- const m = await loadModule()- m.bindCompletionNotify(makeRest(() => 100) as never)-- await m.onKanbanEventsFrame('smoke', [- ev(101, 'completed', { summary: 'Done', artifacts: ['/a/1.md', '/b/2.md', '/c/3.md'] })- ])-- expect(lastNotify().detail).toBe('t101 · 3 artifacts')- })-it('malformed payload does not crash: null payload, non-array artifacts, non-string summary', async () => {const m = await loadModule()m.bindCompletionNotify(makeRest(() => 100) as never)@@ -384,9 +372,7 @@ describe('notification content', () => {await m.onKanbanEventsFrame('smoke', [ev(101, 'completed', { summary: 'Done' })])- const input = lastNotify()- expect(input.action?.label).toBe('Open Kanban')- input.action?.onClick()+ lastNotify().action?.onClick()expect(hostMock.navigate).toHaveBeenCalledWith('/kanban')})})@@ -422,7 +408,6 @@ describe('terminal kinds beyond completed', () => {expect(fired).toBe(true)expect(lastNotify()).toMatchObject({kind: 'warning',- title: 'Task blocked — needs your input',message: 'needs API key',detail: 't101'})@@ -437,7 +422,6 @@ describe('terminal kinds beyond completed', () => {expect(fired).toBe(true)expect(lastNotify()).toMatchObject({kind: 'warning',- title: 'Task routed to triage — needs a decision',message: 'same cause 3x'})})@@ -449,12 +433,9 @@ describe('terminal kinds beyond completed', () => {await m.onKanbanEventsFrame('smoke', [ev(101, 'gave_up', { error: 'spawn failed: ECONNREFUSED 127.0.0.1:9999' })])const gaveUp = lastNotify()expect(gaveUp.kind).toBe('error')- expect(gaveUp.title).toBe('Task stopped')- expect(gaveUp.message).toBe('Hermes couldn’t finish this task. Open Kanban to see why and reassign it.')expect(gaveUp.message).not.toContain('spawn failed')expect(gaveUp.detail).toContain('spawn failed: ECONNREFUSED 127.0.0.1:9999')expect(gaveUp.detail).toContain('t101')- expect(gaveUp.action?.label).toBe('Open Kanban')await m.onKanbanEventsFrame('smoke', [ev(102, 'crashed'), ev(103, 'timed_out', { limit_seconds: 900 })])expect(hostMock.notify).toHaveBeenCalledTimes(3)@@ -467,24 +448,7 @@ describe('terminal kinds beyond completed', () => {m.bindCompletionNotify(makeRest(() => 100) as never)await m.onKanbanEventsFrame('smoke', [ev(101, 'gave_up', null)])- expect(lastNotify()).toMatchObject({- kind: 'error',- message: 'Hermes couldn’t finish this task. Open Kanban to see why and reassign it.',- detail: 't101'- })- })-- it('retrying kinds (crashed/timed_out) say Hermes will retry and never expose worker/gateway vocabulary', async () => {- const m = await loadModule()- m.bindCompletionNotify(makeRest(() => 100) as never)-- await m.onKanbanEventsFrame('smoke', [ev(101, 'crashed'), ev(102, 'timed_out', { limit_seconds: 900 })])-- for (const call of hostMock.notify.mock.calls) {- const toast = call[0] as NotifyInput- expect(toast.title).toMatch(/Hermes will retry it automatically/)- expect(`${toast.title} ${toast.message}`).not.toMatch(/worker|gateway|backend/i)- }+ expect(lastNotify()).toMatchObject({ kind: 'error', detail: 't101' })})it('silent kinds (status/archived/unblocked) advance the cursor but never notify', async () => {@@ -514,10 +478,7 @@ describe('native OS door', () => {await m.onKanbanEventsFrame('smoke', [ev(101, 'blocked', { reason: 'needs input' })])expect(os.notify).toHaveBeenCalledTimes(1)- expect(os.notify.mock.calls[0][0]).toEqual({- title: 'Task blocked — needs your input',- body: 'needs input\nt101'- })+ expect(os.notify.mock.calls[0][0]).toMatchObject({ body: 'needs input\nt101' })})it('an os door that throws never breaks the toast or the frame result', async () => {@@ -586,6 +547,7 @@ describe('i18n routing', () => {await m.onKanbanEventsFrame('smoke', [ev(101, 'timed_out')])- expect(lastNotify().title).toBe('Task took too long — Hermes will retry it automatically')+ expect(lastNotify().title).toBeTruthy()+ expect(lastNotify().title).not.toMatch(/^notify\./)})})diff --git a/apps/desktop/src/plugins/kanban/model-override.test.tsx b/apps/desktop/src/plugins/kanban/model-override.test.tsxindex 70196a0af25..c898f5e0de6 100644--- a/apps/desktop/src/plugins/kanban/model-override.test.tsx+++ b/apps/desktop/src/plugins/kanban/model-override.test.tsx@@ -43,12 +43,6 @@ describe('override label', () => {expect(overrideLabel(EMPTY_OVERRIDE, 'Profile default')).toBe('Profile default')})- it('shows provider: model · Effort', () => {- expect(overrideLabel({ effort: 'high', model: 'gemini-3.1-pro', provider: 'google' }, 'x')).toBe(- 'google: gemini-3.1-pro · High'- )- })-it('a depth-only pin is still an override', () => {const depthOnly: TaskModelOverride = { effort: 'ultra', model: '', provider: '' }diff --git a/apps/desktop/src/sdk/host-state.test.ts b/apps/desktop/src/sdk/host-state.test.tsindex 2c2c2650c66..d8b9185feaf 100644--- a/apps/desktop/src/sdk/host-state.test.ts+++ b/apps/desktop/src/sdk/host-state.test.ts@@ -32,32 +32,6 @@ describe('host.state focused-session atoms', () => {return { host, states, session }}- it('exposes readonly atoms for the focused session (runtime id, stored id, usage)', async () => {- const { host } = await setup()-- for (const key of ['focusedSessionId', 'focusedStoredSessionId', 'focusedUsage'] as const) {- const store = host.state[key]- expect(store, key).toBeDefined()- expect(typeof store.get, key).toBe('function')- expect(typeof store.listen, key).toBe('function')- expect(typeof store.subscribe, key).toBe('function')- }- })-- it('mirrors the primary session while no tile is focused', async () => {- const { host, states } = await setup()-- expect(host.state.focusedSessionId.get()).toBe(states.$focusedRuntimeId.get())- expect(host.state.focusedStoredSessionId.get()).toBe(states.$focusedStoredSessionId.get())- })-- it('focusedUsage projects the focused session usage, null while unresolved', async () => {- const { host, states } = await setup()-- const focused = states.$focusedSessionState.get()- expect(host.state.focusedUsage.get()).toBe(focused?.usage ?? null)- })-it('exposes the registry source that owns the active gateway', async () => {const { host, session } = await setup()@@ -151,9 +125,6 @@ describe('host.state.focusedSessionProfile', () => {it('is a readonly atom that falls back to the gateway profile with no focused session', async () => {const { host, profile } = await setup()- expect(typeof host.state.focusedSessionProfile.get).toBe('function')- expect(typeof host.state.focusedSessionProfile.listen).toBe('function')-profile.$activeGatewayProfile.set('newsanalyst')expect(host.state.focusedSessionProfile.get()).toBe('newsanalyst')profile.$activeGatewayProfile.set('default')diff --git a/apps/desktop/src/sdk/index.test.ts b/apps/desktop/src/sdk/index.test.tsindex 32c02bcffbe..5ad9ca2924c 100644--- a/apps/desktop/src/sdk/index.test.ts+++ b/apps/desktop/src/sdk/index.test.ts@@ -244,36 +244,6 @@ describe('host workspace scope', () => {tree.removeTreePane('plugin-workspace:scope-test')})- it('registers plugin workspace chrome options', async () => {- const { registry } = await import('@/contrib/registry')-- const close = host.openWorkspace('scope-test', {- dock: { pane: 'workspace', pos: 'right' },- headerVeto: true,- render: () => null,- title: 'Scoped',- uncloseable: true- })-- expect(registry.getArea('panes').find(pane => pane.id === 'plugin-workspace:scope-test')).toMatchObject({- data: {- dock: { pane: 'workspace', pos: 'right' },- headerVeto: true,- uncloseable: true- }- })-- close()- })-- it('publishes the active workspace scope through one host seam', async () => {- const { $workspaceMode, $workspaceOwnerKey } = await import('@/components/pane-shell/workspace-scope')-- expect(host.setWorkspaceScope('bots', 'connection-b::default')).toBe(true)- expect($workspaceMode.get()).toBe('bots')- expect($workspaceOwnerKey.get()).toBe('connection-b::default')- })-it('uses the shared tab action for an exact Bot owner without moving Sessions', async () => {const tree = await import('@/components/pane-shell/tree/store')const { $workspaceNewSessionTarget } = await import('@/components/pane-shell/workspace-scope')diff --git a/apps/desktop/src/sdk/profile-routing.test.ts b/apps/desktop/src/sdk/profile-routing.test.tsindex b29f6a6ae27..b37adb742e9 100644--- a/apps/desktop/src/sdk/profile-routing.test.ts+++ b/apps/desktop/src/sdk/profile-routing.test.ts@@ -123,12 +123,7 @@ vi.mock('@/store/gateway', async () => {}})-const {- BOT_CHAT_SESSION_HYDRATION_TIMEOUT_MS,- DEFAULT_SESSION_HYDRATION_TIMEOUT_MS,- HYDRATION_SYNC_BADGE_TIMEOUT_MS,- host-} = await import('./index')+const { HYDRATION_SYNC_BADGE_TIMEOUT_MS, host } = await import('./index')const { openSession: openSessionCore } = await import('@/app/open-session')const { deleteProfile, hermesApi } = await import('@/hermes')@@ -139,7 +134,6 @@ const {openGatewayForProfile,requestGatewayForAgent,requestGatewayForProfile,- retainGatewayForAgent,retireLocalProfileGateways} = await import('@/store/gateway')@@ -370,83 +364,6 @@ describe('connection-aware plugin host APIs', () => {)})- it('survives a backend that settles at its own ceiling, and only fails past the client deadline', async () => {- // #93911 review follow-up (adversarial): the failure mode is not "no- // timeout" but "a timeout equal to the backend's ceiling". Model the- // documented worst case on a virtual clock — the turn lock wait, a full- // timed attempt, the policy-gated re-run, and then the settlement the- // handler still has to serialize and transport — and assert that a- // deadline set AT the ceiling loses that race while one with margin wins.- const LOCK_WAIT_MS = 120_000- const ATTEMPT_MS = 600_000- const ATTEMPTS = 2- const CEILING_MS = LOCK_WAIT_MS + ATTEMPT_MS * ATTEMPTS- const SETTLEMENT_MS = 1_000-- const route = {- connectionId: 'source-a',- mode: 'remote' as const,- profile: 'remote-worker',- targetProfile: 'backend-worker'- }-- // A gateway that answers only after the full ceiling plus settlement, and- // aborts at whatever deadline the caller handed down.- const backendAtItsLimit = async (- _connectionId: string,- _profile: string,- _method: string,- _params: Record<string, unknown>,- timeoutMs?: number- ) =>- new Promise((resolve, reject) => {- setTimeout(() => resolve({ reply: 'delivered', reason: 'ok' }), CEILING_MS + SETTLEMENT_MS)-- if (timeoutMs !== undefined) {- setTimeout(() => reject(new Error('request timed out')), timeoutMs)- }- })-- vi.useFakeTimers()-- try {- vi.mocked(requestGatewayForAgent).mockImplementation(backendAtItsLimit as never)-- // Deadline exactly at the ceiling: the typed settlement loses the race.- const atCeiling = host.requestProfile(route, 'bot_relay.deliver', {}, CEILING_MS)- const atCeilingSettled = expect(atCeiling).rejects.toThrow(/timed out/)- await vi.advanceTimersByTimeAsync(CEILING_MS + SETTLEMENT_MS)- await atCeilingSettled-- // Same backend, deadline with settlement margin: the answer gets through.- const withMargin = host.requestProfile(route, 'bot_relay.deliver', {}, CEILING_MS + SETTLEMENT_MS * 180)-- const withMarginSettled = expect(withMargin).resolves.toEqual({- reason: 'ok',- reply: 'delivered'- })-- await vi.advanceTimersByTimeAsync(CEILING_MS + SETTLEMENT_MS)- await withMarginSettled- } finally {- vi.useRealTimers()- vi.mocked(requestGatewayForAgent).mockReset()- }- })-- it('leaves callers that pass no timeout on the pool default', async () => {- const route = {- connectionId: 'source-a',- mode: 'remote' as const,- profile: 'remote-worker',- targetProfile: 'backend-worker'- }-- await host.requestProfile(route, 'profiles.list', {})-- expect(requestGatewayForAgent).toHaveBeenCalledWith('source-a', 'remote-worker', 'profiles.list', {})- })-it('fails closed when a descriptor omits connection or target profile identity', async () => {await expect(host.requestProfile(@@ -567,29 +484,6 @@ describe('connection-aware plugin host APIs', () => {)})- it('forwards the foreground tag on the profile-only overload without inventing a timeout', async () => {- await host.requestProfile('legacy-worker', 'session.list', {}, undefined, { spawnPriority: 'foreground' })-- expect(requestGatewayForProfile).toHaveBeenCalledWith('legacy-worker', 'session.list', {}, undefined, undefined, {- spawnPriority: 'foreground'- })- })-- it('forwards foreground intent when a plugin retains a profile route', async () => {- const route = {- connectionId: 'source-a',- mode: 'remote' as const,- profile: 'remote-worker',- targetProfile: 'backend-worker'- }-- await host.retainProfile(route, { spawnPriority: 'foreground' })-- expect(retainGatewayForAgent).toHaveBeenCalledWith('source-a', 'remote-worker', {- spawnPriority: 'foreground'- })- })-it('keeps the profile-only request overload as a legacy fallback', async () => {const result = await host.requestProfile('legacy-worker', 'profiles.list', { include_sessions: true })@@ -1060,65 +954,6 @@ describe('profile-aware plugin session opens', () => {expect($gatewaySwapTarget.get()).toBeNull()})- it('keeps the ordinary session hydration default at 20 seconds', async () => {- vi.useFakeTimers()-- try {- expect(DEFAULT_SESSION_HYDRATION_TIMEOUT_MS).toBe(20_000)- $activeGatewayProfile.set('hyoseob')-- const outcome = host- .openSession('slow-bot-chat', {- profile: 'hyoseob',- awaitHydration: true,- expectHistory: true- })- .then(- () => 'resolved',- error => String(error)- )-- await vi.advanceTimersByTimeAsync(19_999)- expect(setResumeExhaustedSessionId).not.toHaveBeenCalled()-- await vi.advanceTimersByTimeAsync(1)- expect(await outcome).toMatch(/timed out loading/i)- expect(setResumeExhaustedSessionId).toHaveBeenCalledWith('slow-bot-chat')- } finally {- vi.useRealTimers()- }- })-- it('honors the exported 60-second Bot Chat hydration override', async () => {- vi.useFakeTimers()-- try {- expect(BOT_CHAT_SESSION_HYDRATION_TIMEOUT_MS).toBe(60_000)- $activeGatewayProfile.set('hyoseob')-- const outcome = host- .openSession('slow-bot-chat', {- profile: 'hyoseob',- awaitHydration: true,- expectHistory: true,- hydrationTimeoutMs: BOT_CHAT_SESSION_HYDRATION_TIMEOUT_MS- })- .then(- () => 'resolved',- error => String(error)- )-- await vi.advanceTimersByTimeAsync(BOT_CHAT_SESSION_HYDRATION_TIMEOUT_MS - 1)- expect(setResumeExhaustedSessionId).not.toHaveBeenCalled()-- await vi.advanceTimersByTimeAsync(1)- expect(await outcome).toMatch(/timed out loading/i)- expect(setResumeExhaustedSessionId).toHaveBeenCalledWith('slow-bot-chat')- } finally {- vi.useRealTimers()- }- })-it('retries a Bot Chat hydration timeout once without ever arming the Retry surface (#89617)', async () => {$activeGatewayProfile.set('hyoseob')@@ -1237,23 +1072,6 @@ describe('profile-aware plugin session opens', () => {expect($gatewaySwapTarget.get()).toBeNull()})- it('keeps chrome API home on the previous profile when opening a Bot Chat', async () => {- $activeGatewayProfile.set('default')-- await host.openSession('bot-chat', {- profile: 'worker',- keepAllProfilesScope: true- })-- expect(ensureGatewayProfile).not.toHaveBeenCalled()- expect(openGatewayForProfile).toHaveBeenCalledWith(- 'worker',- expect.objectContaining({ spawnPriority: 'foreground' })- )- expect(setShowAllProfiles).toHaveBeenCalledWith(true)- expect($activeGatewayProfile.get()).toBe('default')- })-it('defaults keepAllProfilesScope to navigation instead of a workspace switch', async () => {$activeGatewayProfile.set('default')@@ -1328,37 +1146,6 @@ describe('profile-aware plugin session opens', () => {expect($gatewaySwapTarget.get()).toBeNull()})- it('names the phase in the wake log so a stuck dial is not read as a slow transcript', async () => {- const warn = vi.spyOn(console, 'warn').mockImplementation(() => undefined)-- vi.mocked(ensureGatewayProfile).mockImplementationOnce(() => new Promise<void>(() => undefined))-- await expect(- host.openSession('wedged-chat', {- profile: 'medicina',- intent: 'main',- awaitHydration: true,- expectHistory: true,- keepAllProfilesScope: false,- hydrationTimeoutMs: 60- })- ).rejects.toThrow('Timed out loading ')-- expect(warn).toHaveBeenCalledWith(- '[bot-wake] hydration timed out',- expect.objectContaining({ phase: 'activation' })- )-- const payload = warn.mock.calls.at(-1)?.[1] as { hydrationWaitMs: number; profileActivationMs: number }-- // The whole budget went to activation. Reporting it as hydration wait time- // would send a support bundle reader looking at transcript size.- expect(payload.profileActivationMs).toBeGreaterThan(0)- expect(payload.hydrationWaitMs).toBe(0)-- warn.mockRestore()- })-it('gives hydration its own full budget after a slow but successful activation', async () => {// Guards the choice of a SEPARATE budget per phase over one shared clock.// A cold profile backend can legitimately spend most of the budget getting@@ -1444,36 +1231,6 @@ describe('profile-aware plugin session opens', () => {expect(unhandled).toEqual([])})- it('leaves a plain open unbounded, because it has no budget and no Retry surface', async () => {- // Deliberate scope line, not an oversight: the activation deadline rides on- // the same contract as the hydration one. A caller that never passed- // awaitHydration gets exactly the behaviour it had before, since a- // rejection here would surface to code with nowhere to render it.- vi.mocked(ensureGatewayProfile).mockImplementationOnce(() => new Promise<void>(() => undefined))-- let settled = 'pending'-- void host- .openSession('plain-chat', {- profile: 'medicina',- intent: 'main',- keepAllProfilesScope: false,- hydrationTimeoutMs: 40- })- .then(- () => {- settled = 'resolved'- },- () => {- settled = 'rejected'- }- )-- await new Promise(resolve => setTimeout(resolve, 200))-- expect(settled).toBe('pending')- expect(setResumeExhaustedSessionId).not.toHaveBeenCalled()- })})describe('shared-remote hydration gate (#89843)', () => {diff --git a/apps/desktop/src/store/active-work.test.ts b/apps/desktop/src/store/active-work.test.tsindex fbff8373739..f9db940e685 100644--- a/apps/desktop/src/store/active-work.test.ts+++ b/apps/desktop/src/store/active-work.test.ts@@ -48,13 +48,4 @@ describe('active work bridge', () => {expect(setActiveWork).toHaveBeenLastCalledWith({ count: 0, titles: [] })})- it('does not re-send an unchanged summary', () => {- $sessions.set([session('s1', 'Fix login')])- publishSessionState('runtime-1', busy('s1', true))- setActiveWork.mockClear()-- $sessions.set([session('s1', 'Fix login'), session('s2', 'Something else')])-- expect(setActiveWork).not.toHaveBeenCalled()- })})diff --git a/apps/desktop/src/store/agent-notices.test.ts b/apps/desktop/src/store/agent-notices.test.tsindex 1333969aab4..a7d69657db5 100644--- a/apps/desktop/src/store/agent-notices.test.ts+++ b/apps/desktop/src/store/agent-notices.test.ts@@ -4,11 +4,9 @@ import {type AgentNoticePayload,clearAgentNotice,nativeNoticeInput,- noticeAccent,noticeToToast,showAgentNotice,splitMeta,- stripGlyph,usageFraction} from './agent-notices'import { $notifications, clearNotifications } from './notifications'@@ -115,16 +113,6 @@ test('splitMeta splits on the first space-middot-space only', () => {expect(splitMeta('a · b · c')).toEqual(['a', 'b · c'])})-test('stripGlyph removes only a single leading severity glyph', () => {- expect(stripGlyph('• Credits 50% used')).toBe('Credits 50% used')- expect(stripGlyph('⚠ warn')).toBe('warn')- expect(stripGlyph('✕ paused')).toBe('paused')- expect(stripGlyph('✓ ok')).toBe('ok')- // No leading glyph → unchanged; interior glyphs are preserved.- expect(stripGlyph('Credits 50% used')).toBe('Credits 50% used')- expect(stripGlyph('spent · $12.00 • top-up left')).toBe('spent · $12.00 • top-up left')-})-// ── noticeAccent: severity color ramp keyed off $used / $cap ─────────────────test('usageFraction derives $used / $cap from the notice text', () => {@@ -136,33 +124,6 @@ test('usageFraction derives $used / $cap from the notice text', () => {expect(usageFraction(undefined)).toBeNull()})-test('usage accent stays muted below 75%, then ramps orange → red', () => {- expect(noticeAccent(usage({ text: "• You've used $10.00 of your $20.00 cap" }))).toBeUndefined() // 50%- expect(noticeAccent(usage({ text: "• You've used $14.80 of your $20.00 cap" }))).toBeUndefined() // 74%- expect(noticeAccent(usage({ level: 'warn', text: "⚠ You've used $15.00 of your $20.00 cap" }))).toBe(- 'var(--ui-orange)'- ) // 75%- expect(noticeAccent(usage({ level: 'warn', text: "⚠ You've used $17.80 of your $20.00 cap" }))).toBe(- 'var(--ui-orange)'- ) // 89%- expect(noticeAccent(usage({ level: 'warn', text: "⚠ You've used $18.00 of your $20.00 cap" }))).toBe('var(--ui-red)') // 90%- expect(noticeAccent(usage({ level: 'warn', text: "⚠ You've used $20.00 of your $20.00 cap" }))).toBe('var(--ui-red)') // 100%-})--test('terminal credit states carry their own accent; others stay default', () => {- expect(noticeAccent({ key: 'credits.depleted', text: '✕ paused' })).toBe('var(--ui-red)')- expect(noticeAccent({ key: 'credits.restored', text: '✓ restored' })).toBe('var(--ui-green)')- expect(noticeAccent({ key: 'credits.grant_spent', text: '• Grant spent' })).toBeUndefined()- expect(noticeAccent(undefined)).toBeUndefined()-})--test('noticeToToast attaches the band accent to the toast', () => {- expect(noticeToToast(usage({ level: 'warn', text: "⚠ You've used $15.00 of your $20.00 cap" }))?.accentColor).toBe(- 'var(--ui-orange)'- )- expect(noticeToToast(usage({ text: "• You've used $10.00 of your $20.00 cap" }))?.accentColor).toBeUndefined()-})-// ── show / clear: rendered through the notifications store ────────────────────test('showAgentNotice renders a toast; empty text is a no-op', () => {diff --git a/apps/desktop/src/store/agent-plugins.test.ts b/apps/desktop/src/store/agent-plugins.test.tsindex 4db1d0095ac..91535133e03 100644--- a/apps/desktop/src/store/agent-plugins.test.ts+++ b/apps/desktop/src/store/agent-plugins.test.ts@@ -29,19 +29,8 @@ describe('normalizeAgentPluginRow', () => {})describe('isDesktopRelevantPlugin (#98861)', () => {- it('lists the manageable bundled lifecycle plugins and keeps every other built-in hidden', () => {- expect(isDesktopRelevantPlugin(row({ key: 'disk-cleanup', source: 'bundled' }))).toBe(true)- expect(isDesktopRelevantPlugin(row({ key: 'security-guidance', source: 'bundled' }))).toBe(true)-- for (const key of [- 'platforms/discord',- 'model-providers/openai',- 'web/firecrawl',- 'browser/agent-browser',- 'kanban'- ]) {- expect(isDesktopRelevantPlugin(row({ key, source: 'bundled' }))).toBe(false)- }+ it('hides ordinary built-ins but always lists user installs', () => {+ expect(isDesktopRelevantPlugin(row({ key: 'platforms/discord', source: 'bundled' }))).toBe(false)// User installs are unaffected either way.expect(isDesktopRelevantPlugin(row({ key: 'my-plugin', source: 'user' }))).toBe(true)diff --git a/apps/desktop/src/store/billing-block.test.ts b/apps/desktop/src/store/billing-block.test.tsindex 24d2f97402f..a7a90c24de2 100644--- a/apps/desktop/src/store/billing-block.test.ts+++ b/apps/desktop/src/store/billing-block.test.ts@@ -8,9 +8,7 @@ import { openExternalLink } from '@/lib/external-link'import {$billingBlock,$billingSettingsRequest,- billingCtaLabel,clearBillingBlock,- requestBillingSettings,runBillingRecovery,setBillingBlock} from './billing-block'@@ -33,12 +31,6 @@ beforeEach(() => {vi.clearAllMocks()})-test('setBillingBlock stores the block against its session', () => {- setBillingBlock('s1', makeBlock())- expect($billingBlock.get()?.sessionId).toBe('s1')- expect($billingBlock.get()?.block.provider).toBe('openai')-})-test('clearBillingBlock scoped to a session leaves a different session block intact', () => {setBillingBlock('s1', makeBlock())clearBillingBlock('s2')@@ -72,15 +64,3 @@ test('runBillingRecovery falls back to in-app settings when a provider has no URexpect(openExternalLink).not.toHaveBeenCalled()expect($billingSettingsRequest.get()).toBe(1)})--test('requestBillingSettings increments the intent counter', () => {- requestBillingSettings()- requestBillingSettings()- expect($billingSettingsRequest.get()).toBe(2)-})--test('billingCtaLabel picks the right verb per route', () => {- const copy = { addCredits: 'Add credits', openBilling: 'Open billing' }- expect(billingCtaLabel(makeBlock({ is_nous: true }), copy)).toBe('Open billing')- expect(billingCtaLabel(makeBlock({ is_nous: false }), copy)).toBe('Add credits')-})diff --git a/apps/desktop/src/store/bot-chat-scope.test.ts b/apps/desktop/src/store/bot-chat-scope.test.tsindex 9098c2a7427..18042a1c65f 100644--- a/apps/desktop/src/store/bot-chat-scope.test.ts+++ b/apps/desktop/src/store/bot-chat-scope.test.ts@@ -71,18 +71,4 @@ describe('the bot-chat set moves independently of session state', () => {expect(isBotChatSession('runtime-1')).toBe(true)})- it('does not re-notify when the same scope is recorded twice', () => {- setSessionTileWorkspaceScope('stored-1', botScope)-- const seen: number[] = []- const stop = $botChatSessionIds.listen(ids => seen.push(ids.size))-- try {- setSessionTileWorkspaceScope('stored-1', botScope)- } finally {- stop()- }-- expect(seen).toEqual([])- })})diff --git a/apps/desktop/src/store/clarify.test.ts b/apps/desktop/src/store/clarify.test.tsindex 76f9bc1cb1d..1ae3c759c0f 100644--- a/apps/desktop/src/store/clarify.test.ts+++ b/apps/desktop/src/store/clarify.test.ts@@ -161,14 +161,6 @@ describe('normalizeChoices', () => {expect(normalizeChoices(['a', long, ok])).toEqual(['a', ok])})- it('drops empty items and keeps valid ones', () => {- expect(normalizeChoices(['valid', ' ', '', 'also valid'])).toEqual(['valid', 'also valid'])- })-- it('returns empty array when nothing survives', () => {- expect(normalizeChoices(['', ' ', null, undefined])).toEqual([])- expect(normalizeChoices([])).toEqual([])- })})describe('normalizeQuestions', () => {diff --git a/apps/desktop/src/store/compaction.test.ts b/apps/desktop/src/store/compaction.test.tsindex 46aef98f91c..c851d4ea70c 100644--- a/apps/desktop/src/store/compaction.test.ts+++ b/apps/desktop/src/store/compaction.test.ts@@ -7,13 +7,6 @@ describe('compaction store', () => {afterEach(() => $compactingSessions.set({}))- it('tracks compaction per session independently', () => {- setSessionCompacting('session-a', true)- setSessionCompacting('session-b', true)-- expect($compactingSessions.get()).toEqual({ 'session-a': true, 'session-b': true })- })-it('scopes the view to the session asked for, not whichever is active', () => {setSessionCompacting('session-a', true)@@ -30,12 +23,4 @@ describe('compaction store', () => {expect($compactingSessions.get()).toEqual({ 'session-b': true })})- it('is a no-op when clearing an unknown session', () => {- setSessionCompacting('session-a', true)- const before = $compactingSessions.get()-- setSessionCompacting('session-missing', false)-- expect($compactingSessions.get()).toBe(before)- })})diff --git a/apps/desktop/src/store/composer-input-history.test.ts b/apps/desktop/src/store/composer-input-history.test.tsindex 29322ea3663..bcb4a027ed0 100644--- a/apps/desktop/src/store/composer-input-history.test.ts+++ b/apps/desktop/src/store/composer-input-history.test.ts@@ -106,18 +106,6 @@ describe('per-session isolation', () => {})})-describe('resetBrowseState', () => {- it('clears cursor and draft snapshot', () => {- browseBackward(SESSION_A, 'draft', HISTORY)- resetBrowseState(SESSION_A)-- const s = $perSessionBrowse.get()[SESSION_A]!-- expect(s.cursor).toBe(-1)- expect(s.draftSnapshot).toBe('')- })-})-describe('session switch behavior', () => {it('resets the previous session cursor and lets the new session derive its own ring', () => {// Session A: user browsed into the pastdiff --git a/apps/desktop/src/store/composer-popout-preference.test.ts b/apps/desktop/src/store/composer-popout-preference.test.tsindex fe6cdd6d300..466eff05937 100644--- a/apps/desktop/src/store/composer-popout-preference.test.ts+++ b/apps/desktop/src/store/composer-popout-preference.test.ts@@ -48,9 +48,4 @@ describe('composer pop-out preference', () => {})})- it('keeps pop-out gestures enabled by default', async () => {- const store = await loadStore()-- expect(store.$composerPopoutGesturesEnabled.get()).toBe(true)- })})diff --git a/apps/desktop/src/store/composer-queue.test.ts b/apps/desktop/src/store/composer-queue.test.tsindex f5ebd9124d0..9d5689db886 100644--- a/apps/desktop/src/store/composer-queue.test.ts+++ b/apps/desktop/src/store/composer-queue.test.ts@@ -152,18 +152,6 @@ describe('migrateQueuedPrompts', () => {expect(migrateQueuedPrompts('rt-x', 'rt-x')).toBe(false)})- it('must not be used across sessions without a same-lineage guard (documents the leak)', () => {- // ChatView used to call migrateQueuedPrompts(selectedA, routeKeyB) during the- // route-ahead/store-lag window of a session switch. That re-homes A's queue- // onto B so the idle ChatBar on B auto-drains it into the wrong conversation.- // The guard lives in shouldMigrateComposerScope — this test locks the- // underlying hazard so a future caller cannot treat migrate as free.- enqueueQueuedPrompt('root-a', { attachments: [], text: 'belongs to A' })-- expect(migrateQueuedPrompts('root-a', 'root-b')).toBe(true)- expect(getQueuedPrompts('root-a')).toEqual([])- expect(getQueuedPrompts('root-b').map(e => e.text)).toEqual(['belongs to A'])- })})describe('shouldAutoDrain', () => {@@ -171,12 +159,6 @@ describe('shouldAutoDrain', () => {expect(shouldAutoDrain({ isBusy: false, queueLength: 1 })).toBe(true)})- it('drains on mount/reconnect with no observed busy edge', () => {- // The whole point of dropping the edge: a remount resets the busy ref, so an- // edge-gated drain would strand the entry. Idle + non-empty must still fire.- expect(shouldAutoDrain({ isBusy: false, queueLength: 2 })).toBe(true)- })-it('does not drain mid-turn', () => {expect(shouldAutoDrain({ isBusy: true, queueLength: 1 })).toBe(false)})@@ -191,9 +173,6 @@ describe('shouldAutoDrain', () => {expect(shouldAutoDrain({ isBusy: false, parked: true, queueLength: 1 })).toBe(false)})- it('drains again once the park is lifted', () => {- expect(shouldAutoDrain({ isBusy: false, parked: false, queueLength: 1 })).toBe(true)- })})describe('parked queue sessions', () => {diff --git a/apps/desktop/src/store/composer-status.test.ts b/apps/desktop/src/store/composer-status.test.tsindex 547d269c26b..4548dcd07db 100644--- a/apps/desktop/src/store/composer-status.test.ts+++ b/apps/desktop/src/store/composer-status.test.ts@@ -71,26 +71,6 @@ describe('reconcileBackgroundProcesses', () => {expect(items().map(i => i.id)).toEqual(['a', 'b'])})- it('preserves object identity for unchanged rows (memo stability)', () => {- reconcileBackgroundProcesses(SID, [running('a'), running('b')])- const [a1] = items()-- reconcileBackgroundProcesses(SID, [running('a'), exited('b', 0)])- const [a2, b2] = items()-- expect(a2).toBe(a1)- expect(b2!.state).toBe('done')- })-- it('is a no-op store write when nothing changed', () => {- reconcileBackgroundProcesses(SID, [running('a')])- const before = $backgroundStatusBySession.get()-- reconcileBackgroundProcesses(SID, [running('a')])-- expect($backgroundStatusBySession.get()).toBe(before)- })-it('never resurrects a dismissed process while the registry still reports it', () => {reconcileBackgroundProcesses(SID, [exited('a', 0), running('b')])dismissBackgroundProcess(SID, 'a')diff --git a/apps/desktop/src/store/composer-suggestions.test.ts b/apps/desktop/src/store/composer-suggestions.test.tsindex e76c56a2f48..89258782cbb 100644--- a/apps/desktop/src/store/composer-suggestions.test.ts+++ b/apps/desktop/src/store/composer-suggestions.test.ts@@ -34,14 +34,6 @@ describe('composer suggestion bus', () => {expect(pillsFor('s1')).toEqual([])})- it('caps merged suggestions at two', () => {- offerSuggestions('s3', 'test', [suggestion('a'), suggestion('b'), suggestion('c')])-- expect(pillsFor('s3')).toHaveLength(2)-- offerSuggestions('s3', 'test', [])- })-it('dedupes by provider-namespaced key across providers', () => {offerSuggestions('s4', 'p1', [suggestion('same', 'p1')])offerSuggestions('s4', 'p2', [suggestion('same', 'p2')])@@ -112,15 +104,4 @@ describe('composer suggestion bus', () => {offerSuggestions('s8', 'test', [])})- it('keeps the array reference when nothing the pill paints changed', () => {- offerSuggestions('s9', 'test', [suggestion('linear')])-- const first = $composerSuggestionsBySession.get().s9-- offerSuggestions('s9', 'test', [suggestion('linear')])-- expect($composerSuggestionsBySession.get().s9).toBe(first)-- offerSuggestions('s9', 'test', [])- })})diff --git a/apps/desktop/src/store/connection-request.test.ts b/apps/desktop/src/store/connection-request.test.tsindex 8c7ea94f843..e0d3d418d7b 100644--- a/apps/desktop/src/store/connection-request.test.ts+++ b/apps/desktop/src/store/connection-request.test.ts@@ -6,7 +6,6 @@ import {applyOperationStatus,clearConnectionRequest,type ConnectionRequest,- continueConnectionRequest,hasConnectionRequest,normalizeConnectionRequest,respondToConnectionRequest,@@ -170,17 +169,6 @@ describe('connection-request store', () => {expect(applyConnectionUpdate(settled, frame({ gmail: 'connected' }))).toBe(settled)})- it('updateConnectionRequest writes the store only when something changed', () => {- setConnectionRequest(request('a'))- const before = $connectionRequests.get().a-- updateConnectionRequest('a', frame({}, { op_id: 'op-9' }))- expect($connectionRequests.get().a).toBe(before)-- updateConnectionRequest('a', frame({ notion: 'skipped' }, { actor: 'user', target: 'notion', to: 'skipped' }))- expect($connectionRequests.get().a.targets[1].state).toBe('skipped')- })-it('keeps requests from concurrent sessions independent', () => {setConnectionRequest(request('a', 'op-a'))setConnectionRequest(request('b', 'op-b'))@@ -227,13 +215,4 @@ describe('connection-request store', () => {expect(rpc.mock.calls[0][1].result).toEqual({ settled_by: 'continue' })})- it('continue is a one-field payload', async () => {- const rpc = vi.fn().mockResolvedValue({ status: 'ok', settled: true })- setOwnerGateway(rpc)- const req = request('a')- setConnectionRequest(req)-- await continueConnectionRequest(req)- expect(rpc.mock.calls[0][1].result).toEqual({ settled_by: 'continue' })- })})diff --git a/apps/desktop/src/store/free-tier-setup-failure.test.ts b/apps/desktop/src/store/free-tier-setup-failure.test.tsindex b30ec8b5af6..ed0f0408d37 100644--- a/apps/desktop/src/store/free-tier-setup-failure.test.ts+++ b/apps/desktop/src/store/free-tier-setup-failure.test.ts@@ -4,7 +4,6 @@ import {$freeTierStatus,type FreeTierRequester,freeTierSetupFailure,- friendlyWait,provisionFreeTier} from '@/store/free-tier'import type { FreeTierStatus } from '@/types/hermes'@@ -50,12 +49,7 @@ describe('freeTierSetupFailure', () => {it.each([['anon_unreachable', 'retry'],- ['anon_server_error', 'retry'],['anon_gate_closed', 'sign_in'],- ['anon_gate_paused', 'sign_in'],- ['anon_rate_limited', 'sign_in'],- ['anon_pow_required', 'sign_in'],- ['anon_account_locked', 'sign_in'],['something_newer', 'sign_in']])('%s opens the %s door', (code, door) => {// A sign-in goes through the same service that just refused: only offer@@ -68,21 +62,6 @@ describe('freeTierSetupFailure', () => {})})-describe('friendlyWait', () => {- it.each([- [0, 'a few seconds'],- [15, 'a few seconds'],- [16, 'about a minute'],- [89, 'about a minute'],- [300, 'about 5 minutes'],- [3600, 'about an hour'],- [7200, 'about 2 hours'],- [Number.NaN, 'a few seconds']- ])('%s seconds reads as "%s"', (seconds, expected) => {- expect(friendlyWait(seconds)).toBe(expected)- })-})-describe('provisionFreeTier', () => {it('asks the backend to try again, then re-reads the verdict', async () => {const calls: string[] = []diff --git a/apps/desktop/src/store/gateway-connection-lifecycle.test.ts b/apps/desktop/src/store/gateway-connection-lifecycle.test.tsindex 1c203c56e86..92a7edae9a1 100644--- a/apps/desktop/src/store/gateway-connection-lifecycle.test.ts+++ b/apps/desktop/src/store/gateway-connection-lifecycle.test.ts@@ -957,21 +957,6 @@ describe('cooperative pool retirement (supersedes #104871)', () => {expect(getConnectionFor.mock.calls.length).toBe(before + 2)})- it('touch pings carry the scope turn lease so main can skip leased residents early', async () => {- const getConnectionFor = vi.fn(async ({ connectionId, profile }: { connectionId: string; profile: string }) =>- descriptorFor(connectionId, profile)- )-- const touchBackend = vi.fn(async () => ({ ok: true }))-- installDesktop({ getConnectionFor, touchBackend })-- await ensureGatewayForAgent('homelab', 'bot-a')- touchBackend.mockClear()-- touchSecondaryGateways()- expect(touchBackend).toHaveBeenCalledWith('conn:homelab::bot-a', { activeTurn: false })- })})describe('rejected secondary authentication', () => {diff --git a/apps/desktop/src/store/gateway-profile-request.test.ts b/apps/desktop/src/store/gateway-profile-request.test.tsindex 89de19cc808..5665bf8b320 100644--- a/apps/desktop/src/store/gateway-profile-request.test.ts+++ b/apps/desktop/src/store/gateway-profile-request.test.ts@@ -547,19 +547,6 @@ describe('retainGatewayForAgent (#93602)', () => {expect(secondaryGateways[1].close).toHaveBeenCalledOnce()})- it('without the retain, the leased socket closes after each request (the #93602 race)', async () => {- const primary = makePrimary()- setPrimaryGateway(primary as never, 'default')- installRegistryDesktop()- await ensureGatewayForProfile('default')-- await requestGatewayForAgent('mini', 'helper', 'session.create', { title: 'g' })-- // Refcount hit 0 → disposed: this is the socket close that reaps the- // runtime session server-side and makes the later prompt.submit 4001.- expect(secondaryGateways[0].close).toHaveBeenCalledOnce()- })-it('plain-profile retain leases the pooled profile socket and releases it', async () => {const primary = makePrimary()setPrimaryGateway(primary as never, 'default')diff --git a/apps/desktop/src/store/gateway-reconnect.test.ts b/apps/desktop/src/store/gateway-reconnect.test.tsindex e1a8e09d2d8..4e3bba55633 100644--- a/apps/desktop/src/store/gateway-reconnect.test.ts+++ b/apps/desktop/src/store/gateway-reconnect.test.ts@@ -54,6 +54,6 @@ describe('gateway reconnect controller', () => {})it('rejects when the gateway boot owner is not mounted', async () => {- await expect(reconnectGateway()).rejects.toThrow('Gateway reconnect is unavailable')+ await expect(reconnectGateway()).rejects.toThrow()})})diff --git a/apps/desktop/src/store/gateway-relay-retention.test.ts b/apps/desktop/src/store/gateway-relay-retention.test.tsindex 132d34003e0..87722b57ff5 100644--- a/apps/desktop/src/store/gateway-relay-retention.test.ts+++ b/apps/desktop/src/store/gateway-relay-retention.test.ts@@ -81,17 +81,6 @@ afterEach(() => {})describe('bot-relay gateway retention (#93594)', () => {- it('without retention every drain tick dials a fresh socket (the churn this fix removes)', async () => {- // Baseline: three request-leased RPCs against an otherwise-unheld route.- for (let tick = 0; tick < 3; tick += 1) {- await requestGatewayForAgent('homelab', 'research', 'bot_relay.outbox.drain', {})- }-- // Refcount hits 0 after each call → dispose → next tick constructs anew.- expect(gatewayMocks.constructions).toBe(3)- expect(gatewayMocks.connect).toHaveBeenCalledTimes(3)- })-it('a retained relay route holds ONE persistent socket across multiple drain ticks', async () => {const release = retainGatewayForRelay('homelab', 'research')diff --git a/apps/desktop/src/store/gateway-spawn-priority.test.ts b/apps/desktop/src/store/gateway-spawn-priority.test.tsindex 20177eafbcd..d35063eb50f 100644--- a/apps/desktop/src/store/gateway-spawn-priority.test.ts+++ b/apps/desktop/src/store/gateway-spawn-priority.test.ts@@ -30,10 +30,7 @@ const {configureGatewayRegistry,ensureGatewayForAgent,ensureGatewayForProfile,- openGatewayForAgent,- openGatewayForProfile,requestGatewayForAgent,- retainGatewayForAgent,setPrimaryGateway} = await import('./gateway')@@ -83,26 +80,6 @@ describe('user opens dial main as foreground from the first IPC (#102281)', () =expect(seen.every(priority => priority === 'foreground')).toBe(true)})- it('openGatewayForProfile without a priority never tags a dial as foreground', async () => {- const desktop = installDesktop()-- await openGatewayForProfile('research')-- const seen = priorities(desktop.getConnection, args => (args[1] as { priority?: string } | undefined)?.priority)- expect(seen.length).toBeGreaterThanOrEqual(1)- expect(seen.every(priority => priority === undefined)).toBe(true)- })-- it('openGatewayForAgent forwards spawnPriority to every registry dial', async () => {- const desktop = installDesktop()-- await openGatewayForAgent('homelab', 'research', { spawnPriority: 'foreground' })-- const seen = priorities(desktop.getConnectionFor, args => (args[0] as { priority?: string }).priority)- expect(seen.length).toBeGreaterThanOrEqual(1)- expect(seen.every(priority => priority === 'foreground')).toBe(true)- })-it('ensureGatewayForAgent is always a foreground open', async () => {const desktop = installDesktop()@@ -114,7 +91,7 @@ describe('user opens dial main as foreground from the first IPC (#102281)', () =})})-// requestGatewayForAgent / retainGatewayForAgent are the RPC-lease pair that+// requestGatewayForAgent (and retainGatewayForAgent) are the RPC-lease pair that// createBackendSessionForSend, openNewSessionTile and the plugin SDK's// host.requestProfile dial through. They are not activation doors, so they// never hardcode 'foreground'; a user gesture (first send, "New session", a@@ -146,39 +123,4 @@ describe('RPC-lease dials forward an explicit spawnPriority (#105104)', () => {expect(seen.length).toBeGreaterThanOrEqual(1)expect(seen.every(priority => priority === undefined)).toBe(true)})-- it('retainGatewayForAgent tags the lease dial when the caller says foreground', async () => {- const desktop = installDesktop()-- const release = await retainGatewayForAgent('homelab', 'research', { spawnPriority: 'foreground' })- release()-- const seen = registryPriorities(desktop)- expect(seen.length).toBeGreaterThanOrEqual(1)- expect(seen.every(priority => priority === 'foreground')).toBe(true)- })-- it('retainGatewayForAgent without options never tags a registry dial', async () => {- const desktop = installDesktop()-- const release = await retainGatewayForAgent('homelab', 'research')- release()-- const seen = registryPriorities(desktop)- expect(seen.length).toBeGreaterThanOrEqual(1)- expect(seen.every(priority => priority === undefined)).toBe(true)- })-- it('retainGatewayForAgent on the plain-profile route (null connection) still dials foreground', async () => {- // Neither #105390 nor #110354 covered this branch: the v1 profile resolver- // goes through gatewayForProfile, not the registry secondary.- const desktop = installDesktop()-- const release = await retainGatewayForAgent(null, 'research', { spawnPriority: 'foreground' })- release()-- const seen = priorities(desktop.getConnection, args => (args[1] as { priority?: string } | undefined)?.priority)- expect(seen.length).toBeGreaterThanOrEqual(1)- expect(seen.every(priority => priority === 'foreground')).toBe(true)- })})diff --git a/apps/desktop/src/store/gateway.test.ts b/apps/desktop/src/store/gateway.test.tsindex 7bc702403fa..34b42a520df 100644--- a/apps/desktop/src/store/gateway.test.ts+++ b/apps/desktop/src/store/gateway.test.ts@@ -188,23 +188,6 @@ describe('ensureGatewayForProfile — secondary connect failure surfaces (#81094await vi.runAllTimersAsync()expect(gatewayMocks.instances[0].connectionState).toBe('open')})-- it('activates the secondary when connect succeeds', async () => {- const getConnection = vi.fn(async ({ profile }: { profile: string }) => ({- authMode: 'token',- baseUrl: `https://${profile}.invalid`,- mode: 'local',- profile,- token: 'fake-test-token',- wsUrl: `wss://${profile}.invalid/ws`- }))-- installDesktop({ getConnection })-- await ensureGatewayForProfile('work')-- expect(activeGateway()).toBe(gatewayMocks.instances[0])- })})describe('connection-scoped dial failure identity (#95421)', () => {@@ -230,13 +213,6 @@ describe('connection-scoped dial failure identity (#95421)', () => {const messages = errorSpy.mock.calls.map(([message]) => String(message))expect(messages).toHaveLength(2)- expect(messages).toEqual(- expect.arrayContaining([- expect.stringContaining('scope="conn:work::default"'),- expect.stringContaining('scope="conn:homelab::default"')- ])- )- expect(messages.every(message => message.includes('profile="default"'))).toBe(true)expect(new Set(messages).size).toBe(2)expect(messages.join(' ')).not.toContain('wss://')diff --git a/apps/desktop/src/store/hub-actions.blocked.test.ts b/apps/desktop/src/store/hub-actions.blocked.test.tsindex 3b8ddac590e..eb92bfefef6 100644--- a/apps/desktop/src/store/hub-actions.blocked.test.ts+++ b/apps/desktop/src/store/hub-actions.blocked.test.ts@@ -70,17 +70,6 @@ test('the legacy "Installation blocked:" tail still parses and toasts a plain ex)const toast = $notifications.get()[0]- expect(toast?.title).toMatch(/Couldn't install skill/)- expect(toast?.message).toMatch(/2 items to review/)- expect(toast?.message).toMatch(/unverified source/)expect(toast?.message).not.toMatch(/--force/)- expect(toast?.action?.label).toBe('View scan')expect(toast?.detail).toContain('Installation blocked')})--test('a non-block failure keeps the generic summary', () => {- notifyHubActionFailed(new Error('network down'), 'Skill action failed')-- expect($notifications.get()[0]?.title).toBe('Skill action failed')- expect($notifications.get()[0]?.message).toBe('network down')-})diff --git a/apps/desktop/src/store/hud.test.ts b/apps/desktop/src/store/hud.test.tsindex a2ed7a66633..d5ca11c33bb 100644--- a/apps/desktop/src/store/hud.test.ts+++ b/apps/desktop/src/store/hud.test.ts@@ -4,17 +4,16 @@ import { $activeGatewayProfile } from '@/store/profile'import { $sessions } from '@/store/session'import type { SessionInfo } from '@/types/hermes'-import { $hudActive, $hudSession, openHud, resetHudLayout } from './hud'+import { $hudActive, $hudSession, openHud } from './hud'const desktopWindow = window as unknown as { hermesDesktop?: Window['hermesDesktop'] }const initialHermesDesktop = desktopWindow.hermesDesktopconst open = vi.fn().mockResolvedValue({ ok: true })-const resetLayout = vi.fn().mockResolvedValue({ ok: true })function installBridge() {desktopWindow.hermesDesktop = {- hud: { open, resetLayout }+ hud: { open }} as unknown as Window['hermesDesktop']}@@ -24,7 +23,6 @@ function session(overrides: Partial<SessionInfo>): SessionInfo {beforeEach(() => {open.mockClear()- resetLayout.mockClear()installBridge()$hudActive.set(false)$hudSession.set(null)@@ -40,14 +38,6 @@ afterEach(() => {}})-describe('resetHudLayout', () => {- it('uses the native HUD recovery capability', () => {- resetHudLayout()-- expect(resetLayout).toHaveBeenCalledOnce()- })-})-describe('openHud profile targeting (#82285)', () => {it('carries the session-stamped profile when the target belongs to another profile', () => {$sessions.set([session({ id: 'abc', profile: 'work' })])@@ -75,12 +65,6 @@ describe('openHud profile targeting (#82285)', () => {expect(open).toHaveBeenCalledWith({ sessionId: null, profile: 'research' })})- it('normalizes to default for single-profile users', () => {- openHud()-- expect(open).toHaveBeenCalledWith({ sessionId: null, profile: 'default' })- })-it('uses the active profile when the target session is not in the cache', () => {$activeGatewayProfile.set('work')diff --git a/apps/desktop/src/store/layout-dismissed-projects.test.ts b/apps/desktop/src/store/layout-dismissed-projects.test.tsindex 9aae9cd3eac..1bfb210f7ad 100644--- a/apps/desktop/src/store/layout-dismissed-projects.test.ts+++ b/apps/desktop/src/store/layout-dismissed-projects.test.ts@@ -21,9 +21,4 @@ describe('filterVisibleProjects', () => {const tree = [explicit('p_real'), auto('/www/gone')]expect(filterVisibleProjects(tree, ['p_real', '/www/gone']).map(p => p.id)).toEqual(['p_real'])})-- it('passes the list through when nothing is dismissed', () => {- const tree = [auto('/www/a'), explicit('p_b')]- expect(filterVisibleProjects(tree, [])).toBe(tree)- })})diff --git a/apps/desktop/src/store/layout-pinned-order.test.ts b/apps/desktop/src/store/layout-pinned-order.test.tsindex 219c73d2f6c..29b96f31d07 100644--- a/apps/desktop/src/store/layout-pinned-order.test.ts+++ b/apps/desktop/src/store/layout-pinned-order.test.ts@@ -38,12 +38,4 @@ describe('setPinnedSessionOrder', () => {expect($pinnedSessionIds.get()).toBe(before)})-- it('keeps the same array reference when the order is unchanged', () => {- const before = ['a', 'b']- $pinnedSessionIds.set(before)- setPinnedSessionOrder(['a', 'b'])-- expect($pinnedSessionIds.get()).toBe(before)- })})diff --git a/apps/desktop/src/store/layout-sidebar-view.test.ts b/apps/desktop/src/store/layout-sidebar-view.test.tsindex 2a3c7f941ff..29f27470123 100644--- a/apps/desktop/src/store/layout-sidebar-view.test.ts+++ b/apps/desktop/src/store/layout-sidebar-view.test.ts@@ -41,12 +41,6 @@ describe('the sidebar as it ships', () => {expect(window.localStorage.getItem('hermes.desktop.sidebarShowAllSessions')).toBe('false')})- it('groups by date, sorts by recency, and pins the timestamp and preview', () => {- expect($sidebarGrouping.get()).toBe('date')- expect($sidebarOrdering.get()).toBe('updated')- expect($sidebarRowMeta.get()).toEqual(['preview', 'updated'])- })-it('offers no reset until something actually moves off the defaults', () => {expect($sidebarViewCustomized.get()).toBe(false)diff --git a/apps/desktop/src/store/local-models-flag.test.ts b/apps/desktop/src/store/local-models-flag.test.tsdeleted file mode 100644index 36bbae2bacc..00000000000--- a/apps/desktop/src/store/local-models-flag.test.ts+++ /dev/null@@ -1,40 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'--describe('$localModelsEnabled', () => {- beforeEach(() => {- vi.resetModules()- })-- it('reads true when the preload bridge reports the --local launch flag', async () => {- Object.defineProperty(window, 'hermesDesktop', {- configurable: true,- value: { localModelsEnabled: true }- })-- const { $localModelsEnabled } = await import('./local-models-flag')-- expect($localModelsEnabled.get()).toBe(true)- })-- it('defaults to false when the bridge omits the flag (older preload, web)', async () => {- Object.defineProperty(window, 'hermesDesktop', {- configurable: true,- value: {}- })-- const { $localModelsEnabled } = await import('./local-models-flag')-- expect($localModelsEnabled.get()).toBe(false)- })-- it('defaults to false with no bridge at all', async () => {- Object.defineProperty(window, 'hermesDesktop', {- configurable: true,- value: undefined- })-- const { $localModelsEnabled } = await import('./local-models-flag')-- expect($localModelsEnabled.get()).toBe(false)- })-})diff --git a/apps/desktop/src/store/managed-updates.test.ts b/apps/desktop/src/store/managed-updates.test.tsindex 7a1ba322dc7..58a24e8c9f9 100644--- a/apps/desktop/src/store/managed-updates.test.ts+++ b/apps/desktop/src/store/managed-updates.test.ts@@ -40,17 +40,6 @@ beforeEach(() => {}})-describe('managedUpdatesSupported', () => {- it('is false on an older Electron main without the transactional bridge', () => {- ;(window as { hermesDesktop?: unknown }).hermesDesktop = { connections: {} }- expect(managedUpdatesSupported()).toBe(false)- })-- it('is true when the preload bridge exposes updateManaged', () => {- expect(managedUpdatesSupported()).toBe(true)- })-})-describe('runManagedUpdate', () => {it('routes through the managed drain/update/restore bridge and lands on updated with the receipt', async () => {const pending = runManagedUpdate('linux-ssh')diff --git a/apps/desktop/src/store/mcp-health.test.ts b/apps/desktop/src/store/mcp-health.test.tsindex 2326f5c10a0..862591fe6fe 100644--- a/apps/desktop/src/store/mcp-health.test.ts+++ b/apps/desktop/src/store/mcp-health.test.ts@@ -133,8 +133,6 @@ it('shows the toast with Sign in + Disable, then stays quiet for a day and re-nuawait flush()expect(mocks.notify).toHaveBeenCalledTimes(1)const toast = mocks.notify.mock.calls[0][0]- expect(toast.action.label).toBe('notifications.mcp.signIn')- expect(toast.secondaryAction.label).toBe('notifications.mcp.disable')// Same day, still broken: a reconnect sweep must not re-pop.clock += 60 * 60 * 1000diff --git a/apps/desktop/src/store/model-presets.test.ts b/apps/desktop/src/store/model-presets.test.tsindex ef37cecc07d..eada8b0f62f 100644--- a/apps/desktop/src/store/model-presets.test.ts+++ b/apps/desktop/src/store/model-presets.test.ts@@ -1,6 +1,6 @@import { beforeEach, describe, expect, it } from 'vitest'-import { $modelPresets, applyModelPreset, getModelPreset, modelPresetKey, setModelPreset } from './model-presets'+import { $modelPresets, applyModelPreset, getModelPreset, setModelPreset } from './model-presets'import { $currentFastMode, $currentReasoningEffort, setCurrentFastMode, setCurrentReasoningEffort } from './session'describe('model presets', () => {@@ -21,10 +21,6 @@ describe('model presets', () => {expect(getModelPreset('x', 'y')).toEqual({})})- it('keys by provider::model', () => {- expect(modelPresetKey('openai', 'gpt-5.5')).toBe('openai::gpt-5.5')- })-it('pushes only the provided dimensions to the gateway', async () => {const calls: { method: string; params?: Record<string, unknown> }[] = []diff --git a/apps/desktop/src/store/model-visibility.test.ts b/apps/desktop/src/store/model-visibility.test.tsindex 76dba69f05e..2247d676bd9 100644--- a/apps/desktop/src/store/model-visibility.test.ts+++ b/apps/desktop/src/store/model-visibility.test.ts@@ -85,24 +85,6 @@ describe('model visibility', () => {expect(visible.has(modelVisibilityKey('ollama', 'qwen3:latest'))).toBe(true)})- it('restores model when toggling on after hiding all', () => {- // Simulates: user hid all "nous" models, then toggles one back on.- const stored = new Set([emptyProviderSentinelKey('nous'), modelVisibilityKey('ollama', 'qwen3:latest')])-- // After toggle: sentinel removed, one model added.- const afterToggle = new Set(stored)- afterToggle.delete(emptyProviderSentinelKey('nous'))- afterToggle.add(modelVisibilityKey('nous', 'hermes-3-llama-3.1-70b'))-- const visible = effectiveVisibleKeys(afterToggle, [- provider('nous', ['hermes-3-llama-3.1-70b', 'hermes-3-llama-3.1-8b']),- provider('ollama', ['qwen3:latest'])- ])-- expect(visible.has(modelVisibilityKey('nous', 'hermes-3-llama-3.1-70b'))).toBe(true)- expect(visible.has(modelVisibilityKey('nous', 'hermes-3-llama-3.1-8b'))).toBe(false)- })-it('folds a date-pinned snapshot into its rolling alias when present', () => {const families = collapseModelFamilies(['claude-opus-4-5', 'claude-opus-4-5-20251101'])diff --git a/apps/desktop/src/store/native-notifications.test.ts b/apps/desktop/src/store/native-notifications.test.tsindex 11d14921bc3..6be0342d3ed 100644--- a/apps/desktop/src/store/native-notifications.test.ts+++ b/apps/desktop/src/store/native-notifications.test.ts@@ -1,7 +1,6 @@import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { createClientSessionState } from '@/lib/chat-runtime'-import type { SessionInfo } from '@/types/hermes'import { $gateway } from './gateway'import {@@ -19,7 +18,7 @@ import {import { __resetNativeNotifyBaselineForTests, markNativeNotifyBaseline } from './notify-baseline'import { $approvalRequest, clearAllPrompts, setApprovalRequest } from './prompts'import { markSessionGone, resetBackgroundPollingGuard } from './runtime-gone'-import { $activeSessionId, setActiveSessionId, setSessions } from './session'+import { setActiveSessionId } from './session'import { dropSessionState, publishSessionState } from './session-states'const desktopWindow = window as unknown as { hermesDesktop?: Window['hermesDesktop'] }@@ -159,34 +158,6 @@ describe('dispatchNativeNotification preferences', () => {dispatchNativeNotification({ kind: 'turnError', sessionId, title: 'boom' })expect(notify).toHaveBeenCalledTimes(1)})-- it('forwards kind and sessionId to the bridge', () => {- setActiveSessionId('abc')- dispatchNativeNotification({ body: 'hi', kind: 'turnError', sessionId: 'abc', title: 'boom' })- expect(notify).toHaveBeenCalledWith(- expect.objectContaining({ body: 'hi', kind: 'turnError', sessionId: 'abc', title: 'boom' })- )- })-})--describe('dispatchNativeNotification session context', () => {- it('names the session on blocking-prompt titles only, falling back to the id tail without a row', () => {- setSessions([{ id: 'named-chat', title: 'Migrate the schema' } as SessionInfo])-- try {- dispatchNativeNotification({ kind: 'input', sessionId: 'named-chat', title: 'Input needed' })- expect(notify).toHaveBeenCalledWith(expect.objectContaining({ title: 'Input needed — Migrate the schema' }))-- dispatchNativeNotification({ kind: 'approval', sessionId: 'abcdef123456', title: 'Approval needed' })- expect(notify).toHaveBeenCalledWith(expect.objectContaining({ title: 'Approval needed — #123456' }))-- setActiveSessionId('named-chat')- dispatchNativeNotification({ kind: 'turnDone', sessionId: 'named-chat', title: 'Hermes finished' })- expect(notify).toHaveBeenCalledWith(expect.objectContaining({ title: 'Hermes finished' }))- } finally {- setSessions([])- }- })})describe('dispatchNativeNotification post-connect baseline', () => {@@ -196,14 +167,6 @@ describe('dispatchNativeNotification post-connect baseline', () => {expect(notify).not.toHaveBeenCalled()})- it('suppresses a completion replayed right after a socket opens', () => {- const sessionId = freshSession()- setActiveSessionId(sessionId)- markNativeNotifyBaseline()- dispatchNativeNotification({ kind: 'turnDone', sessionId, title: 'done' })- expect(notify).not.toHaveBeenCalled()- })-it('fires again once the window has passed', () => {vi.useFakeTimers()@@ -337,13 +300,6 @@ describe('sendTestNativeNotification', () => {})})-describe('$activeSessionId wiring', () => {- it('reflects the setter used for gating', () => {- setActiveSessionId('xyz')- expect($activeSessionId.get()).toBe('xyz')- })-})-describe('respondToApprovalAction', () => {const request = vi.fn().mockResolvedValue({ resolved: true })diff --git a/apps/desktop/src/store/notifications.test.ts b/apps/desktop/src/store/notifications.test.tsindex e065c7daf9d..dee2acffb41 100644--- a/apps/desktop/src/store/notifications.test.ts+++ b/apps/desktop/src/store/notifications.test.ts@@ -24,7 +24,6 @@ test('gateway_auth_failed error is summarized as sign-in, with an Open Gateways'Request failed')- expect(lastMessage()).toMatch(/sign in again/i)expect(lastMessage()).not.toMatch(/API_SERVER_KEY|OpenAI|authentication failed/i)const action = $notifications.get()[0]?.action@@ -39,7 +38,6 @@ test('provider invalid_api_key error maps to the OpenAI summary and deep-links t'Request failed')- expect(lastMessage()).toMatch(/OpenAI didn't accept your API key/i)expect(lastMessage()).not.toMatch(/401|invalid_api_key/)$notifications.get()[0]?.action?.onClick()expect($routeRequest.get()?.path).toBe('/settings?tab=keys&key=OPENAI_API_KEY')@@ -56,7 +54,6 @@ test('ELEVENLABS_API_KEY not set toasts plain copy with an Open Keys action fortest('structured storage_* error codes route to Maintenance', () => {notifyError(new Error('500 {"detail":{"message":"database is locked","code":"storage_locked"}}'), 'Prompt failed')- expect(lastMessage()).toMatch(/data folder/i)$notifications.get()[0]?.action?.onClick()expect($routeRequest.get()?.path).toBe('/command-center?section=maintenance')})@@ -71,27 +68,13 @@ test('405 method-not-allowed toasts a restart in plain words with a Restart Hermexpect($backendRestartRequest.get()).toBe(before + 1)})-test('disk-full / ENOSPC errors toast a free-space message', () => {+test('disk-full / ENOSPC phrasings are classified as disk-full, other storage failures are not', () => {expect(isDiskFullErrorMessage('OSError: [Errno 28] No space left on device')).toBe(true)expect(isDiskFullErrorMessage('sqlite3.OperationalError: database or disk is full')).toBe(true)expect(isDiskFullErrorMessage('disk full: session storage could not be written — free some disk space')).toBe(true)expect(isDiskFullErrorMessage('This is often a full disk — free some space')).toBe(true)expect(isDiskFullErrorMessage('session storage could not be written: permission denied')).toBe(false)expect(isDiskFullErrorMessage('network timeout')).toBe(false)-- notifyError(new Error('OSError: [Errno 28] No space left on device: state.db'), 'Prompt failed')-- expect(lastMessage()).toMatch(/Disk full/i)- expect(lastMessage()).toMatch(/free some space/i)-})--test('session storage write failure is treated as disk-full class', () => {- notifyError(- new Error('disk full: session storage could not be written — free some disk space and try again'),- 'Prompt failed'- )-- expect(lastMessage()).toMatch(/Disk full/i)})test('code-skew 503 unwraps to a restart-required summary, not raw IPC JSON', () => {@@ -102,7 +85,6 @@ test('code-skew 503 unwraps to a restart-required summary, not raw IPC JSON', ()'Could not load models')- expect(lastMessage()).toMatch(/still running the old version/i)expect(lastMessage()).not.toMatch(/hermes:api|systemctl|backend/i)const before = $backendRestartRequest.get()expect($notifications.get()[0]?.action?.label).toBe(en.notifications.actions.restartHermes)diff --git a/apps/desktop/src/store/onboarding.test.ts b/apps/desktop/src/store/onboarding.test.tsindex fa43fc56d77..cdbb4b15841 100644--- a/apps/desktop/src/store/onboarding.test.ts+++ b/apps/desktop/src/store/onboarding.test.ts@@ -601,7 +601,6 @@ describe('saveOnboardingLocalEndpoint', () => {})expect(result.ok).toBe(false)- expect(result.message).toContain('no models')// Must not attempt to persist an assignment without a model.expect(calls).not.toContain('/api/model/set')})@@ -825,13 +824,7 @@ describe('device-code poll expiry', () => {vi.advanceTimersByTime(3000)})- const flow = $desktopOnboarding.get().flow- expect(flow.status).toBe('error')-- if (flow.status === 'error') {- expect(flow.message).toMatch(/timed out before you finished/)- expect(flow.message).not.toMatch(/server-side|CLI/)- }+ expect($desktopOnboarding.get().flow.status).toBe('error')})it('keeps polling while the window is open and clears the expiry on cancel', async () => {diff --git a/apps/desktop/src/store/pane-focus.test.ts b/apps/desktop/src/store/pane-focus.test.tsdeleted file mode 100644index 7268951bc34..00000000000--- a/apps/desktop/src/store/pane-focus.test.ts+++ /dev/null@@ -1,49 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest'--import { revealDesktopPane } from './pane-focus'--const { openReview, revealTreePane, setFileBrowserOpen, setSidebarOpen, setTerminalTakeover } = vi.hoisted(() => ({- openReview: vi.fn(),- revealTreePane: vi.fn(),- setFileBrowserOpen: vi.fn(),- setSidebarOpen: vi.fn(),- setTerminalTakeover: vi.fn()-}))--vi.mock('@/app/right-sidebar/store', () => ({ setTerminalTakeover }))-vi.mock('@/components/pane-shell/tree/store', () => ({ revealTreePane }))-vi.mock('./layout', () => ({ setFileBrowserOpen, setSidebarOpen }))-vi.mock('./review', () => ({ openReview }))--describe('revealDesktopPane', () => {- beforeEach(() => vi.clearAllMocks())-- it("drives each pane's own reveal path", () => {- revealDesktopPane('chat')- expect(revealTreePane).toHaveBeenCalledWith('workspace')- revealDesktopPane('files')- expect(setFileBrowserOpen).toHaveBeenCalledWith(true)- revealDesktopPane('review')- expect(openReview).toHaveBeenCalledOnce()- revealDesktopPane('sessions')- expect(setSidebarOpen).toHaveBeenCalledWith(true)- revealDesktopPane('terminal')- expect(setTerminalTakeover).toHaveBeenCalledWith(true)- })-- it('also un-minimizes the tree pane, since a same-value store set is a no-op', () => {- for (const pane of ['files', 'review', 'sessions', 'terminal']) {- revealDesktopPane(pane)- expect(revealTreePane).toHaveBeenCalledWith(pane)- }- })-- it('returns false for an unknown pane and touches nothing', () => {- expect(revealDesktopPane('nope')).toBe(false)- expect(revealTreePane).not.toHaveBeenCalled()- })-- it('returns true for a known pane', () => {- expect(revealDesktopPane('terminal')).toBe(true)- })-})diff --git a/apps/desktop/src/store/panes.test.ts b/apps/desktop/src/store/panes.test.tsindex 8ed2fe3723b..d9ad8cb0f37 100644--- a/apps/desktop/src/store/panes.test.ts+++ b/apps/desktop/src/store/panes.test.ts@@ -26,12 +26,6 @@ describe('panes store', () => {})describe('ensurePaneRegistered', () => {- it('adds a pane with defaults when missing', () => {- ensurePaneRegistered('files', { open: true })-- expect(getPaneStateSnapshot('files')).toEqual({ open: true, widthOverride: undefined })- })-it('is a no-op when the pane already exists', () => {ensurePaneRegistered('files', { open: false })ensurePaneRegistered('files', { open: true })@@ -49,13 +43,6 @@ describe('panes store', () => {})describe('setPaneOpen / togglePane', () => {- it('updates the pane open flag', () => {- ensurePaneRegistered('files', { open: false })- setPaneOpen('files', true)-- expect(getPaneStateSnapshot('files')?.open).toBe(true)- })-it('togglePane flips the current value', () => {ensurePaneRegistered('files', { open: false })togglePane('files')@@ -82,13 +69,6 @@ describe('panes store', () => {})describe('width overrides', () => {- it('setPaneWidthOverride stores the px value', () => {- ensurePaneRegistered('files', { open: true })- setPaneWidthOverride('files', 300)-- expect(getPaneStateSnapshot('files')?.widthOverride).toBe(300)- })-it('clearPaneWidthOverride removes the override', () => {ensurePaneRegistered('files', { open: true })setPaneWidthOverride('files', 300)@@ -138,9 +118,5 @@ describe('panes store', () => {setPaneWidthOverride('files', 240)expect(width$.get()).toBe(240)})-- it('$paneOpen returns the same atom instance for repeated calls', () => {- expect($paneOpen('files')).toBe($paneOpen('files'))- })})})diff --git a/apps/desktop/src/store/pet.test.ts b/apps/desktop/src/store/pet.test.tsindex a2b972829fc..f3add6f0bd8 100644--- a/apps/desktop/src/store/pet.test.ts+++ b/apps/desktop/src/store/pet.test.ts@@ -11,7 +11,6 @@ import {flashPetActivity,hasPetSpriteForMeta,mergePetInfoMeta,- type PetInfo,setPetActivity} from './pet'import { $activeSessionId, $busy } from './session'@@ -111,27 +110,6 @@ describe('pet info metadata cache helpers', () => {spritesheetRevision: '100:2048'})})-- it('returns the same reference when nothing changed to avoid redundant store updates', () => {- const current: PetInfo = {- enabled: true,- slug: 'boba',- displayName: 'Boba',- scale: 0.33,- spritesheetBase64: 'large-sprite-payload',- spritesheetRevision: '100:2048'- }-- const meta = {- enabled: true,- slug: 'boba',- displayName: 'Boba',- scale: 0.33,- spritesheetRevision: '100:2048'- }-- expect(mergePetInfoMeta(current, meta)).toBe(current)- })})describe('flashPetActivity', () => {diff --git a/apps/desktop/src/store/profile-remote-override.test.ts b/apps/desktop/src/store/profile-remote-override.test.tsindex a3f300a2880..11c67f2ca6b 100644--- a/apps/desktop/src/store/profile-remote-override.test.ts+++ b/apps/desktop/src/store/profile-remote-override.test.ts@@ -4,9 +4,7 @@ import { $notifications } from './notifications'import {$profileRemoteOverrides,$remoteOverrideDialogProfile,- closeRemoteOverrideDialog,notifyRemoteOverrideAuthFailure,- openRemoteOverrideDialog,refreshProfileRemoteOverrides,remoteHostLabel} from './profile-remote-override'@@ -114,12 +112,3 @@ describe('notifyRemoteOverrideAuthFailure', () => {expect($notifications.get()).toEqual([])})})--describe('dialog open/close atoms', () => {- it('opens for a profile and closes back to null', () => {- openRemoteOverrideDialog('work')- expect($remoteOverrideDialogProfile.get()).toBe('work')- closeRemoteOverrideDialog()- expect($remoteOverrideDialogProfile.get()).toBeNull()- })-})diff --git a/apps/desktop/src/store/profile.test.ts b/apps/desktop/src/store/profile.test.tsindex 9e0488d73d6..33c444f296c 100644--- a/apps/desktop/src/store/profile.test.ts+++ b/apps/desktop/src/store/profile.test.ts@@ -225,14 +225,6 @@ describe('prewarmProfileBackend (hover-intent pool spawn)', () => {expect(openGatewayForProfile).not.toHaveBeenCalled()})- it('pre-warms while pool slots are free', () => {- openSecondaryCount.mockReturnValue(1)-- prewarmProfileBackend('warm-slot-free')-- expect(openGatewayForProfile).toHaveBeenCalledWith('warm-slot-free')- })-it('follows the live pool-limit atom, not a hard-coded cap', () => {// User raises Warm Bot Backends to 8 in Settings: prewarming must keep// working well past the old default of 3.diff --git a/apps/desktop/src/store/projects.test.ts b/apps/desktop/src/store/projects.test.tsindex 39ac5871b32..45c83437aca 100644--- a/apps/desktop/src/store/projects.test.ts+++ b/apps/desktop/src/store/projects.test.ts@@ -13,7 +13,6 @@ import {$projectScope,$projectsRpcAvailable,$projectTree,- $worktreeRefreshToken,addProjectFolder,ALL_PROJECTS,createProject,@@ -27,7 +26,6 @@ import {projectNameForCwd,refreshProjects,refreshProjectTree,- refreshWorktrees,resolveNewSessionCwd,scanAndRecordRepos,startWorkInRepo,@@ -108,10 +106,6 @@ describe('project scope', () => {$projectScope.set(ALL_PROJECTS)})- it('defaults to ALL_PROJECTS', () => {- expect($projectScope.get()).toBe(ALL_PROJECTS)- })-it('enterProject scopes the sidebar to the project id', () => {// setActiveProject fires best-effort (no gateway in test → it rejects and is// swallowed); the synchronous scope change is what matters here.@@ -341,14 +335,6 @@ describe('projectNameForCwd', () => {})})-describe('worktree refresh', () => {- it('refreshWorktrees bumps the probe token so useRepoWorktreeMap refetches', () => {- const before = $worktreeRefreshToken.get()- refreshWorktrees()- expect($worktreeRefreshToken.get()).toBe(before + 1)- })-})-describe('startWorkInRepo remote capability gate (#81724)', () => {it('names the stale-backend remedy when a remote gateway lacks the worktree route', async () => {isDesktopFsRemoteMode.mockReturnValue(true)@@ -381,14 +367,6 @@ describe('pickProjectFolder', () => {vi.clearAllMocks()})- it('uses the remote-aware directory picker locally', async () => {- isDesktopFsRemoteMode.mockReturnValue(false)- selectDesktopPaths.mockResolvedValue(['/local/repo'])-- await expect(pickProjectFolder()).resolves.toBe('/local/repo')- expect(selectDesktopPaths).toHaveBeenCalledWith({ defaultPath: undefined, directories: true, multiple: false })- })-it('seeds the picker with the backend cwd on a remote gateway', async () => {isDesktopFsRemoteMode.mockReturnValue(true)desktopDefaultCwd.mockResolvedValue({ branch: 'main', cwd: '/backend/work' })diff --git a/apps/desktop/src/store/prompts.test.ts b/apps/desktop/src/store/prompts.test.tsindex 289371a43c5..2c54ced4558 100644--- a/apps/desktop/src/store/prompts.test.ts+++ b/apps/desktop/src/store/prompts.test.ts@@ -35,16 +35,6 @@ afterEach(() => {})describe('approval prompt store', () => {- it('holds the active session-keyed approval request', () => {- setApprovalRequest({ command: 'rm -rf /tmp/x', description: 'recursive delete', sessionId: 's1' })-- expect($approvalRequest.get()).toEqual({- command: 'rm -rf /tmp/x',- description: 'recursive delete',- sessionId: 's1'- })- })-it('parks a background session prompt out of the active view', () => {setApprovalRequest({ command: 'x', description: 'd', sessionId: 's2' })@@ -63,17 +53,6 @@ describe('approval prompt store', () => {expect($approvalRequest.get()).toBeNull()})- it('carries allowPermanent so the bar can hide "Always allow"', () => {- setApprovalRequest({- allowPermanent: false,- command: 'curl x | bash',- description: 'content-security',- sessionId: 's1'- })-- expect($approvalRequest.get()?.allowPermanent).toBe(false)- })-it('correlates clearing to the exact approval request id', () => {setApprovalRequest({ command: 'x', description: 'd', requestId: 'r1', sessionId: 's1' })diff --git a/apps/desktop/src/store/quick-entry.test.ts b/apps/desktop/src/store/quick-entry.test.tsindex 0657cdd5fb0..5ff1be5bd42 100644--- a/apps/desktop/src/store/quick-entry.test.ts+++ b/apps/desktop/src/store/quick-entry.test.ts@@ -39,17 +39,6 @@ const connect: QuickComposerEvent = {}describe('quickComposerReducer', () => {- it('starts visible, empty, DISCONNECTED, and targeting the current chat', () => {- expect(initialQuickComposerState).toEqual({- connected: false,- draft: '',- sessions: [],- submitting: false,- target: QUICK_TARGET_CURRENT,- visible: true- })- })-it('submit sends the trimmed draft with the target, clears it, and hides', () => {const { sent, state } = run([connect, { draft: ' ship it ', type: 'edit' }, { type: 'submit' }])@@ -185,27 +174,6 @@ describe('quickComposerReducer', () => {expect(state.sessions).toHaveLength(2)})- it('re-summoning after a dismiss never carries the old draft back', () => {- const dismissed = run([connect, { draft: 'stale text', type: 'edit' }, { type: 'dismiss' }]).state- const reopened = quickComposerReducer(dismissed, { type: 'shown' }).state-- expect(reopened.draft).toBe('')- expect(reopened.visible).toBe(true)- })-- it('editing keeps the window open and never sends', () => {- const { sent, state } = run([- connect,- { draft: 'a', type: 'edit' },- { draft: 'ab', type: 'edit' },- { draft: 'abc', type: 'edit' }- ])-- expect(sent).toEqual([])- expect(state.draft).toBe('abc')- expect(state.visible).toBe(true)- })-it('a full summon → type → submit → summon cycle sends exactly once per round', () => {const first = run([connect, { draft: 'one', type: 'edit' }, { type: 'submit' }])const second = run([{ type: 'shown' }, { draft: 'two', type: 'edit' }, { type: 'submit' }], first.state)diff --git a/apps/desktop/src/store/reactions.test.ts b/apps/desktop/src/store/reactions.test.tsindex f922784c9fb..357d563a2c6 100644--- a/apps/desktop/src/store/reactions.test.ts+++ b/apps/desktop/src/store/reactions.test.ts@@ -1,6 +1,6 @@import { describe, expect, it } from 'vitest'-import { applyReaction, QUICK_REACTIONS } from '@/store/reactions'+import { applyReaction } from '@/store/reactions'import type { MessageReaction } from '@/types/hermes'const at = 1_700_000_000@@ -50,10 +50,3 @@ describe('applyReaction', () => {expect(before).toEqual(snapshot)})})--describe('QUICK_REACTIONS', () => {- it('is the six iOS Tapback defaults, each distinct', () => {- expect(QUICK_REACTIONS).toHaveLength(6)- expect(new Set(QUICK_REACTIONS).size).toBe(6)- })-})diff --git a/apps/desktop/src/store/review.test.ts b/apps/desktop/src/store/review.test.tsindex 446e4f00dce..29cc93eeb45 100644--- a/apps/desktop/src/store/review.test.ts+++ b/apps/desktop/src/store/review.test.ts@@ -3,7 +3,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import type { HermesReviewFile, HermesReviewShipInfo } from '@/global'import {- $reviewCommitDefault,$reviewCommitMsgBusy,$reviewDiff,$reviewDiffLoading,@@ -18,26 +17,19 @@ import {$reviewSelectedPath,$reviewShipBusy,$reviewShipInfo,- $reviewTreeMode,- cancelRevert,- clearReviewSelection,closeReview,commitChanges,confirmRevert,createOrOpenPr,generateCommitMessage,openReview,- pushChanges,refreshReview,refreshShipInfo,requestRevert,revealReview,- revertReviewFile,selectReviewFile,stageReviewFile,- toggleReview,- toggleReviewTreeMode,- unstageReviewFile+ toggleReview} from './review'import { $currentCwd } from './session'@@ -192,7 +184,7 @@ describe('$reviewMaxChurn', () => {})})-describe('selectReviewFile / clearReviewSelection', () => {+describe('selectReviewFile', () => {it('sets the selected path and fetches its diff', async () => {const review = stubReview({ diff: vi.fn(async () => 'the diff') })@@ -204,14 +196,6 @@ describe('selectReviewFile / clearReviewSelection', () => {expect(review.diff).toHaveBeenCalledWith('/repo', 'a.ts', 'uncommitted', null, false)})- it('coerces a falsy diff to empty string (not null)', async () => {- stubReview({ diff: vi.fn(async () => '') })-- await selectReviewFile(file('a.ts'))-- expect($reviewDiff.get()).toBe('')- })-it('sets diff null when there is no bridge', async () => {delete (window as unknown as { hermesDesktop?: unknown }).hermesDesktop@@ -220,29 +204,9 @@ describe('selectReviewFile / clearReviewSelection', () => {expect($reviewSelectedPath.get()).toBe('a.ts')expect($reviewDiff.get()).toBeNull()})-- it('clears path, diff and loading', () => {- $reviewSelectedPath.set('a.ts')- $reviewDiff.set('x')- $reviewDiffLoading.set(true)-- clearReviewSelection()-- expect($reviewSelectedPath.get()).toBeNull()- expect($reviewDiff.get()).toBeNull()- expect($reviewDiffLoading.get()).toBe(false)- })})describe('view state', () => {- it('toggleReviewTreeMode flips list <-> tree', () => {- $reviewTreeMode.set('tree')- toggleReviewTreeMode()- expect($reviewTreeMode.get()).toBe('list')- toggleReviewTreeMode()- expect($reviewTreeMode.get()).toBe('tree')- })-it('openReview opens the pane and kicks off a refresh', async () => {const review = stubReview()openReview()@@ -267,15 +231,6 @@ describe('view state', () => {expect(review.list).toHaveBeenCalledWith('/tile-worktree', 'uncommitted', null)})- it('openReview remembers the tile composer that owns the scoped worktree', () => {- stubReview()-- openReview('/tile-worktree', 'tile:project-b')-- expect($reviewScopeCwd.get()).toBe('/tile-worktree')- expect($reviewScopeTarget.get()).toBe('tile:project-b')- })-it('revealReview re-homes the origin when the repo stays the same', () => {stubReview()openReview('/tile-worktree', 'tile:project-a')@@ -350,34 +305,9 @@ describe('mutations', () => {expect(review.stage).toHaveBeenCalledWith('/repo', 'a.ts')expect(review.list).toHaveBeenCalled()})-- it('unstageReviewFile forwards the path', async () => {- const review = stubReview()- await unstageReviewFile('a.ts')- expect(review.unstage).toHaveBeenCalledWith('/repo', 'a.ts')- })-- it('revertReviewFile forwards the path', async () => {- const review = stubReview()- await revertReviewFile('a.ts')- expect(review.revert).toHaveBeenCalledWith('/repo', 'a.ts')- })-- it('stage with null path means "all"', async () => {- const review = stubReview()- await stageReviewFile(null)- expect(review.stage).toHaveBeenCalledWith('/repo', null)- })})describe('revert confirm dialog', () => {- it('requestRevert opens a target, cancelRevert closes it', () => {- requestRevert('a.ts')- expect($reviewRevertTarget.get()).toEqual({ path: 'a.ts' })- cancelRevert()- expect($reviewRevertTarget.get()).toBeUndefined()- })-it('requestRevert(null) encodes the "revert all" target distinctly from closed', () => {requestRevert(null)expect($reviewRevertTarget.get()).toEqual({ path: null })@@ -423,12 +353,6 @@ describe('ship flow', () => {expect(review.commit).not.toHaveBeenCalled()})- it('pushChanges pushes and refreshes ship info', async () => {- const review = stubReview()- await pushChanges()- expect(review.push).toHaveBeenCalledWith('/repo')- })-it('createOrOpenPr opens the existing PR without creating a new one', async () => {const review = stubReview()$reviewShipInfo.set({ ghReady: true, pr: { url: 'https://example.com/pr/9' } } as HermesReviewShipInfo)@@ -455,19 +379,6 @@ describe('ship flow', () => {})describe('refreshShipInfo', () => {- it('populates ship info from the bridge', async () => {- const info: HermesReviewShipInfo = {- ghReady: true,- pr: { url: 'https://example.com/pr/3' }- } as HermesReviewShipInfo-- stubReview({ shipInfo: vi.fn(async () => info) })-- await refreshShipInfo()-- expect($reviewShipInfo.get()).toEqual(info)- })-it('resets ship info when there is no bridge', async () => {delete (window as unknown as { hermesDesktop?: unknown }).hermesDesktop$reviewShipInfo.set({ ghReady: true, pr: { url: 'x' } } as HermesReviewShipInfo)@@ -525,12 +436,3 @@ describe('generateCommitMessage', () => {expect(msg).toBe('')})})--describe('$reviewCommitDefault', () => {- it('remembers the split-button default action', () => {- $reviewCommitDefault.set('commitPush')- expect($reviewCommitDefault.get()).toBe('commitPush')- $reviewCommitDefault.set('commit')- expect($reviewCommitDefault.get()).toBe('commit')- })-})diff --git a/apps/desktop/src/store/send-diagnostics.test.ts b/apps/desktop/src/store/send-diagnostics.test.tsindex 43366e18dbe..5df52655992 100644--- a/apps/desktop/src/store/send-diagnostics.test.ts+++ b/apps/desktop/src/store/send-diagnostics.test.ts@@ -137,13 +137,6 @@ describe('send-diagnostics store', () => {}})- it('dismiss clears the dialog state', () => {- requestSendDiagnostics()- dismissSendDiagnostics()-- expect($sendDiagnostics.get()).toBeNull()- })-it('dismissal mid-upload is immediate and a stale completion cannot resurrect the dialog', async () => {let resolveRequest: (value: unknown) => void = () => {}diff --git a/apps/desktop/src/store/session-color.test.ts b/apps/desktop/src/store/session-color.test.tsindex 964d0a18761..c8e36182b52 100644--- a/apps/desktop/src/store/session-color.test.ts+++ b/apps/desktop/src/store/session-color.test.ts@@ -45,15 +45,6 @@ describe('$sessionColorById', () => {expect(b.id in map).toBe(false)})- it('omits a session whose project has no color', () => {- const a = makeCwdSession('/www/app', { git_repo_root: '/www/app' })-- $projects.set([makeProject('p_app', ['/www/app'], null)])- $sessions.set([a])-- expect(a.id in $sessionColorById.get()).toBe(false)- })-it('recomputes when the projects list changes (color applied later)', () => {const a = makeCwdSession('/www/app', { git_repo_root: '/www/app' })diff --git a/apps/desktop/src/store/session-states.test.ts b/apps/desktop/src/store/session-states.test.tsindex 680f228fad0..1bb5e4a0e73 100644--- a/apps/desktop/src/store/session-states.test.ts+++ b/apps/desktop/src/store/session-states.test.ts@@ -131,14 +131,6 @@ describe('resetTileRuntimeBindings', () => {])})- it('tolerates a delegate without invalidateRuntimeBindings (older wiring)', () => {- setSessionTileDelegate({} as unknown as SessionTileDelegate)- $sessionTiles.set([{ runtimeId: 'runtime-dead', storedSessionId: 'stored-a' }])-- expect(() => resetTileRuntimeBindings()).not.toThrow()- expect($sessionTiles.get()[0]?.runtimeId).toBeUndefined()- })-it('keeps Bot runtimes owned by a different connection', () => {const invalidateRuntimeBindings = vi.fn()setSessionTileDelegate({ invalidateRuntimeBindings } as unknown as SessionTileDelegate)@@ -912,13 +904,6 @@ describe('releaseSessionTranscript', () => {expect(() => releaseSessionTranscript('runtime')).not.toThrow()expect($sessionStates.get().runtime).toEqual({ ...legacy, messages: [] })})-- it('ignores a legacy undefined state without throwing', () => {- $sessionStates.set({ runtime: undefined } as unknown as Record<string, ClientSessionState>)-- expect(() => releaseSessionTranscript('runtime')).not.toThrow()- expect($sessionStates.get()).toHaveProperty('runtime', undefined)- })})describe('orderTilesByTree', () => {@@ -1275,12 +1260,6 @@ describe('sessionTileOwnerRoute', () => {expect(sessionTileOwnerRoute('plain')).toBeUndefined()})-- it('returns undefined when the session has no tile', () => {- $sessionTiles.set([])-- expect(sessionTileOwnerRoute('missing')).toBeUndefined()- })})describe('knownOwnerForSession / requestForOwnedSession (#91684 client half)', () => {