The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fmt(js): `npm run fix` on merge (#129471)
hermes-seaeye[bot]44fc5f629db3
diff --git a/apps/desktop/electron/backend-ready.test.ts b/apps/desktop/electron/backend-ready.test.tsindex 685128289f2..6fa4e49de93 100644--- a/apps/desktop/electron/backend-ready.test.ts+++ b/apps/desktop/electron/backend-ready.test.ts@@ -341,30 +341,39 @@ test('a completion banner re-arms the deadline past the original timeout', asyncassert.equal(await p, 4455)})-test('a stalled completion banner is capped, not waited out forever', async () => {- // The banner says a repair is in progress but nothing ever resolves: the- // wait must still fail (bounded), and the message must carry that the- // completion was in progress — truthful and actionable instead of a bare- // 90s timeout that hides a multi-minute repair. The 5-minute grace is- // wall-clock, so this holds the wait past it with a long test budget.- const child = makeFakeChild()- const wait = waitForDashboardPort(child, 20)- wait.catch(() => {}) // mark handled; the assertion below re-awaits-- child.stdout.emit('data', 'hermes: finishing an interrupted source update...\n')- await assert.rejects(- wait,- /Timed out waiting for Hermes backend port announcement .* while an update completion was in progress/- )-}, 6 * 60_000)+test(+ 'a stalled completion banner is capped, not waited out forever',+ async () => {+ // The banner says a repair is in progress but nothing ever resolves: the+ // wait must still fail (bounded), and the message must carry that the+ // completion was in progress — truthful and actionable instead of a bare+ // 90s timeout that hides a multi-minute repair. The 5-minute grace is+ // wall-clock, so this holds the wait past it with a long test budget.+ const child = makeFakeChild()+ const wait = waitForDashboardPort(child, 20)+ wait.catch(() => {}) // mark handled; the assertion below re-awaits++ child.stdout.emit('data', 'hermes: finishing an interrupted source update...\n')+ await assert.rejects(+ wait,+ /Timed out waiting for Hermes backend port announcement .* while an update completion was in progress/+ )+ },+ 6 * 60_000+)test('a banner already in the spawn-time tail also re-arms', async () => {// The dormant bufferedOutput gap (#60323): the banner was flushed before the// listener attached. Seeding from the tail must extend the deadline too.const child = makeFakeChild()- const p = waitForDashboardPort(child, 40, () => '', () =>- 'hermes: completing source-update dependencies...\n'++ const p = waitForDashboardPort(+ child,+ 40,+ () => '',+ () => 'hermes: completing source-update dependencies...\n')+await new Promise(resolve => setTimeout(resolve, 80))child.stdout.emit('data', 'HERMES_BACKEND_READY port=4471\n')assert.equal(await p, 4471)diff --git a/apps/desktop/electron/backend-ready.ts b/apps/desktop/electron/backend-ready.tsindex fb9802f46b3..c8b1a55e780 100644--- a/apps/desktop/electron/backend-ready.ts+++ b/apps/desktop/electron/backend-ready.ts@@ -115,10 +115,17 @@ function waitForDashboardPort(function rearmTimer() {clearTimeout(timer)const deadline = completionDeadline()- timer = setTimeout(() => {- cleanup()- reject(new Error(`Timed out waiting for Hermes backend port announcement (${timeoutMs}ms)${deadline ? ' while an update completion was in progress' : ''}`))- }, Math.max(0, (deadline ?? startedAt + timeoutMs) - realNow()))+ timer = setTimeout(+ () => {+ cleanup()+ reject(+ new Error(+ `Timed out waiting for Hermes backend port announcement (${timeoutMs}ms)${deadline ? ' while an update completion was in progress' : ''}`+ )+ )+ },+ Math.max(0, (deadline ?? startedAt + timeoutMs) - realNow())+ )}function cleanup() {diff --git a/apps/desktop/electron/backend-serve-support.ts b/apps/desktop/electron/backend-serve-support.tsindex 9f0a83c3701..0c988c07e26 100644--- a/apps/desktop/electron/backend-serve-support.ts+++ b/apps/desktop/electron/backend-serve-support.ts@@ -66,18 +66,22 @@ export function createBackendServeSupportResolver(hermesHome: string, rememberLo// is cached for the process lifetime, silently routing a modern// runtime through the legacy `dashboard` form. Share the probe budget// and its timeout-only retry instead of a thinner local bound.- await execProbe(windowsShellCommand(backend.command, Boolean(backend.shell)), [...prefix, 'serve', '--help'], {- cwd: backend.root || undefined,- env: { ...process.env, HERMES_HOME: hermesHome, ...(backend.env || {}) },- timeout: PROBE_TIMEOUT_MS,- stdio: 'ignore',- // `.cmd`/`.bat` shim backends carry shell: true in their descriptor- // (see resolveHermesBackend step 4); execFileSync of a .cmd without- // shell throws EINVAL on modern Node, which the catch below would- // mis-cache as "serve unsupported" for the process lifetime.- shell: Boolean(backend.shell),- windowsHide: true- })+ await execProbe(+ windowsShellCommand(backend.command, Boolean(backend.shell)),+ [...prefix, 'serve', '--help'],+ {+ cwd: backend.root || undefined,+ env: { ...process.env, HERMES_HOME: hermesHome, ...(backend.env || {}) },+ timeout: PROBE_TIMEOUT_MS,+ stdio: 'ignore',+ // `.cmd`/`.bat` shim backends carry shell: true in their descriptor+ // (see resolveHermesBackend step 4); execFileSync of a .cmd without+ // shell throws EINVAL on modern Node, which the catch below would+ // mis-cache as "serve unsupported" for the process lifetime.+ shell: Boolean(backend.shell),+ windowsHide: true+ }+ )supported = true} catch (err) {// A timeout says nothing about the runtime, only about this machinediff --git a/apps/desktop/electron/connection-registry.ts b/apps/desktop/electron/connection-registry.tsindex 2322ad91794..a07c672e961 100644--- a/apps/desktop/electron/connection-registry.ts+++ b/apps/desktop/electron/connection-registry.ts@@ -1732,7 +1732,6 @@ export function reconcileRegistryDrift(return { changed: true, registry: upsertConnection(registry, aligned) }}-let entry: RegistryConnectiontry {diff --git a/apps/desktop/electron/external-open.test.ts b/apps/desktop/electron/external-open.test.tsindex 6f190d04759..aaac6090908 100644--- a/apps/desktop/electron/external-open.test.ts+++ b/apps/desktop/electron/external-open.test.ts@@ -105,7 +105,13 @@ test('opens bare local paths through openLocalPath instead of rejecting them', a// Every shape `new URL()` cannot express as a web/file URL: a Windows drive// letter parses as the bogus `c:` scheme, POSIX/UNC/`~` make the parser// throw. All previously landed in the "Invalid external URL" reject.- for (const raw of ['C:\\Users\\x\\a.md', 'C:/Work/report.html', '/tmp/report.pdf', '~/logs/desktop.log', '\\\\server\\share\\a.md']) {+ for (const raw of [+ 'C:\\Users\\x\\a.md',+ 'C:/Work/report.html',+ '/tmp/report.pdf',+ '~/logs/desktop.log',+ '\\\\server\\share\\a.md'+ ]) {const result = await openExternalUrl(raw, deps)assert.deepEqual(result, { ok: true }, `expected ${raw} to open as a local path`)@@ -130,7 +136,9 @@ test('resolves invalid, with the path logged, when openLocalPath cannot resolveconst result = await openExternalUrl('C:\\Users\\x\\a.md', deps)assert.deepEqual(result, { ok: false, reason: 'invalid' })- assert.ok(calls.logged.some(line => line.includes('openPath resolve rejected') && line.includes('C:\\Users\\x\\a.md')))+ assert.ok(+ calls.logged.some(line => line.includes('openPath resolve rejected') && line.includes('C:\\Users\\x\\a.md'))+ )assert.equal(calls.notified.length, 0)})diff --git a/apps/desktop/electron/gateway-file-download-transport.test.ts b/apps/desktop/electron/gateway-file-download-transport.test.tsindex 5e18d18fdf4..1318debd38d 100644--- a/apps/desktop/electron/gateway-file-download-transport.test.ts+++ b/apps/desktop/electron/gateway-file-download-transport.test.ts@@ -124,12 +124,19 @@ test.each(authCases)('session-token',context,{- showSaveDialog: async (settings: { defaultPath: string; filters?: unknown; title: string }): Promise<GatewaySaveDialogResult> => {+ showSaveDialog: async (settings: {+ defaultPath: string+ filters?: unknown+ title: string+ }): Promise<GatewaySaveDialogResult> => {// #92480: the dialog must carry the download's file type so Windows has// a default extension to append; the resolved name reaches it intact.expect(settings.defaultPath).toBe('server.bin')expect(settings.title).toBe('Save File')- expect(settings.filters).toEqual([{ name: 'BIN File', extensions: ['bin'] }, { name: 'All Files', extensions: ['*'] }])+ expect(settings.filters).toEqual([+ { name: 'BIN File', extensions: ['bin'] },+ { name: 'All Files', extensions: ['*'] }+ ])dialogEntered.resolve()return decision.promise@@ -408,7 +415,10 @@ test('the data-url save dialog carries a file type too', async (): Promise<void>throw Object.assign(new Error('not found'), { statusCode: 404 })},readDataUrl: async (): Promise<string> => 'data:application/octet-stream,hello',- showSaveDialog: async (settings: { defaultPath: string; filters?: unknown }): Promise<GatewaySaveDialogResult> => {+ showSaveDialog: async (settings: {+ defaultPath: string+ filters?: unknown+ }): Promise<GatewaySaveDialogResult> => {seen.push(settings)return { canceled: false, filePath: destination }@@ -420,7 +430,10 @@ test('the data-url save dialog carries a file type too', async (): Promise<void>expect(seen).toEqual([{defaultPath: suggested,- filters: [{ name: 'BIN File', extensions: ['bin'] }, { name: 'All Files', extensions: ['*'] }],+ filters: [+ { name: 'BIN File', extensions: ['bin'] },+ { name: 'All Files', extensions: ['*'] }+ ],title: 'Save File'}])diff --git a/apps/desktop/electron/gateway-file-download.test.ts b/apps/desktop/electron/gateway-file-download.test.tsindex e6cfd6924c2..cf6041442d2 100644--- a/apps/desktop/electron/gateway-file-download.test.ts+++ b/apps/desktop/electron/gateway-file-download.test.ts@@ -319,7 +319,6 @@ test('isNotFoundError matches only HTTP 404', () => {assert.equal(isNotFoundError(null), false)})-test('resolveGatewayFileBackend pins registered files to their owning connection', async () => {const calls: string[] = []@@ -430,4 +429,3 @@ test('saveDialogFilters reads the basename, not a directory component', () => {extensions: ['pptx']})})-diff --git a/apps/desktop/electron/linux-nvidia-egl-fallback.test.ts b/apps/desktop/electron/linux-nvidia-egl-fallback.test.tsindex 2ea66197cca..d5d96740715 100644--- a/apps/desktop/electron/linux-nvidia-egl-fallback.test.ts+++ b/apps/desktop/electron/linux-nvidia-egl-fallback.test.ts@@ -137,13 +137,15 @@ describe('decideNvidiaEglFallback — exclusions', () => {it('HERMES_DESKTOP_DISABLE_GPU=0 keeps the GPU on even over a witnessed marker', () => {const marker = nvidiaEglFallbackMarker('0.21.5', '580.178.04')- expect(- decideNvidiaEglFallback({ ...PROBE, marker, env: { HERMES_DESKTOP_DISABLE_GPU: '0' } }).enable- ).toBe(false)+ expect(decideNvidiaEglFallback({ ...PROBE, marker, env: { HERMES_DESKTOP_DISABLE_GPU: '0' } }).enable).toBe(false)})it('HERMES_DESKTOP_NVIDIA_SWIFTSHADER forces the fallback on without any marker', () => {- const decision = decideNvidiaEglFallback({ ...PROBE, env: { HERMES_DESKTOP_NVIDIA_SWIFTSHADER: '1' }, marker: null })+ const decision = decideNvidiaEglFallback({+ ...PROBE,+ env: { HERMES_DESKTOP_NVIDIA_SWIFTSHADER: '1' },+ marker: null+ })expect(decision.enable).toBe(true)expect(decision.reason).toContain('override')diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.tsindex c13076c6fe8..a803515a7e3 100644--- a/apps/desktop/electron/main.ts+++ b/apps/desktop/electron/main.ts@@ -207,7 +207,11 @@ import type { RegistryConnection } from './connection-registry'import type { RosterProfileMetadata } from './connection-registry'import { liveWindowState, overlayWindowState } from './connection-window-state'import { describeCrashReason, installCrashForensics } from './crash-forensics'-import { adoptServedDashboardToken, isAttachedBackendTokenDrifted, resolveServedDashboardToken } from './dashboard-token'+import {+ adoptServedDashboardToken,+ isAttachedBackendTokenDrifted,+ resolveServedDashboardToken+} from './dashboard-token'import { resolveDesktopHermesHome, resolveDesktopUserData } from './data-paths'import { loadOrCreateInstallationId, sshOwnershipId } from './desktop-installation'import { formatDesktopLogLine, formatLogStamp } from './desktop-log-line'@@ -1757,14 +1761,13 @@ function spawnOwnedBackend(...args: Parameters<typeof spawn>): ChildProcess {}const remoteLiveness = new RemoteLivenessTracker()+// Pooled remotes are probed on the renderer reconnect cadence (minutes apart),// not the primary's sub-minute retry loop, so they need a failure window wider// than that cadence or a dead pooled descriptor's streak resets on every tick// and it is never dropped (#94381).-const pooledRemoteLiveness = new RemoteLivenessTracker(- undefined,- REMOTE_POOLED_LIVENESS_FAILURE_WINDOW_MS-)+const pooledRemoteLiveness = new RemoteLivenessTracker(undefined, REMOTE_POOLED_LIVENESS_FAILURE_WINDOW_MS)+const remoteRevalidation = new RemoteRevalidationCoordinator()const registryDispatchRevalidation = new RemoteRevalidationCoordinator()// Single-owner reconnect/dial claim (#90812): reconnectGateway()'s in-flight@@ -2388,12 +2391,16 @@ async function openLocalFilesystemPath(rawPath: string): Promise<boolean> {try {shell.showItemInFolder(localPath)} catch (revealError) {- rememberLog(`[file] showItemInFolder failed: ${revealError instanceof Error ? revealError.message : String(revealError)}; path=${localPath}`)+ rememberLog(+ `[file] showItemInFolder failed: ${revealError instanceof Error ? revealError.message : String(revealError)}; path=${localPath}`+ )}return true} catch (error) {- rememberLog(`[file] openPath rejected: ${error instanceof Error ? error.message : String(error)}; path=${localPath}`)+ rememberLog(+ `[file] openPath rejected: ${error instanceof Error ? error.message : String(error)}; path=${localPath}`+ )return true}@@ -12267,7 +12274,7 @@ function startPoolIdleReaper() {? poolRetirer.retireIdle(profile, poolIdleMs(), candidate =>Boolean(Date.now() - (candidate.lastActiveAt || 0) > poolIdleMs() ||- (candidate.lastStreamedAt ? Date.now() - candidate.lastStreamedAt > POOL_PINNED_IDLE_MS : false)+ (candidate.lastStreamedAt ? Date.now() - candidate.lastStreamedAt > POOL_PINNED_IDLE_MS : false))): stopPoolBackend(profile)@@ -13845,12 +13852,14 @@ function installPreviewGuestEscapeHatch() {break}+case 'close-preview': {event.preventDefault()sendClosePreviewRequested()break}+default:break}@@ -16768,43 +16777,43 @@ ipcMain.handle('hermes:connections:update-all', async (_event, payload) => {const eligibility = updateEligibility(connection)if (!eligibility.eligible) {- return { ...base, ok: false, skipped: true, reason: eligibility.reason }+ return { ...base, ok: false, skipped: true, reason: eligibility.reason }}try {- if (connection.kind === 'local') {- // The app-managed runtime updates through the same pipeline as the- // Settings → Updates button (marker + venv gate + relaunch flow).- const result: any = await applyUpdates()+ if (connection.kind === 'local') {+ // The app-managed runtime updates through the same pipeline as the+ // Settings → Updates button (marker + venv gate + relaunch flow).+ const result: any = await applyUpdates()- return { ...base, ok: result?.ok !== false, detail: result?.message || 'update started' }- }+ return { ...base, ok: result?.ok !== false, detail: result?.message || 'update started' }+ }- if (connection.kind === 'ssh') {- return managedSshUpdateAllRow(base, await requestManagedSshUpdate(connection.id))- }+ if (connection.kind === 'ssh') {+ return managedSshUpdateAllRow(base, await requestManagedSshUpdate(connection.id))+ }- // Claim-guarded (#90812): coalesce with a concurrent renderer dial- // for the same connection instead of bootstrapping a second backend.- const descriptor: any = await backendDialClaims.run(backendScopeKey(connection.id, null), () =>- ensureRegistryBackend(connection.id, null)- )+ // Claim-guarded (#90812): coalesce with a concurrent renderer dial+ // for the same connection instead of bootstrapping a second backend.+ const descriptor: any = await backendDialClaims.run(backendScopeKey(connection.id, null), () =>+ ensureRegistryBackend(connection.id, null)+ )- const body: any = await postJsonForBackend(descriptor, '/api/hermes/update', {}, { timeoutMs: 15_000 })+ const body: any = await postJsonForBackend(descriptor, '/api/hermes/update', {}, { timeoutMs: 15_000 })- if (body?.ok === false) {- // The backend refused (docker/nix/externally-managed installs) —- // surface ITS message, per-row, instead of failing the batch.- return {- ...base,- ok: false,- skipped: true,- reason: body?.error || 'backend-refused',- detail: body?.message- }+ if (body?.ok === false) {+ // The backend refused (docker/nix/externally-managed installs) —+ // surface ITS message, per-row, instead of failing the batch.+ return {+ ...base,+ ok: false,+ skipped: true,+ reason: body?.error || 'backend-refused',+ detail: body?.message}+ }- return { ...base, ok: true, detail: body?.message || 'update started' }+ return { ...base, ok: true, detail: body?.message || 'update started' }} catch (error: any) {return { ...base, ok: false, error: String(error?.message || error) }}@@ -18102,8 +18111,7 @@ const streamThrottle = createStreamThrottle(undefined, undefined, {// #94865 is specific to native Wayland fullscreen surfaces. Reuse the same// Ozone resolver as the rest of Desktop so XWayland/macOS/Windows retain the// normal idle throttling contract.- keepFullscreenPainting:- process.platform === 'linux' && linuxOzoneBackend(process.env, process.argv) === 'wayland'+ keepFullscreenPainting: process.platform === 'linux' && linuxOzoneBackend(process.env, process.argv) === 'wayland'})function updateStreamThrottleFromActiveWork() {diff --git a/apps/desktop/electron/media-capture-permission.test.ts b/apps/desktop/electron/media-capture-permission.test.tsindex 02e91788bb9..be4e32fbeb5 100644--- a/apps/desktop/electron/media-capture-permission.test.ts+++ b/apps/desktop/electron/media-capture-permission.test.ts@@ -42,13 +42,7 @@ describe('isMediaCapturePermission', () => {// Invariant for the shared predicate: every permission string the sync// check handler can see must resolve identically to the async request// handler's decision for the same string with no metadata.- for (const permission of [- 'media',- 'audioCapture',- 'videoCapture',- 'fullscreen',- 'automatic-fullscreen',- ] as const) {+ for (const permission of ['media', 'audioCapture', 'videoCapture', 'fullscreen', 'automatic-fullscreen'] as const) {expect(isMediaCapturePermission(permission, undefined)).toBe(true)}})diff --git a/apps/desktop/electron/media-capture-permission.ts b/apps/desktop/electron/media-capture-permission.tsindex 2f3602320d5..2b257692908 100644--- a/apps/desktop/electron/media-capture-permission.ts+++ b/apps/desktop/electron/media-capture-permission.ts@@ -18,12 +18,7 @@ import type {* instead of scattering casts.*/export type MediaCapturePermissionString =- | 'media'- | 'audioCapture'- | 'videoCapture'- | 'fullscreen'- | 'automatic-fullscreen'- | (string & Record<never, never>)+ 'media' | 'audioCapture' | 'videoCapture' | 'fullscreen' | 'automatic-fullscreen' | (string & Record<never, never>)/*** The metadata a media permission request may carry.@@ -79,7 +74,7 @@ const carriesMediaTypes = (details: unknown): details is MediaCapturePermissionD// the same predicate is what keeps the two paths from drifting apart again.export function isMediaCapturePermission(permission: MediaCapturePermissionString,- details: MediaPermissionRequestDetails | undefined,+ details: MediaPermissionRequestDetails | undefined): boolean {// HTML5 video/audio fullscreen asks the request handler for 'fullscreen'// and the check handler for 'automatic-fullscreen'. Both must be alloweddiff --git a/apps/desktop/electron/pool-retire.test.ts b/apps/desktop/electron/pool-retire.test.tsindex 6774b754a7f..4453afe32ac 100644--- a/apps/desktop/electron/pool-retire.test.ts+++ b/apps/desktop/electron/pool-retire.test.ts@@ -98,6 +98,7 @@ test('retireIdle honours the pinned-tier eligibility override while every otherlastStreamedAt: outcome === 'fresh-streamed' ? Date.now() - 5 * 60_000 : Date.now() - 2 * 60 * 60_000,...(outcome === 'mid-turn' ? { activeTurn: true } : {})}+const pool = new Map([['pinned', entry]])const stopped: string[] = []@@ -114,10 +115,8 @@ test('retireIdle honours the pinned-tier eligibility override while every other})try {- await retirer.retireIdle(- 'pinned',- 10 * 60_000,- candidate => Boolean(candidate.lastStreamedAt && Date.now() - (candidate.lastStreamedAt || 0) > 60 * 60_000)+ await retirer.retireIdle('pinned', 10 * 60_000, candidate =>+ Boolean(candidate.lastStreamedAt && Date.now() - (candidate.lastStreamedAt || 0) > 60 * 60_000))} finally {retirer.dispose()@@ -126,10 +125,6 @@ test('retireIdle honours the pinned-tier eligibility override while every other// stale-streamed (keepalive-fresh, no streamed turn for 2h) retires;// fresh-streamed fails the override and stays; mid-turn is vetoed by the// retirer even though the override said yes.- assert.deepEqual(- stopped,- outcome === 'stale-streamed' ? ['pinned'] : [],- outcome- )+ assert.deepEqual(stopped, outcome === 'stale-streamed' ? ['pinned'] : [], outcome)}})diff --git a/apps/desktop/electron/pool-retire.ts b/apps/desktop/electron/pool-retire.tsindex 70f67f02938..68819f4ce86 100644--- a/apps/desktop/electron/pool-retire.ts+++ b/apps/desktop/electron/pool-retire.ts@@ -167,10 +167,8 @@ export function createPoolRetirer<E extends PoolRetireEntry>(deps: PoolRetirerDe// (lastStreamedAt) so a keepalive-fresh but stream-idle entry can// still be retired (#105239). The retirer keeps every other// safeguard: identity, admission permit, activeTurn veto, proof probe.- return retire(- key,- entry,- () => idleEligibility ? idleEligibility(entry) : Date.now() - (entry.lastActiveAt || 0) > idleMs+ return retire(key, entry, () =>+ idleEligibility ? idleEligibility(entry) : Date.now() - (entry.lastActiveAt || 0) > idleMs)}),evictTo: (keep: number, freshMs: number) =>diff --git a/apps/desktop/electron/preview-guest-escape.test.ts b/apps/desktop/electron/preview-guest-escape.test.tsindex 8142963f55e..87a6fab6069 100644--- a/apps/desktop/electron/preview-guest-escape.test.ts+++ b/apps/desktop/electron/preview-guest-escape.test.ts@@ -19,9 +19,7 @@ describe('previewGuestInputAction', () => {})it('also accepts the Cmd+Shift+W (macOS) form', () => {- expect(previewGuestInputAction({ meta: true, shift: true, key: 'W', type: 'keyDown' }, true)).toBe(- 'close-preview'- )+ expect(previewGuestInputAction({ meta: true, shift: true, key: 'W', type: 'keyDown' }, true)).toBe('close-preview')})it('leaves every other key for the page', () => {diff --git a/apps/desktop/electron/quit-guard.test.ts b/apps/desktop/electron/quit-guard.test.tsindex bf2aefe6b0b..a3506e3faaf 100644--- a/apps/desktop/electron/quit-guard.test.ts+++ b/apps/desktop/electron/quit-guard.test.ts@@ -2,7 +2,14 @@ import assert from 'node:assert/strict'import { test } from 'vitest'-import { type ActiveWork, backendOwnedByApp, mergeActiveWork, normalizeActiveWork, quitPromptFor, shouldGuardWindowClose } from './quit-guard'+import {+ type ActiveWork,+ backendOwnedByApp,+ mergeActiveWork,+ normalizeActiveWork,+ quitPromptFor,+ shouldGuardWindowClose+} from './quit-guard'test('normalizeActiveWork drops junk and keeps the count at least the title count', () => {assert.deepEqual(normalizeActiveWork(null), { count: 0, titles: [] })@@ -133,6 +140,9 @@ test('mergeActiveWork keeps a live count when the per-window map reads empty', (test('an idle cache does not resurrect finished work', () => {// The cache is only refreshed by real publishes, so count=0 clears it.- const merged = mergeActiveWork([{ count: 0, titles: [] }, { count: 0, titles: [] }])+ const merged = mergeActiveWork([+ { count: 0, titles: [] },+ { count: 0, titles: [] }+ ])assert.equal(merged.count, 0)})diff --git a/apps/desktop/electron/remote-oauth-ticket.test.ts b/apps/desktop/electron/remote-oauth-ticket.test.tsindex acd5a9be951..4070cea1a5d 100644--- a/apps/desktop/electron/remote-oauth-ticket.test.ts+++ b/apps/desktop/electron/remote-oauth-ticket.test.ts@@ -80,16 +80,24 @@ describe('resolveRemoteOauthTicket', () => {it('distinguishes transport failure classes in user-facing copy (timeout vs refused vs other)', async () => {const mintThrowing = (cause: unknown) =>- resolveRemoteOauthTicket('https://gateway.example.com', {}, {- hasNativeSession: () => false,- mintGatewayWsTicket: async () => {- throw cause+ resolveRemoteOauthTicket(+ 'https://gateway.example.com',+ {},+ {+ hasNativeSession: () => false,+ mintGatewayWsTicket: async () => {+ throw cause+ }}- }).catch((failure: Error) => failure)+ ).catch((failure: Error) => failure)const timeout = await mintThrowing(Object.assign(new Error('timeout of 8000ms exceeded'), { code: 'ETIMEDOUT' }))- const refused = await mintThrowing(Object.assign(new Error('connect ECONNREFUSED 10.0.0.5:8446'), { code: 'ECONNREFUSED' }))- const dns = await mintThrowing(Object.assign(new Error('getaddrinfo ENOTFOUND gw.example.com'), { code: 'ENOTFOUND' }))+ const refused = await mintThrowing(+ Object.assign(new Error('connect ECONNREFUSED 10.0.0.5:8446'), { code: 'ECONNREFUSED' })+ )+ const dns = await mintThrowing(+ Object.assign(new Error('getaddrinfo ENOTFOUND gw.example.com'), { code: 'ENOTFOUND' })+ )const ambiguous = await mintThrowing(new Error('socket hang up'))const http500 = await mintThrowing(Object.assign(new Error('500: upstream'), { statusCode: 500 }))@@ -99,7 +107,13 @@ describe('resolveRemoteOauthTicket', () => {expect(ambiguous).toBeInstanceOf(Error)expect(http500).toBeInstanceOf(Error)- if (!(timeout instanceof Error && refused instanceof Error && dns instanceof Error && ambiguous instanceof Error && http500 instanceof Error)) {+ if (!(+ timeout instanceof Error &&+ refused instanceof Error &&+ dns instanceof Error &&+ ambiguous instanceof Error &&+ http500 instanceof Error+ )) {throw new Error('Expected transport rejections')}@@ -123,5 +137,4 @@ describe('resolveRemoteOauthTicket', () => {expect((err as Error & { needsOauthLogin?: boolean }).needsOauthLogin).toBeUndefined()}})-})diff --git a/apps/desktop/electron/remote-oauth-ticket.ts b/apps/desktop/electron/remote-oauth-ticket.tsindex 393830a3946..0dc92de6822 100644--- a/apps/desktop/electron/remote-oauth-ticket.ts+++ b/apps/desktop/electron/remote-oauth-ticket.ts@@ -33,11 +33,7 @@ export async function resolveRemoteOauthTicket(// causes behind one sentence (#98647).throw (makeNousCloudBackendDownError(baseUrl, error) ??- gatewayTicketFailure(- error,- oauthTicketFailureAuthMessage(hadNativeSession),- gatewayTicketTransportMessage(error)- )+ gatewayTicketFailure(error, oauthTicketFailureAuthMessage(hadNativeSession), gatewayTicketTransportMessage(error)))}}diff --git a/apps/desktop/electron/singleton-lock.ts b/apps/desktop/electron/singleton-lock.tsindex 3498459277f..6b087c28b4d 100644--- a/apps/desktop/electron/singleton-lock.ts+++ b/apps/desktop/electron/singleton-lock.ts@@ -11,18 +11,17 @@ import path from 'node:path'* shared home directory: a target that does not start with this host's* name is not ours to judge, so it parses to null and stays in place.*/-export function parseSingletonLockPid(- linkTarget: string | null | undefined,- hostname: string-): number | null {+export function parseSingletonLockPid(linkTarget: string | null | undefined, hostname: string): number | null {if (typeof linkTarget !== 'string' || linkTarget === '') {return null}+const prefix = `${hostname}-`if (!linkTarget.startsWith(prefix)) {return null}+const tail = linkTarget.slice(prefix.length)const pid = Number.parseInt(tail, 10)@@ -100,6 +99,7 @@ export function removeStaleSingletonLock(if ((deps.platform ?? process.platform) !== 'linux') {return null}+const hostname = deps.hostname ?? os.hostname()const readProcState = deps.readProcState ?? readLinuxProcStatediff --git a/apps/desktop/electron/stream-throttle.test.ts b/apps/desktop/electron/stream-throttle.test.tsindex a04c35cab1d..aae539def99 100644--- a/apps/desktop/electron/stream-throttle.test.ts+++ b/apps/desktop/electron/stream-throttle.test.ts@@ -152,15 +152,17 @@ test('closed and destroyed windows drop out without throwing', () => {assert.deepEqual(closedWin.calls, [true])})-function makeFullscreenableWindow() {const win = makeWindow()let fullscreen = false+const ext = win as ReturnType<typeof makeWindow> & {isFullScreen: () => booleangoFullscreen(on: boolean): void}+ext.isFullScreen = () => fullscreen+ext.goFullscreen = (on: boolean) => {fullscreen = onwin.listeners.get(on ? 'enter-full-screen' : 'leave-full-screen')?.()diff --git a/apps/desktop/electron/stream-throttle.ts b/apps/desktop/electron/stream-throttle.tsindex 432319c9904..ad61b390443 100644--- a/apps/desktop/electron/stream-throttle.ts+++ b/apps/desktop/electron/stream-throttle.ts@@ -141,6 +141,7 @@ export function createStreamThrottle(timers.clearTimeout(trailing)trailing = null}+if (!unthrottled) {unthrottled = trueapplyAll()diff --git a/apps/desktop/electron/update-gate.test.ts b/apps/desktop/electron/update-gate.test.tsindex 6d85c985868..b02f738dc56 100644--- a/apps/desktop/electron/update-gate.test.ts+++ b/apps/desktop/electron/update-gate.test.ts@@ -177,10 +177,7 @@ test('returns timeout when the gate never opens', async () => {// ---------------------------------------------------------------------------test('a failed receipt outranks a live marker as the reported reason', () => {- assert.equal(- updateGateReason({ ...deps(true, false), hasFailedReceipt: () => true }),- 'failed-receipt'- )+ assert.equal(updateGateReason({ ...deps(true, false), hasFailedReceipt: () => true }), 'failed-receipt')})test('a failed receipt without a live marker keeps the gate open', () => {@@ -191,10 +188,7 @@ test('a failed receipt without a live marker keeps the gate open', () => {test('a running or partial receipt keeps the marker reason', () => {// Only a TERMINAL failure is actionable: "running" must keep parking.- assert.equal(- updateGateReason({ ...deps(true, false), hasFailedReceipt: () => false }),- 'marker'- )+ assert.equal(updateGateReason({ ...deps(true, false), hasFailedReceipt: () => false }), 'marker')})test('abandonOn returns abandoned instead of parking on a failed receipt', async () => {diff --git a/apps/desktop/electron/update-marker.test.ts b/apps/desktop/electron/update-marker.test.tsindex ed5537dcffc..a470de58376 100644--- a/apps/desktop/electron/update-marker.test.ts+++ b/apps/desktop/electron/update-marker.test.ts@@ -140,6 +140,7 @@ test('posixProcessState: own pid is probeable and not a zombie; dead pid is unknif (process.platform === 'win32') {// Windows has no zombie state and no ps stat lane; the probe is a no-op.assert.equal(posixProcessState(process.pid), null)+return}diff --git a/apps/desktop/electron/wsl-clipboard-image.test.ts b/apps/desktop/electron/wsl-clipboard-image.test.tsindex b9795b40f8a..b12405f82d1 100644--- a/apps/desktop/electron/wsl-clipboard-image.test.ts+++ b/apps/desktop/electron/wsl-clipboard-image.test.ts@@ -70,10 +70,7 @@ test('readWslWindowsClipboardImage decodes the first candidate that returns a PN'Bypass','-EncodedCommand'])- assert.equal(- Buffer.from(calls[0].args.at(-1), 'base64').toString('utf16le'),- WSL_CLIPBOARD_IMAGE_SCRIPT- )+ assert.equal(Buffer.from(calls[0].args.at(-1), 'base64').toString('utf16le'), WSL_CLIPBOARD_IMAGE_SCRIPT)})test('readWslWindowsClipboardImage returns null and stops when stdout is empty (no image)', () => {diff --git a/apps/desktop/src/app/chat/composer/attachments.tsx b/apps/desktop/src/app/chat/composer/attachments.tsxindex 79b25c090ee..8ebadc60726 100644--- a/apps/desktop/src/app/chat/composer/attachments.tsx+++ b/apps/desktop/src/app/chat/composer/attachments.tsx@@ -23,7 +23,10 @@ export function AttachmentList({onRemove?: (id: string) => void}) {return (- <div className="flex max-w-full flex-shrink-0 flex-wrap gap-1.5 px-1 pt-1 overflow-hidden" data-slot="composer-attachments">+ <div+ className="flex max-w-full flex-shrink-0 flex-wrap gap-1.5 px-1 pt-1 overflow-hidden"+ data-slot="composer-attachments"+ >{attachments.filter(Boolean).map(attachment => (<AttachmentPillattachment={attachment}diff --git a/apps/desktop/src/app/chat/composer/hooks/use-composer-draft.test.tsx b/apps/desktop/src/app/chat/composer/hooks/use-composer-draft.test.tsxindex 8b111fdf93e..60f1988aa3e 100644--- a/apps/desktop/src/app/chat/composer/hooks/use-composer-draft.test.tsx+++ b/apps/desktop/src/app/chat/composer/hooks/use-composer-draft.test.tsx@@ -71,11 +71,13 @@ describe('useComposerDraft — attachment scope stays coherent with the committemainComposerScope.clear()clearSessionDraft('session-A')clearSessionDraft('session-B')+// Fresh-draft lifecycles rotate per test; the afterEach must sweep the// whole map or one test's abandoned bucket leaks into the next.for (const scope of ['session-created', NEW_SESSION_DRAFT_KEY, $freshDraftKey.get()]) {clearSessionDraft(scope)}+rotateFreshDraftKey()delete (window as unknown as { hermesDesktop?: unknown }).hermesDesktopvi.unstubAllGlobals()@@ -193,7 +195,7 @@ describe('useComposerDraft — attachment scope stays coherent with the committeclearSessionDraft(null)})- it('isolates two concurrent new-chat lifecycles: the second fresh draft never shows the first one\'s text (#66662)', () => {+ it("isolates two concurrent new-chat lifecycles: the second fresh draft never shows the first one's text (#66662)", () => {const firstKey = rotateFreshDraftKey()const secondKey = rotateFreshDraftKey()@@ -217,7 +219,7 @@ describe('useComposerDraft — attachment scope stays coherent with the committeclearSessionDraft(secondKey)})- it('re-homes the ACTIVE lifecycle\'s draft onto the session its first send creates (#66662)', () => {+ it("re-homes the ACTIVE lifecycle's draft onto the session its first send creates (#66662)", () => {const key = rotateFreshDraftKey()// The user typed in the current new chat; the swap cleanup stashed it@@ -249,7 +251,7 @@ describe('useComposerDraft — attachment scope stays coherent with the committeclearSessionDraft('session-created')})- it('keys a fresh chat\'s live stash under its lifecycle key, not the shared bucket (#66662)', () => {+ it("keys a fresh chat's live stash under its lifecycle key, not the shared bucket (#66662)", () => {const key = rotateFreshDraftKey()const { unmount } = render(diff --git a/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation.test.tsx b/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation.test.tsxindex 3ce59dbd895..19ad0c0b7d2 100644--- a/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation.test.tsx+++ b/apps/desktop/src/app/chat/composer/hooks/use-voice-conversation.test.tsx@@ -175,6 +175,7 @@ describe('useVoiceConversation full-duplex barge-in', () => {it('never arms the barge monitor when voice.barge_in is false (#126708)', async () => {$bargeInEnabled.set(false)+try {const { hook } = renderConversation()diff --git a/apps/desktop/src/app/chat/composer/url-refs.test.ts b/apps/desktop/src/app/chat/composer/url-refs.test.tsindex 01699c42ab7..995e1736753 100644--- a/apps/desktop/src/app/chat/composer/url-refs.test.ts+++ b/apps/desktop/src/app/chat/composer/url-refs.test.ts@@ -120,7 +120,8 @@ describe('linkifyUrls', () => {// destination into a reference marker leaves the link pointing at the// marker instead of the href.it('preserves the destination of a Markdown link', () => {- const text = 'Show this retained source without using tools: [Mission Control issue 7](https://example.invalid/projects/synthetic/issues/7)'+ const text =+ 'Show this retained source without using tools: [Mission Control issue 7](https://example.invalid/projects/synthetic/issues/7)'expect(linkifyUrls(text)).toBe(text)})diff --git a/apps/desktop/src/app/chat/right-rail/preview-pane.tsx b/apps/desktop/src/app/chat/right-rail/preview-pane.tsxindex 83289e9999d..a295515a7c2 100644--- a/apps/desktop/src/app/chat/right-rail/preview-pane.tsx+++ b/apps/desktop/src/app/chat/right-rail/preview-pane.tsx@@ -776,29 +776,26 @@ export function PreviewPane({// surface inside the pane (the browser bar's address input, an annotate// note), Escape keeps its native meaning for that control and does not// also navigate.- const onPaneKeyDown = useCallback(- (event: React.KeyboardEvent<HTMLElement>) => {- if (event.key !== 'Escape') {- return- }+ const onPaneKeyDown = useCallback((event: React.KeyboardEvent<HTMLElement>) => {+ if (event.key !== 'Escape') {+ return+ }- const target = event.target as HTMLElement | null+ const target = event.target as HTMLElement | null- if (target?.closest?.('input, textarea, [contenteditable="true"], [contenteditable=""]')) {- return- }+ if (target?.closest?.('input, textarea, [contenteditable="true"], [contenteditable=""]')) {+ return+ }- const webview = webviewRef.current+ const webview = webviewRef.current- if (!webview?.canGoBack?.()) {- return- }+ if (!webview?.canGoBack?.()) {+ return+ }- event.preventDefault()- webview.goBack?.()- },- []- )+ event.preventDefault()+ webview.goBack?.()+ }, [])// Gestures that land on the app's chrome (⌘R from the address bar, a mouse// button over the frame). A gesture made INSIDE the page is answered by maindiff --git a/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsx b/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsxindex 1d77acb7eb3..60a17d5df7e 100644--- a/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsx+++ b/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsx@@ -94,9 +94,7 @@ function resolveRuntimeIdForStored(storedSessionId: string): null | string {}}- const tileRuntimeId = $sessionTiles- .get()- .find(tile => tile.storedSessionId === storedSessionId)?.runtimeId+ const tileRuntimeId = $sessionTiles.get().find(tile => tile.storedSessionId === storedSessionId)?.runtimeIdif (tileRuntimeId) {return tileRuntimeIddiff --git a/apps/desktop/src/app/contrib/hooks/use-background-sync.test.tsx b/apps/desktop/src/app/contrib/hooks/use-background-sync.test.tsxindex 8092d152ad6..a8cc4e3d950 100644--- a/apps/desktop/src/app/contrib/hooks/use-background-sync.test.tsx+++ b/apps/desktop/src/app/contrib/hooks/use-background-sync.test.tsx@@ -156,8 +156,7 @@ describe('useBackgroundSync keeps a quiet working turn live', () => {noteSessionEvent('rt-quiet')}- const cardShown = () =>- Boolean($sessionStates.get()['rt-quiet']?.messages.some(message => message.errorSurface))+ const cardShown = () => Boolean($sessionStates.get()['rt-quiet']?.messages.some(message => message.errorSurface))beforeEach(() => {vi.useFakeTimers()diff --git a/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx b/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsxindex ec931d359d1..d8e60c54868 100644--- a/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx+++ b/apps/desktop/src/app/contrib/hooks/use-desktop-integrations.test.tsx@@ -229,7 +229,7 @@ describe('useDesktopIntegrations', () => {})describe('peer instance windows (#74948)', () => {- it('does not restore the primary window\'s remembered session into a peer window', () => {+ it("does not restore the primary window's remembered session into a peer window", () => {// Ctrl+Shift+N opens a peer that shares the profile's remembered// navigation (the primary window writes it continuously), but the peer// must boot into its own blank fresh-draft chat, not the session thediff --git a/apps/desktop/src/app/right-sidebar/terminal/terminals.test.ts b/apps/desktop/src/app/right-sidebar/terminal/terminals.test.tsindex 801d78baca0..5ca4ce4b5f1 100644--- a/apps/desktop/src/app/right-sidebar/terminal/terminals.test.ts+++ b/apps/desktop/src/app/right-sidebar/terminal/terminals.test.ts@@ -282,6 +282,7 @@ describe('shared WebGL atlas refresh fan-out', () => {refresh: () => ops.push('refresh-A'),rows: 24}+const termB = {refresh: () => ops.push('refresh-B'),rows: 24@@ -297,8 +298,8 @@ describe('shared WebGL atlas refresh fan-out', () => {// Both clears must precede both refreshes. If a clear ran after a refresh,// that terminal's rebuilt model would reference freed atlas rows.- const clearIndices = ops.map((op, i) => op === 'clear' ? i : -1).filter(i => i >= 0)- const refreshIndices = ops.map((op, i) => op.startsWith('refresh-') ? i : -1).filter(i => i >= 0)+ const clearIndices = ops.map((op, i) => (op === 'clear' ? i : -1)).filter(i => i >= 0)+ const refreshIndices = ops.map((op, i) => (op.startsWith('refresh-') ? i : -1)).filter(i => i >= 0)expect(clearIndices).toHaveLength(2)expect(refreshIndices).toHaveLength(2)@@ -311,8 +312,13 @@ describe('shared WebGL atlas refresh fan-out', () => {const broken = { refresh: vi.fn(), rows: 24 }const healthy = { refresh: vi.fn(), rows: 24 }const getWebgl = () => ({ clearTextureAtlas: vi.fn() }) as never+const getDeadWebgl = () =>- ({ clearTextureAtlas: () => { throw new Error('webgl context lost') } }) as never+ ({+ clearTextureAtlas: () => {+ throw new Error('webgl context lost')+ }+ }) as neverregisterWebglRefresh(broken as never, getDeadWebgl)registerWebglRefresh(healthy as never, getWebgl)@@ -367,4 +373,3 @@ describe('shared WebGL atlas refresh fan-out', () => {}})})-diff --git a/apps/desktop/src/app/right-sidebar/terminal/terminals.ts b/apps/desktop/src/app/right-sidebar/terminal/terminals.tsindex a3e1d672d0a..f7035709d57 100644--- a/apps/desktop/src/app/right-sidebar/terminal/terminals.ts+++ b/apps/desktop/src/app/right-sidebar/terminal/terminals.ts@@ -28,10 +28,7 @@ const webglRefreshFns = new Map<Terminal, () => void>()/** Register a terminal's atlas-rebuild+redraw so sibling refreshes reach it.* Returns an unregister function (call on dispose). */-export function registerWebglRefresh(- term: Terminal,- getWebgl: () => WebglAddon | null-): () => void {+export function registerWebglRefresh(term: Terminal, getWebgl: () => WebglAddon | null): () => void {webglClearFns.set(term, () => {try {getWebgl()?.clearTextureAtlas()diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.test.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.test.tsindex 28377c2040b..d1288f50b44 100644--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.test.ts+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.test.ts@@ -181,9 +181,7 @@ describe('preview action request routing', () => {describe('window.read claim tolerance (#121609)', () => {beforeEach(() => {- setSessions([- { id: 'stored-a', title: 'HUD conversation', _lineage_root_id: 'root-a' } as SessionInfo- ])+ setSessions([{ id: 'stored-a', title: 'HUD conversation', _lineage_root_id: 'root-a' } as SessionInfo])})afterEach(() => {@@ -199,10 +197,21 @@ describe('window.read claim tolerance (#121609)', () => {// window has the conversation selected and its runtime id lineage-maps.setSelectedStoredSessionId('stored-a')- expect(previewSessionRoute({ activeSessionId: 'runtime-x', method: 'window.read', replayed: false, sessionId: 'root-a' })).toBe('run')- expect(previewSessionRoute({ activeSessionId: null, method: 'window.read', replayed: false, sessionId: 'root-a' })).toBe('run')+ expect(+ previewSessionRoute({ activeSessionId: 'runtime-x', method: 'window.read', replayed: false, sessionId: 'root-a' })+ ).toBe('run')+ expect(+ previewSessionRoute({ activeSessionId: null, method: 'window.read', replayed: false, sessionId: 'root-a' })+ ).toBe('run')// Plain stored-id ask (no rotation): selected matches directly.- expect(previewSessionRoute({ activeSessionId: 'runtime-x', method: 'window.read', replayed: false, sessionId: 'stored-a' })).toBe('run')+ expect(+ previewSessionRoute({+ activeSessionId: 'runtime-x',+ method: 'window.read',+ replayed: false,+ sessionId: 'stored-a'+ })+ ).toBe('run')})it('maps an unknown runtime id through the session-state cache to the shown conversation', () => {@@ -211,14 +220,30 @@ describe('window.read claim tolerance (#121609)', () => {setSelectedStoredSessionId('stored-a')$sessionStates.set({ 'runtime-rotated': createClientSessionState('stored-a') })- expect(previewSessionRoute({ activeSessionId: 'runtime-rotated', method: 'window.read', replayed: false, sessionId: 'runtime-rotated' })).toBe('run')+ expect(+ previewSessionRoute({+ activeSessionId: 'runtime-rotated',+ method: 'window.read',+ replayed: false,+ sessionId: 'runtime-rotated'+ })+ ).toBe('run')})it('claims for a tile whose stored session lineage-matches the asked id', () => {$sessionTiles.set([{ runtimeId: 'tile-runtime', storedSessionId: 'stored-a' } as never])- expect(previewSessionRoute({ activeSessionId: 'session-b', method: 'window.read', replayed: false, sessionId: 'root-a' })).toBe('run')- expect(previewSessionRoute({ activeSessionId: 'session-b', method: 'window.read', replayed: false, sessionId: 'stored-a' })).toBe('run')+ expect(+ previewSessionRoute({ activeSessionId: 'session-b', method: 'window.read', replayed: false, sessionId: 'root-a' })+ ).toBe('run')+ expect(+ previewSessionRoute({+ activeSessionId: 'session-b',+ method: 'window.read',+ replayed: false,+ sessionId: 'stored-a'+ })+ ).toBe('run')})it('keeps every other window-owned method on the strict host check even when the identity is tolerated', () => {@@ -228,23 +253,57 @@ describe('window.read claim tolerance (#121609)', () => {// converting later tour actions into 45s waits (review of #121715).setSelectedStoredSessionId('stored-a')- expect(previewSessionRoute({ activeSessionId: 'runtime-x', method: 'preview.read', replayed: false, sessionId: 'root-a' })).toBe('ignore')- expect(previewSessionRoute({ activeSessionId: 'runtime-x', method: 'terminal.read', replayed: false, sessionId: 'root-a' })).toBe('ignore')- expect(previewSessionRoute({ activeSessionId: 'runtime-x', method: 'preview.act', replayed: false, sessionId: 'root-a' })).toBe('ignore')- expect(previewSessionRoute({ activeSessionId: 'runtime-x', method: 'tour', replayed: false, sessionId: 'root-a' })).toBe('ignore')+ expect(+ previewSessionRoute({+ activeSessionId: 'runtime-x',+ method: 'preview.read',+ replayed: false,+ sessionId: 'root-a'+ })+ ).toBe('ignore')+ expect(+ previewSessionRoute({+ activeSessionId: 'runtime-x',+ method: 'terminal.read',+ replayed: false,+ sessionId: 'root-a'+ })+ ).toBe('ignore')+ expect(+ previewSessionRoute({ activeSessionId: 'runtime-x', method: 'preview.act', replayed: false, sessionId: 'root-a' })+ ).toBe('ignore')+ expect(+ previewSessionRoute({ activeSessionId: 'runtime-x', method: 'tour', replayed: false, sessionId: 'root-a' })+ ).toBe('ignore')})it('never claims a conversation this window does not show', () => {setSelectedStoredSessionId('stored-a')- expect(previewSessionRoute({ activeSessionId: 'session-b', method: 'window.read', replayed: false, sessionId: 'session-unrelated' })).toBe('ignore')- expect(previewSessionRoute({ activeSessionId: 'session-b', method: 'window.read', replayed: false, sessionId: 'root-other' })).toBe('ignore')+ expect(+ previewSessionRoute({+ activeSessionId: 'session-b',+ method: 'window.read',+ replayed: false,+ sessionId: 'session-unrelated'+ })+ ).toBe('ignore')+ expect(+ previewSessionRoute({+ activeSessionId: 'session-b',+ method: 'window.read',+ replayed: false,+ sessionId: 'root-other'+ })+ ).toBe('ignore')})it('claims nothing without a shown conversation — a background session stays unclaimed', () => {// No selection, no tiles: the tolerant branch must stay inert so a window// midsession cannot answer for a background conversation it never showed.- expect(previewSessionRoute({ activeSessionId: 'session-b', method: 'window.read', replayed: false, sessionId: 'root-a' })).toBe('ignore')+ expect(+ previewSessionRoute({ activeSessionId: 'session-b', method: 'window.read', replayed: false, sessionId: 'root-a' })+ ).toBe('ignore')})it('lets a shown-conversation window answer a window.read end to end without a resume', async () => {diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.tsindex e09157a6f78..53e9d4d7681 100644--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts@@ -173,10 +173,7 @@ export function windowReadClaimsSession(sessionId: string, activeSessionId: nullconst sessions = $sessions.get()- const shown = [- $selectedStoredSessionId.get(),- ...$sessionTiles.get().map(tile => tile.storedSessionId)- ]+ const shown = [$selectedStoredSessionId.get(), ...$sessionTiles.get().map(tile => tile.storedSessionId)]return shown.some(stored =>diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.test.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.test.tsindex f6f493d0465..a201d39e305 100644--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.test.ts+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.test.ts@@ -81,8 +81,10 @@ describe('gateway `error` event → error card + toast', () => {// agent init with no usable provider: the gateway stamps code=provider_not_configured// (tui_gateway/server.py). The fix for this chat is setup, so the user must land there and// not on a toast — even after the sentence is reworded again.- const { ctx } = errorContext('Hermes could not start the assistant. Details: something new we never matched.',- 'provider_not_configured')+ const { ctx } = errorContext(+ 'Hermes could not start the assistant. Details: something new we never matched.',+ 'provider_not_configured'+ )handleStatusEvent(ctx)diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.tsindex bd21962032e..994389b8ee5 100644--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.ts+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/status.ts@@ -283,8 +283,7 @@ export function handleStatusEvent(ctx: GatewayEventContext): boolean {// The gateway's own verdict when it sent one (agent init with no usable provider), else the// sentence: a blank install must reach onboarding, not a toast it cannot act on.- const looksLikeProviderSetup =- isProviderSetupErrorCode(payload?.code) || isProviderSetupErrorMessage(errorMessage)+ const looksLikeProviderSetup = isProviderSetupErrorCode(payload?.code) || isProviderSetupErrorMessage(errorMessage)// The gateway's `error` event carries no error_surface (prompt_turn.py// emits it for pre-turn refusals). Recover the two codes it CAN mean fromdiff --git a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsxindex 0e5ebd44a40..41c20060df2 100644--- a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx+++ b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx@@ -6119,7 +6119,7 @@ describe('routed fresh chat keeps its exact owner across turns', () => {it('can preserve the current fresh draft key when explicitly requested', async () => {let handle: HarnessHandle | null = null- const requestGateway = vi.fn(async () => ({} as never))+ const requestGateway = vi.fn(async () => ({}) as never)render(<Harness onReady={h => (handle = h)} requestGateway={requestGateway} />)await waitFor(() => expect(handle).not.toBeNull())diff --git a/apps/desktop/src/app/session/hooks/use-session-actions/streamed-reply-survives-sync.test.ts b/apps/desktop/src/app/session/hooks/use-session-actions/streamed-reply-survives-sync.test.tsindex 0371723d9f0..8957601fa17 100644--- a/apps/desktop/src/app/session/hooks/use-session-actions/streamed-reply-survives-sync.test.ts+++ b/apps/desktop/src/app/session/hooks/use-session-actions/streamed-reply-survives-sync.test.ts@@ -164,7 +164,7 @@ describe('preserveLocalPendingTurnMessages — divergent same-turn store partialexpect(merged[1].parts.some(part => part.type === 'tool-call')).toBe(true)})- it('does not let a pending stream claim a different turn\'s committed answer at the same ordinal', () => {+ it("does not let a pending stream claim a different turn's committed answer at the same ordinal", () => {// No shared tool-call ids and no folded prefix relation: the committed row// is an earlier answer to the same resent prompt. The widening must not// let the unrelated pending stream take its slot, and the stale-copy rulediff --git a/apps/desktop/src/app/shell/system-resources-statusbar.tsx b/apps/desktop/src/app/shell/system-resources-statusbar.tsxindex e021a883e37..f81b3c9b482 100644--- a/apps/desktop/src/app/shell/system-resources-statusbar.tsx+++ b/apps/desktop/src/app/shell/system-resources-statusbar.tsx@@ -96,6 +96,7 @@ export function useSystemResourcesStatusbarItem(): StatusbarItem {window.clearTimeout(timer)timer = null}+void poll()}}diff --git a/apps/desktop/src/components/assistant-ui/directive-text.tsx b/apps/desktop/src/components/assistant-ui/directive-text.tsxindex 1abbb64f518..3b2ac91d614 100644--- a/apps/desktop/src/components/assistant-ui/directive-text.tsx+++ b/apps/desktop/src/components/assistant-ui/directive-text.tsx@@ -17,7 +17,13 @@ import { useSessionLinkTitle } from '@/lib/session-link-title'import { parseSessionRefValue, sessionRefFallbackLabel } from '@/lib/session-refs'import { cn } from '@/lib/utils'-import { referenceKind, referenceRe, referenceStyle, unwrapReferenceValue, WIRE_REFERENCE_KINDS } from './reference-kinds'+import {+ referenceKind,+ referenceRe,+ referenceStyle,+ unwrapReferenceValue,+ WIRE_REFERENCE_KINDS+} from './reference-kinds'const HERMES_REF_TYPES = WIRE_REFERENCE_KINDStype HermesRefType = (typeof HERMES_REF_TYPES)[number]@@ -147,7 +153,6 @@ const SLASH_SKILL_RE = /(?<=^|\s)\/([a-zA-Z][\w-]*)(?![\w-]*\/)/g// qualify: a plain-http/data markdown image is foreign input and stays text.const BLOB_MARKDOWN_IMAGE_RE = /!\[([^\]\n]{0,512})\]\((blob:[^)\s]{1,2048})\)/g-function needsQuoting(value: string): boolean {return /[\s()[\]{}<>"'`]/.test(value)}diff --git a/apps/desktop/src/components/chat/preview-attachment.test.tsx b/apps/desktop/src/components/chat/preview-attachment.test.tsxindex e5ccedc0cd6..f38f8509f35 100644--- a/apps/desktop/src/components/chat/preview-attachment.test.tsx+++ b/apps/desktop/src/components/chat/preview-attachment.test.tsx@@ -75,9 +75,7 @@ describe('PreviewAttachment local target classification (#101683)', () => {})it('opens a Windows file:///C:/... directory link natively with no Download or preview action', async () => {- const { openDir, revealPath } = mountDesktopStub(() =>- fileTarget('C:/Users/E/reports/historical', 'directory')- )+ const { openDir, revealPath } = mountDesktopStub(() => fileTarget('C:/Users/E/reports/historical', 'directory'))render(<PreviewAttachment target="file:///C:/Users/E/reports/historical" />)diff --git a/apps/desktop/src/components/chat/preview-attachment.tsx b/apps/desktop/src/components/chat/preview-attachment.tsxindex feb42eb0190..7164d98c614 100644--- a/apps/desktop/src/components/chat/preview-attachment.tsx+++ b/apps/desktop/src/components/chat/preview-attachment.tsx@@ -14,10 +14,7 @@ import { $previewTabSources, closePreviewForSource, openPreview } from '@/store//** What the Electron main process said about this target's LOCAL filesystem* state (#101683). `null` keeps the stock card — remote-backend targets keep* Download, and a bridge-less dev server can't classify. */-type LocalTargetState =- | { path: string; type: 'directory' | 'file' }- | { type: 'missing' }- | null+type LocalTargetState = { path: string; type: 'directory' | 'file' } | { type: 'missing' } | nullasync function classifyLocalTarget(rawTarget: string, cwd?: string | null): Promise<LocalTargetState> {const bridge = window.hermesDesktopdiff --git a/apps/desktop/src/components/chat/shiki-highlighter.test.ts b/apps/desktop/src/components/chat/shiki-highlighter.test.tsindex 36e9f8d6cc5..53a0273ed77 100644--- a/apps/desktop/src/components/chat/shiki-highlighter.test.ts+++ b/apps/desktop/src/components/chat/shiki-highlighter.test.ts@@ -32,7 +32,6 @@ describe('chunkByLines', () => {})})-describe('copyableCodeText', () => {it('unwraps quoted URL reference directives before copying a code block', () => {expect(copyableCodeText('curl @url:`https://example.com/image.png` -o image.png')).toBe(@@ -60,7 +59,7 @@ second @url:"https://two.example" @file:\`src/app.ts\``'@url:http://?','@url:https://?','@url:http://:80',- '@url:https://#fragment',+ '@url:https://#fragment']) {expect(copyableCodeText(code)).toBe(code)}diff --git a/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsx b/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsxindex da270be3bbb..1a6dbadc1ec 100644--- a/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsx+++ b/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsx@@ -819,7 +819,10 @@ export function TreeGroup({return (<divaria-hidden={!isActive || undefined}- className={cn('absolute inset-0 overflow-auto', !isActive && 'pointer-events-none invisible opacity-0')}+ className={cn(+ 'absolute inset-0 overflow-auto',+ !isActive && 'pointer-events-none invisible opacity-0'+ )}inert={!isActive || undefined}key={paneId}{...hiddenPaneProps(!isActive)}diff --git a/apps/desktop/src/lib/chat-messages/parts.ts b/apps/desktop/src/lib/chat-messages/parts.tsindex 55eba577ccc..8a8af3f70e8 100644--- a/apps/desktop/src/lib/chat-messages/parts.ts+++ b/apps/desktop/src/lib/chat-messages/parts.ts@@ -168,21 +168,16 @@ function mediaLink(value: string): string | null {? { path: unquoteMediaPath(raw), punctuation: '' }: splitTrailingPunctuation(unquoteMediaPath(raw))- return isPlausibleMediaPath(path)- ? `[${mediaDisplayLabel(path)}](${mediaMarkdownHref(path)})${punctuation}`- : null+ return isPlausibleMediaPath(path) ? `[${mediaDisplayLabel(path)}](${mediaMarkdownHref(path)})${punctuation}` : null}export function renderMediaTags(text: string): string {return text- .replace(- MEDIA_LINE_RE,- (match, lead: string, value: string, trailer: string) => {- const link = mediaLink(value)+ .replace(MEDIA_LINE_RE, (match, lead: string, value: string, trailer: string) => {+ const link = mediaLink(value)- return link ? `${lead}${link}${trailer}` : match- }- )+ return link ? `${lead}${link}${trailer}` : match+ }).replace(MEDIA_TAG_RE, (match, value: string) => mediaLink(value) ?? match)}diff --git a/apps/desktop/src/lib/preview-act/act-in-page.test.ts b/apps/desktop/src/lib/preview-act/act-in-page.test.tsindex 75dc433d58d..8b257866380 100644--- a/apps/desktop/src/lib/preview-act/act-in-page.test.ts+++ b/apps/desktop/src/lib/preview-act/act-in-page.test.ts@@ -762,6 +762,7 @@ describe('scroll', () => {const dispatched: Event[] = []input.dispatchEvent = vi.fn((ev: Event) => {dispatched.push(ev)+return true})@@ -783,6 +784,7 @@ describe('scroll', () => {if (ev instanceof KeyboardEvent) {dispatched.push(ev)}+return true})diff --git a/apps/desktop/src/lib/preview-act/act-in-page.ts b/apps/desktop/src/lib/preview-act/act-in-page.tsindex 9c6bd56c954..cfb884b557a 100644--- a/apps/desktop/src/lib/preview-act/act-in-page.ts+++ b/apps/desktop/src/lib/preview-act/act-in-page.ts@@ -570,9 +570,7 @@ export function actInPageCore(// environments where execCommand fails (about:blank, some sandboxed// pages).el.textContent = text- el.dispatchEvent(- new InputEvent('input', { data: text, inputType: 'insertText', bubbles: true })- )+ el.dispatchEvent(new InputEvent('input', { data: text, inputType: 'insertText', bubbles: true }))}} else if (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') {// Assign through the prototype's setter: React (and anything else that@@ -602,7 +600,14 @@ export function actInPageCore(// Many React input components (DeepSeek, ChatZhipu, Kimi) still// check keyCode === 13 for Enter; 0 means the event never reaches// the submit handler (#98048).- const enter = { bubbles: true, cancelable: true, code: 'Enter', key: 'Enter', keyCode: 13, which: 13 } as KeyboardEventInit+ const enter = {+ bubbles: true,+ cancelable: true,+ code: 'Enter',+ key: 'Enter',+ keyCode: 13,+ which: 13+ } as KeyboardEventInitel.dispatchEvent(new KeyboardEvent('keydown', enter))el.dispatchEvent(new KeyboardEvent('keyup', enter))diff --git a/apps/desktop/src/lib/voice-client-direct.test.ts b/apps/desktop/src/lib/voice-client-direct.test.tsindex f0a2ecb38a8..e32cdb267af 100644--- a/apps/desktop/src/lib/voice-client-direct.test.ts+++ b/apps/desktop/src/lib/voice-client-direct.test.ts@@ -164,24 +164,39 @@ describe('transcribeAudioClientDirect', () => {}mockDesktopApi({ ok: true, stt: { ...directStt, hallucination_filter: filter }, tts: relay })- vi.stubGlobal('fetch', vi.fn(async () => new Response('Thank you.', { status: 200 })))+ vi.stubGlobal(+ 'fetch',+ vi.fn(async () => new Response('Thank you.', { status: 200 }))+ )expect(await transcribeAudioClientDirect(new Blob(['x']))).toBe('')- vi.stubGlobal('fetch', vi.fn(async () => new Response('OK. OK. OK.', { status: 200 })))+ vi.stubGlobal(+ 'fetch',+ vi.fn(async () => new Response('OK. OK. OK.', { status: 200 }))+ )expect(await transcribeAudioClientDirect(new Blob(['x']))).toBe('')- vi.stubGlobal('fetch', vi.fn(async () => new Response('The end', { status: 200 })))+ vi.stubGlobal(+ 'fetch',+ vi.fn(async () => new Response('The end', { status: 200 }))+ )expect(await transcribeAudioClientDirect(new Blob(['x']))).toBe('')// A real utterance passes through untouched, and an older backend without// the filter never drops a transcript.- vi.stubGlobal('fetch', vi.fn(async () => new Response('Thanks, that fixed it', { status: 200 })))+ vi.stubGlobal(+ 'fetch',+ vi.fn(async () => new Response('Thanks, that fixed it', { status: 200 }))+ )expect(await transcribeAudioClientDirect(new Blob(['x']))).toBe('Thanks, that fixed it')// Older backend: no hallucination_filter on the config → pass-through.clearVoiceClientConfigCache()mockDesktopApi({ ok: true, stt: directStt, tts: relay })- vi.stubGlobal('fetch', vi.fn(async () => new Response('Thank you.', { status: 200 })))+ vi.stubGlobal(+ 'fetch',+ vi.fn(async () => new Response('Thank you.', { status: 200 }))+ )expect(await transcribeAudioClientDirect(new Blob(['x']))).toBe('Thank you.')})diff --git a/apps/desktop/src/store/artifacts.ts b/apps/desktop/src/store/artifacts.tsindex 52b894ccfb2..108d29a3ead 100644--- a/apps/desktop/src/store/artifacts.ts+++ b/apps/desktop/src/store/artifacts.ts@@ -116,9 +116,7 @@ function pruneRegistry(registry: ArtifactRegistry): ArtifactRegistry {* the same content after index shifts, and a selection whose version was* evicted snaps back to newest.*/-function enforceContentBudget(- entries: readonly (readonly [string, ArtifactRecord[]])[]-): [string, ArtifactRecord[]][] {+function enforceContentBudget(entries: readonly (readonly [string, ArtifactRecord[]])[]): [string, ArtifactRecord[]][] {// Capture each explicitly selected version's hash BEFORE pruning: after the// array shifts, the selection index no longer names the version the user// pinned, so the hash is the only stable handle.@@ -218,6 +216,7 @@ function reconcileVersionSelection(// left it as the newest): absent = newest.delete next[artifactId]updated = next+continue}diff --git a/apps/desktop/src/store/composer-queue.ts b/apps/desktop/src/store/composer-queue.tsindex d86e2c65863..ef990b82dad 100644--- a/apps/desktop/src/store/composer-queue.ts+++ b/apps/desktop/src/store/composer-queue.ts@@ -220,10 +220,7 @@ export const enqueueQueuedPrompt = (// against the live persisted queue (mutateSession), so a same-session// write from another window that has not fired its storage event yet// is merged, not clobbered (#123249).- mutateSession(- sid,- queue => [...queue.map(e => (e.drainFailures ? { ...e, drainFailures: undefined } : e)), entry]- )+ mutateSession(sid, queue => [...queue.map(e => (e.drainFailures ? { ...e, drainFailures: undefined } : e)), entry])// Queueing a new prompt is fresh intent to keep the conversation moving —// a park from an earlier Stop must not hold this (or the entries ahead of// it) back.diff --git a/apps/desktop/src/store/composer-status.test.ts b/apps/desktop/src/store/composer-status.test.tsindex 8772f33fb35..a2caf2615fa 100644--- a/apps/desktop/src/store/composer-status.test.ts+++ b/apps/desktop/src/store/composer-status.test.ts@@ -160,6 +160,7 @@ describe('reconcileBackgroundProcesses', () => {session_id: 'build-task',status: 'exited'}+reconcileBackgroundProcesses('sess-notify', [completedProc])expect(dispatchNativeNotification).toHaveBeenCalledWith(@@ -174,12 +175,14 @@ describe('reconcileBackgroundProcesses', () => {reconcileBackgroundProcesses('sess-no-exit', [running('task-x')])vi.clearAllMocks()- reconcileBackgroundProcesses('sess-no-exit', [{- command: 'task-x',- output_tail: 'line1\nline2\nline3',- session_id: 'task-x',- status: 'exited'- }])+ reconcileBackgroundProcesses('sess-no-exit', [+ {+ command: 'task-x',+ output_tail: 'line1\nline2\nline3',+ session_id: 'task-x',+ status: 'exited'+ }+ ])expect(dispatchNativeNotification).toHaveBeenCalledWith(expect.objectContaining({@@ -192,12 +195,14 @@ describe('reconcileBackgroundProcesses', () => {reconcileBackgroundProcesses('sess-empty', [running('quick-cmd')])vi.clearAllMocks()- reconcileBackgroundProcesses('sess-empty', [{- command: 'quick-cmd',- exit_code: 1,- session_id: 'quick-cmd',- status: 'exited'- }])+ reconcileBackgroundProcesses('sess-empty', [+ {+ command: 'quick-cmd',+ exit_code: 1,+ session_id: 'quick-cmd',+ status: 'exited'+ }+ ])expect(dispatchNativeNotification).toHaveBeenCalledWith(expect.objectContaining({diff --git a/apps/desktop/src/store/composer-status.ts b/apps/desktop/src/store/composer-status.tsindex aaf447a1d81..4f1b043d20a 100644--- a/apps/desktop/src/store/composer-status.ts+++ b/apps/desktop/src/store/composer-status.ts@@ -336,11 +336,14 @@ export function reconcileBackgroundProcesses(sid: string, procs: GatewayProcessEfor (const [id, item] of fresh) {if (item.state !== 'running' && prevState.get(id) === 'running') {let body = item.title+if (item.exitCode !== undefined) {body += ` (exit ${item.exitCode})`}+if (item.output) {const tailLines = item.output.trim().split('\n').slice(-3)+if (tailLines.length > 0) {body += '\n' + tailLines.join('\n')}diff --git a/apps/desktop/src/store/composer.ts b/apps/desktop/src/store/composer.tsindex 628b54450d5..1a594cfd53b 100644--- a/apps/desktop/src/store/composer.ts+++ b/apps/desktop/src/store/composer.ts@@ -272,7 +272,9 @@ export const rotateFreshDraftKey = (): string => {// A draft key belongs to a fresh-chat lifecycle when it is the legacy shared// bucket or one of its per-instance successors (`__new__:<uuid>`, #66662).export const isFreshDraftScope = (key: string | null | undefined): boolean =>- typeof key === 'string' && (key === NEW_SESSION_DRAFT_KEY || (key.startsWith(NEW_SESSION_DRAFT_KEY) && key.length > NEW_SESSION_DRAFT_KEY.length))+ typeof key === 'string' &&+ (key === NEW_SESSION_DRAFT_KEY ||+ (key.startsWith(NEW_SESSION_DRAFT_KEY) && key.length > NEW_SESSION_DRAFT_KEY.length))// A null/empty scope IS the current fresh-chat lifecycle — resolve it to that// lifecycle's own key so every stash/read/migrate consumer below addresses thediff --git a/apps/desktop/src/store/onboarding.ts b/apps/desktop/src/store/onboarding.tsindex 7fa387c5367..930b5f8deed 100644--- a/apps/desktop/src/store/onboarding.ts+++ b/apps/desktop/src/store/onboarding.ts@@ -290,8 +290,13 @@ function shouldPreserveConfiguredOnBootRace(runtime: RuntimeReadinessResult, sta// every update restart of a fully configured install (#124939). The state// must already be configured (verified earlier or the durable cache) so a// genuinely unconfigured install still enters onboarding on boot.- return runtime.source === 'runtime_check' && !runtime.ready &&- state.configured === true && !state.requested && isInsideBootRaceWindow()+ return (+ runtime.source === 'runtime_check' &&+ !runtime.ready &&+ state.configured === true &&+ !state.requested &&+ isInsideBootRaceWindow()+ )}function notifyReady(provider: string) {diff --git a/apps/desktop/src/store/session-states.ts b/apps/desktop/src/store/session-states.tsindex a426c56ac69..52103679ae6 100644--- a/apps/desktop/src/store/session-states.ts+++ b/apps/desktop/src/store/session-states.ts@@ -33,12 +33,7 @@ import {} from '@/components/pane-shell/tree/store'import { resolveRememberedActivePane, workspaceScopeKey } from '@/components/pane-shell/workspace-scope'import type { WorkspaceMode } from '@/contrib/types'-import {- type ChatMessage,- chatMessageText,- finalizeInterruptedMessages,- sealOpenToolParts-} from '@/lib/chat-messages'+import { type ChatMessage, chatMessageText, finalizeInterruptedMessages, sealOpenToolParts } from '@/lib/chat-messages'import type { ErrorSurface } from '@/lib/error-surface'import { tileFocusStampOnFocusChange } from '@/lib/session-timer-since'import { stableArray } from '@/lib/stable-array'@@ -464,7 +459,10 @@ interface LiveTurnStatusResponse {/** What one `session.active_list` snapshot says about `runtimeId`'s turn. A* runtime missing from a well-formed list has been reaped: its turn is over.* `starting` is an agent build for a turn the backend accepted. */-export function liveTurnVerdict(response: LiveTurnStatusResponse | null | undefined, runtimeId: string): LiveTurnVerdict {+export function liveTurnVerdict(+ response: LiveTurnStatusResponse | null | undefined,+ runtimeId: string+): LiveTurnVerdict {if (!Array.isArray(response?.sessions)) {return 'unknown'}diff --git a/ui-tui/src/app/slash/commands/session.ts b/ui-tui/src/app/slash/commands/session.tsindex dc34fa0df28..8296d65348b 100644--- a/ui-tui/src/app/slash/commands/session.ts+++ b/ui-tui/src/app/slash/commands/session.ts@@ -29,8 +29,7 @@ const REASONING_GLOBAL_FLAGS = new Set(['--global'])type FastModeWord = 'fast' | 'normal' | 'ultrafast'// `config.get/set fast` answer fast | ultrafast | normal (auto/cold windows read as normal here).-const fastModeWord = (value: unknown): FastModeWord =>- value === 'fast' || value === 'ultrafast' ? value : 'normal'+const fastModeWord = (value: unknown): FastModeWord => (value === 'fast' || value === 'ultrafast' ? value : 'normal')const modelValueForConfigSet = (arg: string) => {const trimmed = arg.trim()