The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test: increase test coverage across various modules
Steven Enamakel2837ac5dd50e
diff --git a/app/src/__tests__/shimmerUtility.test.ts b/app/src/__tests__/shimmerUtility.test.tsindex 496190d91a..d003674240 100644--- a/app/src/__tests__/shimmerUtility.test.ts+++ b/app/src/__tests__/shimmerUtility.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { readFileSync } from 'node:fs';import { resolve } from 'node:path';import { describe, expect, it } from 'vitest';diff --git a/app/src/chat/__tests__/promptInjectionGuard.test.ts b/app/src/chat/__tests__/promptInjectionGuard.test.tsindex b810d423df..10e7642850 100644--- a/app/src/chat/__tests__/promptInjectionGuard.test.ts+++ b/app/src/chat/__tests__/promptInjectionGuard.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { checkPromptInjection, promptGuardMessage } from '../promptInjectionGuard';diff --git a/app/src/components/assistant-ui/elements/reasoningSteps.test.ts b/app/src/components/assistant-ui/elements/reasoningSteps.test.tsindex 71f35b65ee..5a6e8d4e10 100644--- a/app/src/components/assistant-ui/elements/reasoningSteps.test.ts+++ b/app/src/components/assistant-ui/elements/reasoningSteps.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import en from '../../../lib/i18n/en';diff --git a/app/src/components/channels/mcp/registryAdd.test.ts b/app/src/components/channels/mcp/registryAdd.test.tsindex 52b91bc831..e5e056bac6 100644--- a/app/src/components/channels/mcp/registryAdd.test.ts+++ b/app/src/components/channels/mcp/registryAdd.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { declareServer, isAddCandidate, resolveHostedEntry } from './registryAdd';diff --git a/app/src/components/composio/toolkitRequiredFields.test.ts b/app/src/components/composio/toolkitRequiredFields.test.tsindex a8b063e5b0..83a617b59d 100644--- a/app/src/components/composio/toolkitRequiredFields.test.ts+++ b/app/src/components/composio/toolkitRequiredFields.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/components/dashboard/formatCurrency.test.ts b/app/src/components/dashboard/formatCurrency.test.tsindex d48de8d86f..b04db6f972 100644--- a/app/src/components/dashboard/formatCurrency.test.ts+++ b/app/src/components/dashboard/formatCurrency.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/components/intelligence/__tests__/utils.test.ts b/app/src/components/intelligence/__tests__/utils.test.tsindex c9fea41708..9dd7b8a420 100644--- a/app/src/components/intelligence/__tests__/utils.test.ts+++ b/app/src/components/intelligence/__tests__/utils.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterAll, beforeAll, describe, expect, it, vi } from 'vitest';import type { ActionableItem } from '../../../types/intelligence';diff --git a/app/src/components/memory/memoryLifecycleLabels.test.ts b/app/src/components/memory/memoryLifecycleLabels.test.tsindex 984ca26a20..631f545ac3 100644--- a/app/src/components/memory/memoryLifecycleLabels.test.ts+++ b/app/src/components/memory/memoryLifecycleLabels.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { brainSourceLabel } from './memoryLifecycleLabels';diff --git a/app/src/components/settings/__tests__/settingsRouteRegistry.test.ts b/app/src/components/settings/__tests__/settingsRouteRegistry.test.tsindex 306eeba2c7..c7f15e6f2f 100644--- a/app/src/components/settings/__tests__/settingsRouteRegistry.test.ts+++ b/app/src/components/settings/__tests__/settingsRouteRegistry.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for settingsRouteRegistry helpers.*diff --git a/app/src/components/settings/panels/__tests__/aiRouting.test.ts b/app/src/components/settings/panels/__tests__/aiRouting.test.tsindex a51b9e580a..047fd02583 100644--- a/app/src/components/settings/panels/__tests__/aiRouting.test.ts+++ b/app/src/components/settings/panels/__tests__/aiRouting.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { CloudProvider, ProviderRef, RoutingMap } from '../AIPanel';diff --git a/app/src/components/settings/panels/__tests__/azureDeployment.test.ts b/app/src/components/settings/panels/__tests__/azureDeployment.test.tsindex b49a52eed5..5e8cd2a656 100644--- a/app/src/components/settings/panels/__tests__/azureDeployment.test.ts+++ b/app/src/components/settings/panels/__tests__/azureDeployment.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/components/settings/panels/__tests__/billingHelpers.test.ts b/app/src/components/settings/panels/__tests__/billingHelpers.test.tsindex 0fcb1c3a36..37b1e0bd78 100644--- a/app/src/components/settings/panels/__tests__/billingHelpers.test.ts+++ b/app/src/components/settings/panels/__tests__/billingHelpers.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { PlanTier } from '../../../../types/api';diff --git a/app/src/components/settings/panels/__tests__/builtinCloudProviders.test.ts b/app/src/components/settings/panels/__tests__/builtinCloudProviders.test.tsindex 8e218e0a40..ec3f7dfe18 100644--- a/app/src/components/settings/panels/__tests__/builtinCloudProviders.test.ts+++ b/app/src/components/settings/panels/__tests__/builtinCloudProviders.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/components/settings/panels/ai/backgroundLoopPrimitives.test.ts b/app/src/components/settings/panels/ai/backgroundLoopPrimitives.test.tsindex fd22f783c8..fa40b9a1b0 100644--- a/app/src/components/settings/panels/ai/backgroundLoopPrimitives.test.ts+++ b/app/src/components/settings/panels/ai/backgroundLoopPrimitives.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { formatUsd } from './backgroundLoopPrimitives';diff --git a/app/src/components/settings/panels/ai/deriveOllamaState.test.ts b/app/src/components/settings/panels/ai/deriveOllamaState.test.tsindex 95e0415a2c..386f5982d3 100644--- a/app/src/components/settings/panels/ai/deriveOllamaState.test.ts+++ b/app/src/components/settings/panels/ai/deriveOllamaState.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { LocalProviderSnapshot } from '../../../../services/api/aiSettingsApi';diff --git a/app/src/components/settings/panels/persona/personaTemplates.test.ts b/app/src/components/settings/panels/persona/personaTemplates.test.tsindex 2dcb723dc8..6d50d45f98 100644--- a/app/src/components/settings/panels/persona/personaTemplates.test.ts+++ b/app/src/components/settings/panels/persona/personaTemplates.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { parsePersonaFields } from './personaSections';diff --git a/app/src/config/__tests__/navConfig.test.ts b/app/src/config/__tests__/navConfig.test.tsindex 9e9fea86c5..23458596e3 100644--- a/app/src/config/__tests__/navConfig.test.ts+++ b/app/src/config/__tests__/navConfig.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { AVATAR_MENU_ITEMS, NAV_TABS } from '../navConfig';diff --git a/app/src/features/conversations/aui/taskCardHistory.test.ts b/app/src/features/conversations/aui/taskCardHistory.test.tsindex c1a29472a3..68eabb928b 100644--- a/app/src/features/conversations/aui/taskCardHistory.test.ts+++ b/app/src/features/conversations/aui/taskCardHistory.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { taskState, type TurnTask, updateTaskHistory } from './taskCardHistory';diff --git a/app/src/features/conversations/composerSendDecision.test.ts b/app/src/features/conversations/composerSendDecision.test.tsindex 9e7e1090a8..75872e23fa 100644--- a/app/src/features/conversations/composerSendDecision.test.ts+++ b/app/src/features/conversations/composerSendDecision.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/features/conversations/derived/mapDisplayItems.test.ts b/app/src/features/conversations/derived/mapDisplayItems.test.tsindex e553d2b033..3ddb8cbcce 100644--- a/app/src/features/conversations/derived/mapDisplayItems.test.ts+++ b/app/src/features/conversations/derived/mapDisplayItems.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { DerivedDisplayItem } from '../../../types/derivedTranscript';diff --git a/app/src/features/conversations/threadList/groupThreads.test.ts b/app/src/features/conversations/threadList/groupThreads.test.tsindex 27b3efc6ec..bad2501893 100644--- a/app/src/features/conversations/threadList/groupThreads.test.ts+++ b/app/src/features/conversations/threadList/groupThreads.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { Thread } from '../../../types/thread';diff --git a/app/src/features/conversations/tools/mcpUi/types.test.ts b/app/src/features/conversations/tools/mcpUi/types.test.tsindex 47b2e56504..750fd58b93 100644--- a/app/src/features/conversations/tools/mcpUi/types.test.ts+++ b/app/src/features/conversations/tools/mcpUi/types.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { hasWidget, isImageUrl, readMcpUiPresentation } from './types';diff --git a/app/src/features/conversations/tools/mcpUi/widgetUrl.test.ts b/app/src/features/conversations/tools/mcpUi/widgetUrl.test.tsindex 2354fdfb91..e90d81e21a 100644--- a/app/src/features/conversations/tools/mcpUi/widgetUrl.test.ts+++ b/app/src/features/conversations/tools/mcpUi/widgetUrl.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { FILL_WIDTH } from './frameFit';diff --git a/app/src/features/conversations/tools/parseWebSearchResult.test.ts b/app/src/features/conversations/tools/parseWebSearchResult.test.tsindex ae038d39b5..b7d4b59e55 100644--- a/app/src/features/conversations/tools/parseWebSearchResult.test.ts+++ b/app/src/features/conversations/tools/parseWebSearchResult.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { extractAgentSources } from '../../../utils/toolTimelineFormatting';diff --git a/app/src/features/conversations/tools/toolPhrases.test.ts b/app/src/features/conversations/tools/toolPhrases.test.tsindex 72fe33e868..f3e9f00d22 100644--- a/app/src/features/conversations/tools/toolPhrases.test.ts+++ b/app/src/features/conversations/tools/toolPhrases.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import en from '../../../lib/i18n/en';diff --git a/app/src/features/conversations/tools/toolPresentation.catalog.test.ts b/app/src/features/conversations/tools/toolPresentation.catalog.test.tsindex 5f990acbb6..743e2e5405 100644--- a/app/src/features/conversations/tools/toolPresentation.catalog.test.ts+++ b/app/src/features/conversations/tools/toolPresentation.catalog.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** The "never again" guard for tool labels.*diff --git a/app/src/features/conversations/utils/format.test.ts b/app/src/features/conversations/utils/format.test.tsindex 7faa72d898..787ba91da8 100644--- a/app/src/features/conversations/utils/format.test.ts+++ b/app/src/features/conversations/utils/format.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { classifyHref, isAllowedExternalHref, transformChatUrl } from './format';diff --git a/app/src/features/conversations/utils/openTinyVoice.test.ts b/app/src/features/conversations/utils/openTinyVoice.test.tsindex 3faa0afc44..7a049beb65 100644--- a/app/src/features/conversations/utils/openTinyVoice.test.ts+++ b/app/src/features/conversations/utils/openTinyVoice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import { openTinyVoice } from './openTinyVoice';diff --git a/app/src/features/conversations/utils/threadFilter.test.ts b/app/src/features/conversations/utils/threadFilter.test.tsindex ca2a799719..f977596544 100644--- a/app/src/features/conversations/utils/threadFilter.test.ts+++ b/app/src/features/conversations/utils/threadFilter.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { Thread } from '../../../types/thread';diff --git a/app/src/features/conversations/utils/workerThreadRef.test.ts b/app/src/features/conversations/utils/workerThreadRef.test.tsindex d050768629..8a16aee073 100644--- a/app/src/features/conversations/utils/workerThreadRef.test.ts+++ b/app/src/features/conversations/utils/workerThreadRef.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { parseWorkerThreadRef } from './workerThreadRef';diff --git a/app/src/features/human/Mascot/manifest/stateEngine.test.ts b/app/src/features/human/Mascot/manifest/stateEngine.test.tsindex c7a9e4dac6..72088fdfb1 100644--- a/app/src/features/human/Mascot/manifest/stateEngine.test.ts+++ b/app/src/features/human/Mascot/manifest/stateEngine.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/features/human/Mascot/mascotPalette.test.ts b/app/src/features/human/Mascot/mascotPalette.test.tsindex 3d3e827523..5b919e27f6 100644--- a/app/src/features/human/Mascot/mascotPalette.test.ts+++ b/app/src/features/human/Mascot/mascotPalette.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { getMascotPalette, shadeHex } from './mascotPalette';diff --git a/app/src/features/human/Mascot/riveMaps.test.ts b/app/src/features/human/Mascot/riveMaps.test.tsindex 4f57a2c376..5476adb9f8 100644--- a/app/src/features/human/Mascot/riveMaps.test.ts+++ b/app/src/features/human/Mascot/riveMaps.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { MascotFace } from './Ghosty';diff --git a/app/src/features/human/Mascot/visemes.test.ts b/app/src/features/human/Mascot/visemes.test.tsindex 5ee1fa7d44..6b0bc1f983 100644--- a/app/src/features/human/Mascot/visemes.test.ts+++ b/app/src/features/human/Mascot/visemes.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { lerpViseme, REST_SMILE_PATH, visemePath, VISEMES } from './visemes';diff --git a/app/src/features/human/chatMascot/geometry.test.ts b/app/src/features/human/chatMascot/geometry.test.tsindex 8f1e36eeb7..3a3f489241 100644--- a/app/src/features/human/chatMascot/geometry.test.ts+++ b/app/src/features/human/chatMascot/geometry.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/features/human/chatMascot/sendBinding.test.ts b/app/src/features/human/chatMascot/sendBinding.test.tsindex dae5808994..5952629a19 100644--- a/app/src/features/human/chatMascot/sendBinding.test.ts+++ b/app/src/features/human/chatMascot/sendBinding.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import { ChatMascotSendStore } from './sendBinding';diff --git a/app/src/features/human/voice/amplitudeLipsync.test.ts b/app/src/features/human/voice/amplitudeLipsync.test.tsindex 3b2abbe2d0..4f8d88a3c6 100644--- a/app/src/features/human/voice/amplitudeLipsync.test.ts+++ b/app/src/features/human/voice/amplitudeLipsync.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { amplitudeToVisemeCode, smoothAmplitude } from './amplitudeLipsync';diff --git a/app/src/features/human/voice/live/liveVoiceSocket.test.ts b/app/src/features/human/voice/live/liveVoiceSocket.test.tsindex eb7fe35d1e..121577448b 100644--- a/app/src/features/human/voice/live/liveVoiceSocket.test.ts+++ b/app/src/features/human/voice/live/liveVoiceSocket.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { FakeWebSocket } from '../../../../test/liveVoiceFakes';diff --git a/app/src/features/human/voice/readbackPrefix.contract.test.ts b/app/src/features/human/voice/readbackPrefix.contract.test.tsindex 09cc4a0ac0..fee11f257c 100644--- a/app/src/features/human/voice/readbackPrefix.contract.test.ts+++ b/app/src/features/human/voice/readbackPrefix.contract.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** The read-back prefix is a behavioural contract that spans two languages: the* renderer wraps a deferred answer in it, and the Rust harness recognises it todiff --git a/app/src/features/human/voice/ttsQueue.test.ts b/app/src/features/human/voice/ttsQueue.test.tsindex b7c2c17bb3..4a49403712 100644--- a/app/src/features/human/voice/ttsQueue.test.ts+++ b/app/src/features/human/voice/ttsQueue.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { VISEMES } from '../Mascot/visemes';diff --git a/app/src/features/human/voice/visemeMap.test.ts b/app/src/features/human/voice/visemeMap.test.tsindex 43b7d2d967..cb90e23677 100644--- a/app/src/features/human/voice/visemeMap.test.ts+++ b/app/src/features/human/voice/visemeMap.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { VISEMES } from '../Mascot/visemes';diff --git a/app/src/features/human/voiceEntry.test.ts b/app/src/features/human/voiceEntry.test.tsindex 8326ab5193..a07095177f 100644--- a/app/src/features/human/voiceEntry.test.ts+++ b/app/src/features/human/voiceEntry.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { resolveHumanVoiceEntry } from './voiceEntry';diff --git a/app/src/features/wallet/__tests__/walletDisplay.test.ts b/app/src/features/wallet/__tests__/walletDisplay.test.tsindex cdbbfa88b4..22a064cb62 100644--- a/app/src/features/wallet/__tests__/walletDisplay.test.ts+++ b/app/src/features/wallet/__tests__/walletDisplay.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/features/wallet/setupLocalWalletFromMnemonic.test.ts b/app/src/features/wallet/setupLocalWalletFromMnemonic.test.tsindex 0dba8aaeae..2f2dd97396 100644--- a/app/src/features/wallet/setupLocalWalletFromMnemonic.test.ts+++ b/app/src/features/wallet/setupLocalWalletFromMnemonic.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import { persistLocalWalletFromMnemonic } from './setupLocalWalletFromMnemonic';diff --git a/app/src/lib/ai/skillToolChainLatency.test.ts b/app/src/lib/ai/skillToolChainLatency.test.tsindex e389357ecd..dd96534df3 100644--- a/app/src/lib/ai/skillToolChainLatency.test.ts+++ b/app/src/lib/ai/skillToolChainLatency.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/lib/bootCheck/index.test.ts b/app/src/lib/bootCheck/index.test.tsindex 4aa7686d6c..b4c18e54b4 100644--- a/app/src/lib/bootCheck/index.test.ts+++ b/app/src/lib/bootCheck/index.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for the boot-check orchestrator.*diff --git a/app/src/lib/channels/__tests__/definitions.test.ts b/app/src/lib/channels/__tests__/definitions.test.tsindex 3f5afd5a23..8e8a3af529 100644--- a/app/src/lib/channels/__tests__/definitions.test.ts+++ b/app/src/lib/channels/__tests__/definitions.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { AUTH_MODE_LABELS, FALLBACK_DEFINITIONS, STATUS_STYLES } from '../definitions';diff --git a/app/src/lib/chat/toolCallEnvelope.test.ts b/app/src/lib/chat/toolCallEnvelope.test.tsindex 4a23f5c284..0a45c0c8b3 100644--- a/app/src/lib/chat/toolCallEnvelope.test.ts+++ b/app/src/lib/chat/toolCallEnvelope.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { unwrapToolCallEnvelope } from './toolCallEnvelope';diff --git a/app/src/lib/chatErrorCopy.test.ts b/app/src/lib/chatErrorCopy.test.tsindex c29a26aa4e..d98af93642 100644--- a/app/src/lib/chatErrorCopy.test.ts+++ b/app/src/lib/chatErrorCopy.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { readFileSync } from 'node:fs';import { resolve } from 'node:path';import { describe, expect, it } from 'vitest';diff --git a/app/src/lib/cn.test.ts b/app/src/lib/cn.test.tsindex 46cc437cf1..2d91367ce8 100644--- a/app/src/lib/cn.test.ts+++ b/app/src/lib/cn.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { readFileSync } from 'node:fs';import { resolve } from 'node:path';import { describe, expect, it } from 'vitest';diff --git a/app/src/lib/commands/__tests__/registry.test.ts b/app/src/lib/commands/__tests__/registry.test.tsindex a825bb4b7c..782b645cb1 100644--- a/app/src/lib/commands/__tests__/registry.test.ts+++ b/app/src/lib/commands/__tests__/registry.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { createRegistry } from '../registry';diff --git a/app/src/lib/commands/useSlashCommands.test.ts b/app/src/lib/commands/useSlashCommands.test.tsindex ae89d7df1b..addefadba1 100644--- a/app/src/lib/commands/useSlashCommands.test.ts+++ b/app/src/lib/commands/useSlashCommands.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import { registry } from './registry';diff --git a/app/src/lib/composio/oauthHandoff.test.ts b/app/src/lib/composio/oauthHandoff.test.tsindex 95f11d2cb1..99dbcca276 100644--- a/app/src/lib/composio/oauthHandoff.test.ts+++ b/app/src/lib/composio/oauthHandoff.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/lib/composio/types.test.ts b/app/src/lib/composio/types.test.tsindex 693ddfa211..7d393824da 100644--- a/app/src/lib/composio/types.test.ts+++ b/app/src/lib/composio/types.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { type ComposioConnection, deriveComposioState } from './types';diff --git a/app/src/lib/configRecoveryNotice.test.ts b/app/src/lib/configRecoveryNotice.test.tsindex 695adb4086..fe63584c9e 100644--- a/app/src/lib/configRecoveryNotice.test.ts+++ b/app/src/lib/configRecoveryNotice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it } from 'vitest';import { store } from '../store';diff --git a/app/src/lib/coreState/__tests__/store.test.ts b/app/src/lib/coreState/__tests__/store.test.tsindex dbe4d52e8e..8a73d613f3 100644--- a/app/src/lib/coreState/__tests__/store.test.ts+++ b/app/src/lib/coreState/__tests__/store.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { type CoreAppSnapshot, getCoreStateSnapshot, isWelcomeLocked } from '../store';diff --git a/app/src/lib/cron/cronToHuman.test.ts b/app/src/lib/cron/cronToHuman.test.tsindex a57e76772c..460039062c 100644--- a/app/src/lib/cron/cronToHuman.test.ts+++ b/app/src/lib/cron/cronToHuman.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { cronToHuman } from './cronToHuman';diff --git a/app/src/lib/cron/schedulePresets.test.ts b/app/src/lib/cron/schedulePresets.test.tsindex 01b05da286..48e362f3c2 100644--- a/app/src/lib/cron/schedulePresets.test.ts+++ b/app/src/lib/cron/schedulePresets.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { SCHEDULE_PRESET_VALUES, SCHEDULE_PRESETS } from './schedulePresets';diff --git a/app/src/lib/flows/cron.test.ts b/app/src/lib/flows/cron.test.tsindex cb8f2cc737..c149e9742e 100644--- a/app/src/lib/flows/cron.test.ts+++ b/app/src/lib/flows/cron.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for the cron builder helper. Covers build → parse round-trips for* the three supported shapes (minutes / hours / daily, with and withoutdiff --git a/app/src/lib/flows/flowValidation.test.ts b/app/src/lib/flows/flowValidation.test.tsindex 8715d4c6f8..f540333398 100644--- a/app/src/lib/flows/flowValidation.test.ts+++ b/app/src/lib/flows/flowValidation.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for `erroredNodeIds` (Phase 3c) — mapping graph-level validation* error strings back to the node ids they name, for canvas highlighting.diff --git a/app/src/lib/flows/graphDiff.test.ts b/app/src/lib/flows/graphDiff.test.tsindex 695f187b43..a5b6e64d33 100644--- a/app/src/lib/flows/graphDiff.test.ts+++ b/app/src/lib/flows/graphDiff.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { buildPreviewGraph, diffGraphs } from './graphDiff';diff --git a/app/src/lib/flows/newFlow.test.ts b/app/src/lib/flows/newFlow.test.tsindex d319b26327..0735a31940 100644--- a/app/src/lib/flows/newFlow.test.ts+++ b/app/src/lib/flows/newFlow.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for `createBlankWorkflowGraph` (Phase 4a "start from scratch").* Locks the starter-graph shape the chooser persists: a single `manual`diff --git a/app/src/lib/flows/nodeSummary.test.ts b/app/src/lib/flows/nodeSummary.test.tsindex 6fe93b4b8a..780a97e238 100644--- a/app/src/lib/flows/nodeSummary.test.ts+++ b/app/src/lib/flows/nodeSummary.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for describeNode — the dynamic per-node card summary. Asserts the* config-driven text for representative kinds plus the generic fallbacks whendiff --git a/app/src/lib/flows/runItems.test.ts b/app/src/lib/flows/runItems.test.tsindex 4b2f9349d2..fbbc4db5b7 100644--- a/app/src/lib/flows/runItems.test.ts+++ b/app/src/lib/flows/runItems.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** runItems — normalizer contract for the run inspector's per-item data browser.*/diff --git a/app/src/lib/flows/runStepSummary.test.ts b/app/src/lib/flows/runStepSummary.test.tsindex 2dccfec676..00d4a79b73 100644--- a/app/src/lib/flows/runStepSummary.test.ts+++ b/app/src/lib/flows/runStepSummary.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** runStepSummary (issue B20) — plain-language step summary derivation.*diff --git a/app/src/lib/flows/templates/templates.test.ts b/app/src/lib/flows/templates/templates.test.tsindex 0e9e6d0138..61e8fbad63 100644--- a/app/src/lib/flows/templates/templates.test.ts+++ b/app/src/lib/flows/templates/templates.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Structural validity tests for the bundled Phase 4c templates. Mirrors the* exact checks `tinyflows::validate` (and therefore `openhuman.flows_validate`)diff --git a/app/src/lib/i18n/__tests__/coverage.test.ts b/app/src/lib/i18n/__tests__/coverage.test.tsindex f3e2b934a0..fc9e256540 100644--- a/app/src/lib/i18n/__tests__/coverage.test.ts+++ b/app/src/lib/i18n/__tests__/coverage.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { REASONING_EFFORTS } from '../../../features/conversations/aui/ReasoningEffortPicker';diff --git a/app/src/lib/mcp/__tests__/transport.test.ts b/app/src/lib/mcp/__tests__/transport.test.tsindex 2b87281431..c2a7c6ec83 100644--- a/app/src/lib/mcp/__tests__/transport.test.ts+++ b/app/src/lib/mcp/__tests__/transport.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport type { Socket } from 'socket.io-client';import { beforeEach, describe, expect, test } from 'vitest';diff --git a/app/src/lib/mcp/errorHandler.test.ts b/app/src/lib/mcp/errorHandler.test.tsindex 6ba85f4d37..24a6040cca 100644--- a/app/src/lib/mcp/errorHandler.test.ts+++ b/app/src/lib/mcp/errorHandler.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for MCP error handling utilities*/diff --git a/app/src/lib/mcp/transport.test.ts b/app/src/lib/mcp/transport.test.tsindex 0afa8a5062..601091233d 100644--- a/app/src/lib/mcp/transport.test.ts+++ b/app/src/lib/mcp/transport.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for SocketIOMCPTransportImpl*diff --git a/app/src/lib/mcp/validation.test.ts b/app/src/lib/mcp/validation.test.tsindex 3f60160c8d..047ebb98cd 100644--- a/app/src/lib/mcp/validation.test.ts+++ b/app/src/lib/mcp/validation.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for MCP validation utilities*/diff --git a/app/src/lib/notificationRouter.test.ts b/app/src/lib/notificationRouter.test.tsindex 3a758c915c..3e28f12c92 100644--- a/app/src/lib/notificationRouter.test.ts+++ b/app/src/lib/notificationRouter.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { NotificationItem } from '../store/notificationSlice';diff --git a/app/src/lib/theme/chrome.test.ts b/app/src/lib/theme/chrome.test.tsindex 944dbc5173..69554ab27a 100644--- a/app/src/lib/theme/chrome.test.ts+++ b/app/src/lib/theme/chrome.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { deriveSurfaceChrome, withDerivedChrome } from './chrome';diff --git a/app/src/lib/theme/color.test.ts b/app/src/lib/theme/color.test.tsindex 136fcce4b3..50e7d68f15 100644--- a/app/src/lib/theme/color.test.ts+++ b/app/src/lib/theme/color.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/lib/theme/presets.contrast.test.ts b/app/src/lib/theme/presets.contrast.test.tsindex 84f4c495c8..ad5459e62a 100644--- a/app/src/lib/theme/presets.contrast.test.ts+++ b/app/src/lib/theme/presets.contrast.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { readFileSync } from 'node:fs';import { dirname, resolve as resolvePath } from 'node:path';import { fileURLToPath } from 'node:url';diff --git a/app/src/lib/tunnel/framing.test.ts b/app/src/lib/tunnel/framing.test.tsindex f3e1b98398..ead267f6e7 100644--- a/app/src/lib/tunnel/framing.test.ts+++ b/app/src/lib/tunnel/framing.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for tunnel/framing.ts*/diff --git a/app/src/lib/userErrors/__tests__/classify.test.ts b/app/src/lib/userErrors/__tests__/classify.test.tsindex 0f661f4fae..b9ac3921cc 100644--- a/app/src/lib/userErrors/__tests__/classify.test.ts+++ b/app/src/lib/userErrors/__tests__/classify.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { classifyUserActionableError, userErrorId } from '../classify';diff --git a/app/src/lib/userErrors/__tests__/report.test.ts b/app/src/lib/userErrors/__tests__/report.test.tsindex 8d2c8983b2..3bd2bc1b1b 100644--- a/app/src/lib/userErrors/__tests__/report.test.ts+++ b/app/src/lib/userErrors/__tests__/report.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import type { AppDispatch } from '../../../store';diff --git a/app/src/lib/workflows/workflowProposal.test.ts b/app/src/lib/workflows/workflowProposal.test.tsindex ba34946b1c..af795f6d3e 100644--- a/app/src/lib/workflows/workflowProposal.test.ts+++ b/app/src/lib/workflows/workflowProposal.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { ThreadMessage } from '../../types/thread';diff --git a/app/src/providers/__tests__/assistantUiMessages.reasoningTiming.test.ts b/app/src/providers/__tests__/assistantUiMessages.reasoningTiming.test.tsindex 9dc3248a63..2aeddac705 100644--- a/app/src/providers/__tests__/assistantUiMessages.reasoningTiming.test.ts+++ b/app/src/providers/__tests__/assistantUiMessages.reasoningTiming.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { ThreadMessage } from '../../types/thread';diff --git a/app/src/providers/__tests__/chatSurfaceHandlers.test.ts b/app/src/providers/__tests__/chatSurfaceHandlers.test.tsindex de315f2e75..f21c69e4f2 100644--- a/app/src/providers/__tests__/chatSurfaceHandlers.test.ts+++ b/app/src/providers/__tests__/chatSurfaceHandlers.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, it, vi } from 'vitest';import { __resetChatSurfaces, getChatSurface, registerChatSurface } from '../chatSurfaceHandlers';diff --git a/app/src/providers/__tests__/speechAdapter.test.ts b/app/src/providers/__tests__/speechAdapter.test.tsindex 68bdd37f1f..c6ce7ba526 100644--- a/app/src/providers/__tests__/speechAdapter.test.ts+++ b/app/src/providers/__tests__/speechAdapter.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** The read-aloud bridge.*diff --git a/app/src/services/__tests__/chatService.queue.test.ts b/app/src/services/__tests__/chatService.queue.test.tsindex c5480b6464..b730696870 100644--- a/app/src/services/__tests__/chatService.queue.test.ts+++ b/app/src/services/__tests__/chatService.queue.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { chatRemoveQueueItem, subscribeQueueEvents } from '../chatService';diff --git a/app/src/services/__tests__/chatService.subagentDelta.test.ts b/app/src/services/__tests__/chatService.subagentDelta.test.tsindex cdd218765c..a5add3655b 100644--- a/app/src/services/__tests__/chatService.subagentDelta.test.ts+++ b/app/src/services/__tests__/chatService.subagentDelta.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import {diff --git a/app/src/services/__tests__/chatService.suggestions.test.ts b/app/src/services/__tests__/chatService.suggestions.test.tsindex 0dba4446f1..10274d1182 100644--- a/app/src/services/__tests__/chatService.suggestions.test.ts+++ b/app/src/services/__tests__/chatService.suggestions.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { subscribeSuggestionEvents } from '../chatService';diff --git a/app/src/services/__tests__/coreHealthMonitor.test.ts b/app/src/services/__tests__/coreHealthMonitor.test.tsindex 82799e9a8c..a68bd98aa1 100644--- a/app/src/services/__tests__/coreHealthMonitor.test.ts+++ b/app/src/services/__tests__/coreHealthMonitor.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Tests for coreHealthMonitor — covers changed lines 17-19, 21-23, 25-29,* 31-34, 37, 41-42, 47-50, 53-57, 60-64.diff --git a/app/src/services/__tests__/coreProcessControl.test.ts b/app/src/services/__tests__/coreProcessControl.test.tsindex 2fab97fff0..986598a389 100644--- a/app/src/services/__tests__/coreProcessControl.test.ts+++ b/app/src/services/__tests__/coreProcessControl.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Tests for coreProcessControl — covers changed lines 13-15, 17, 22.*/diff --git a/app/src/services/__tests__/coreRpcClient.probeRealtime.test.ts b/app/src/services/__tests__/coreRpcClient.probeRealtime.test.tsindex 03d265bbf0..11fa3a10b1 100644--- a/app/src/services/__tests__/coreRpcClient.probeRealtime.test.ts+++ b/app/src/services/__tests__/coreRpcClient.probeRealtime.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, test, vi } from 'vitest';import { probeCoreRealtime } from '../coreRpcClient';diff --git a/app/src/services/__tests__/coreRpcClient.selfHostedRelay.test.ts b/app/src/services/__tests__/coreRpcClient.selfHostedRelay.test.tsindex 643453f1fd..49d6bea6a8 100644--- a/app/src/services/__tests__/coreRpcClient.selfHostedRelay.test.ts+++ b/app/src/services/__tests__/coreRpcClient.selfHostedRelay.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Regression tests for #3865 — connecting to a self-hosted runtime on a LAN IP* from the macOS desktop app.diff --git a/app/src/services/__tests__/coreSocket.test.ts b/app/src/services/__tests__/coreSocket.test.tsindex a30d0d499b..fdf2e8886b 100644--- a/app/src/services/__tests__/coreSocket.test.ts+++ b/app/src/services/__tests__/coreSocket.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { connectCoreSocket, createCoreSocket } from '../coreSocket';diff --git a/app/src/services/__tests__/gatewayService.test.ts b/app/src/services/__tests__/gatewayService.test.tsindex 16a5b11cc7..af0d66b539 100644--- a/app/src/services/__tests__/gatewayService.test.ts+++ b/app/src/services/__tests__/gatewayService.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Tests for the gateway service.*diff --git a/app/src/services/__tests__/keyringApi.test.ts b/app/src/services/__tests__/keyringApi.test.tsindex 015533ce31..04bb2094d4 100644--- a/app/src/services/__tests__/keyringApi.test.ts+++ b/app/src/services/__tests__/keyringApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, it, vi } from 'vitest';import { decideKeyringConsent, fetchKeyringStatus, retryKeyringProbe } from '../keyringApi';diff --git a/app/src/services/__tests__/rpcMethods.test.ts b/app/src/services/__tests__/rpcMethods.test.tsindex ffa647f907..70701baf7c 100644--- a/app/src/services/__tests__/rpcMethods.test.ts+++ b/app/src/services/__tests__/rpcMethods.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport * as fs from 'node:fs';import * as path from 'node:path';import { describe, expect, test } from 'vitest';diff --git a/app/src/services/__tests__/socketService.events.test.ts b/app/src/services/__tests__/socketService.events.test.tsindex 64b1592077..f20ef7cc66 100644--- a/app/src/services/__tests__/socketService.events.test.ts+++ b/app/src/services/__tests__/socketService.events.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Tests for socketService socket-event handler dispatches.* Covers lines 212, 230, 237, 240.diff --git a/app/src/services/__tests__/socketService.subscribeThread.test.ts b/app/src/services/__tests__/socketService.subscribeThread.test.tsindex 44d19a46cf..c85173f7c6 100644--- a/app/src/services/__tests__/socketService.subscribeThread.test.ts+++ b/app/src/services/__tests__/socketService.subscribeThread.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, it, vi } from 'vitest';import { socketService } from '../socketService';diff --git a/app/src/services/__tests__/socketService.test.ts b/app/src/services/__tests__/socketService.test.tsindex b5e15f702f..bc53c06df6 100644--- a/app/src/services/__tests__/socketService.test.ts+++ b/app/src/services/__tests__/socketService.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for socketService internals — specifically the* resolveCoreSocketBaseUrl() behaviour that was fixed to consultdiff --git a/app/src/services/announcementService.test.ts b/app/src/services/announcementService.test.tsindex 5027483844..dfecb27d1f 100644--- a/app/src/services/announcementService.test.ts+++ b/app/src/services/announcementService.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import { fetchLatestAnnouncement, parseAnnouncement } from './announcementService';diff --git a/app/src/services/api/__tests__/artifactRows.test.ts b/app/src/services/api/__tests__/artifactRows.test.tsindex ca8f1539de..2df6f44923 100644--- a/app/src/services/api/__tests__/artifactRows.test.ts+++ b/app/src/services/api/__tests__/artifactRows.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { ThreadMessage } from '../../../types/thread';diff --git a/app/src/services/api/__tests__/billingApi.test.ts b/app/src/services/api/__tests__/billingApi.test.tsindex 787677cd21..575a819a51 100644--- a/app/src/services/api/__tests__/billingApi.test.ts+++ b/app/src/services/api/__tests__/billingApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockCallCoreCommand = vi.fn();diff --git a/app/src/services/api/__tests__/channelConnectionsApi.test.ts b/app/src/services/api/__tests__/channelConnectionsApi.test.tsindex 37b6104876..057540d4e4 100644--- a/app/src/services/api/__tests__/channelConnectionsApi.test.ts+++ b/app/src/services/api/__tests__/channelConnectionsApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockCallCoreRpc = vi.fn();diff --git a/app/src/services/api/__tests__/openrouterFreeModels.test.ts b/app/src/services/api/__tests__/openrouterFreeModels.test.tsindex f81eacdbe8..63cdb9a28b 100644--- a/app/src/services/api/__tests__/openrouterFreeModels.test.ts+++ b/app/src/services/api/__tests__/openrouterFreeModels.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { applyOpenRouterFreeModels, OPENROUTER_FREE_MODEL } from '../openrouterFreeModels';diff --git a/app/src/services/api/__tests__/userApi.test.ts b/app/src/services/api/__tests__/userApi.test.tsindex 51981a06dd..45d3cd7bc0 100644--- a/app/src/services/api/__tests__/userApi.test.ts+++ b/app/src/services/api/__tests__/userApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockFetchCurrentUser = vi.fn();diff --git a/app/src/services/api/__tests__/voiceSettingsApi.test.ts b/app/src/services/api/__tests__/voiceSettingsApi.test.tsindex b83ac51bda..3332d9d82c 100644--- a/app/src/services/api/__tests__/voiceSettingsApi.test.ts+++ b/app/src/services/api/__tests__/voiceSettingsApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { testVoiceProvider } from '../voiceSettingsApi';diff --git a/app/src/services/api/agentContextApi.test.ts b/app/src/services/api/agentContextApi.test.tsindex 52cf9a2612..66e66134a0 100644--- a/app/src/services/api/agentContextApi.test.ts+++ b/app/src/services/api/agentContextApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../coreRpcClient';diff --git a/app/src/services/api/agentRegistryApi.test.ts b/app/src/services/api/agentRegistryApi.test.tsindex 774ae74d92..e3206108dc 100644--- a/app/src/services/api/agentRegistryApi.test.ts+++ b/app/src/services/api/agentRegistryApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../coreRpcClient';diff --git a/app/src/services/api/approvalApi.test.ts b/app/src/services/api/approvalApi.test.tsindex ad960d7319..abf906295e 100644--- a/app/src/services/api/approvalApi.test.ts+++ b/app/src/services/api/approvalApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import {diff --git a/app/src/services/api/channelConnectionsApi.test.ts b/app/src/services/api/channelConnectionsApi.test.tsindex 078bc78fc6..388b2874d4 100644--- a/app/src/services/api/channelConnectionsApi.test.ts+++ b/app/src/services/api/channelConnectionsApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { channelConnectionsApi } from './channelConnectionsApi';diff --git a/app/src/services/api/embeddingsApi.test.ts b/app/src/services/api/embeddingsApi.test.tsindex fad4ac845a..90d481f3e5 100644--- a/app/src/services/api/embeddingsApi.test.ts+++ b/app/src/services/api/embeddingsApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../coreRpcClient';diff --git a/app/src/services/api/feedbackApi.test.ts b/app/src/services/api/feedbackApi.test.tsindex 834954168f..4fef42f994 100644--- a/app/src/services/api/feedbackApi.test.ts+++ b/app/src/services/api/feedbackApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockGet = vi.fn();diff --git a/app/src/services/api/flowsApi.test.ts b/app/src/services/api/flowsApi.test.tsindex 7a96f184d8..68ea722339 100644--- a/app/src/services/api/flowsApi.test.ts+++ b/app/src/services/api/flowsApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { coerceWorkflowProposal } from '../../lib/workflows/workflowProposal';diff --git a/app/src/services/api/liveVoiceApi.test.ts b/app/src/services/api/liveVoiceApi.test.tsindex 1c25464409..bd573bcdb9 100644--- a/app/src/services/api/liveVoiceApi.test.ts+++ b/app/src/services/api/liveVoiceApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import {diff --git a/app/src/services/api/memoryApi.test.ts b/app/src/services/api/memoryApi.test.tsindex 2afced673e..ce94344248 100644--- a/app/src/services/api/memoryApi.test.ts+++ b/app/src/services/api/memoryApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../coreRpcClient';diff --git a/app/src/services/api/personaFilesApi.test.ts b/app/src/services/api/personaFilesApi.test.tsindex 005caf158a..dbcf8c30ec 100644--- a/app/src/services/api/personaFilesApi.test.ts+++ b/app/src/services/api/personaFilesApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import {diff --git a/app/src/services/api/skillRegistryApi.test.ts b/app/src/services/api/skillRegistryApi.test.tsindex d3a94c57b8..968ff72179 100644--- a/app/src/services/api/skillRegistryApi.test.ts+++ b/app/src/services/api/skillRegistryApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { isInstallable, parseRegistryError, skillRegistryApi } from './skillRegistryApi';diff --git a/app/src/services/api/skillsApi.test.ts b/app/src/services/api/skillsApi.test.tsindex 40a22560c6..c6ab8736a5 100644--- a/app/src/services/api/skillsApi.test.ts+++ b/app/src/services/api/skillsApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { skillsApi } from './skillsApi';diff --git a/app/src/services/api/subagentApi.test.ts b/app/src/services/api/subagentApi.test.tsindex 5b3484107c..84ebd0a52f 100644--- a/app/src/services/api/subagentApi.test.ts+++ b/app/src/services/api/subagentApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../coreRpcClient';diff --git a/app/src/services/api/threadApi.test.ts b/app/src/services/api/threadApi.test.tsindex 4888d9c3e7..7a73ab1b3d 100644--- a/app/src/services/api/threadApi.test.ts+++ b/app/src/services/api/threadApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockCallCoreRpc = vi.fn();diff --git a/app/src/services/api/voiceSettingsApi.test.ts b/app/src/services/api/voiceSettingsApi.test.tsindex d61fb9051d..dfb342e76f 100644--- a/app/src/services/api/voiceSettingsApi.test.ts+++ b/app/src/services/api/voiceSettingsApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/services/api/waitlistApi.test.ts b/app/src/services/api/waitlistApi.test.tsindex 9e740cbabb..b6bbf24230 100644--- a/app/src/services/api/waitlistApi.test.ts+++ b/app/src/services/api/waitlistApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockPost = vi.fn();diff --git a/app/src/services/api/worktreeApi.test.ts b/app/src/services/api/worktreeApi.test.tsindex 83915a8e0b..154ee8cce1 100644--- a/app/src/services/api/worktreeApi.test.ts+++ b/app/src/services/api/worktreeApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../coreRpcClient';diff --git a/app/src/services/apiError.test.ts b/app/src/services/apiError.test.tsindex d2b2102fa7..7b0674b799 100644--- a/app/src/services/apiError.test.ts+++ b/app/src/services/apiError.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { messageForApiError } from './apiError';diff --git a/app/src/services/bootCheckService.test.ts b/app/src/services/bootCheckService.test.tsindex 5cfc601276..d412d68a7b 100644--- a/app/src/services/bootCheckService.test.ts+++ b/app/src/services/bootCheckService.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for the boot-check service-backed transport.*diff --git a/app/src/services/chatDeltaCoalescer.test.ts b/app/src/services/chatDeltaCoalescer.test.tsindex 37dd138125..b3100267e8 100644--- a/app/src/services/chatDeltaCoalescer.test.ts+++ b/app/src/services/chatDeltaCoalescer.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import {diff --git a/app/src/services/coreCommandClient.test.ts b/app/src/services/coreCommandClient.test.tsindex 5b32f96212..00286a6d05 100644--- a/app/src/services/coreCommandClient.test.ts+++ b/app/src/services/coreCommandClient.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockCallCoreRpc = vi.fn();diff --git a/app/src/services/coreStateApi.test.ts b/app/src/services/coreStateApi.test.tsindex 01bea4d6ae..3efc2c793c 100644--- a/app/src/services/coreStateApi.test.ts+++ b/app/src/services/coreStateApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockCallCoreRpc = vi.fn();diff --git a/app/src/services/transport/CloudHttpTransport.test.ts b/app/src/services/transport/CloudHttpTransport.test.tsindex f951c3de37..e888678131 100644--- a/app/src/services/transport/CloudHttpTransport.test.ts+++ b/app/src/services/transport/CloudHttpTransport.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, it, vi } from 'vitest';import { CloudHttpTransport } from './CloudHttpTransport';diff --git a/app/src/services/transport/LanHttpTransport.test.ts b/app/src/services/transport/LanHttpTransport.test.tsindex 1963bdc3a9..7b1adee2c3 100644--- a/app/src/services/transport/LanHttpTransport.test.ts+++ b/app/src/services/transport/LanHttpTransport.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, it, vi } from 'vitest';import { LanHttpTransport } from './LanHttpTransport';diff --git a/app/src/services/transport/LocalTransport.test.ts b/app/src/services/transport/LocalTransport.test.tsindex 4aa95cbb3b..2287cc2fa8 100644--- a/app/src/services/transport/LocalTransport.test.ts+++ b/app/src/services/transport/LocalTransport.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, it, vi } from 'vitest';import { LocalTransport } from './LocalTransport';diff --git a/app/src/services/transport/TransportManager.race.test.ts b/app/src/services/transport/TransportManager.race.test.tsindex deceee8778..1c8eb1fe7e 100644--- a/app/src/services/transport/TransportManager.race.test.ts+++ b/app/src/services/transport/TransportManager.race.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** LAN-vs-Tunnel race semantics for TransportManager.raceLanAndTunnel (plan.md* §4 P1). The sibling TransportManager.test.ts covers profile *selection* butdiff --git a/app/src/services/transport/TransportManager.test.ts b/app/src/services/transport/TransportManager.test.tsindex dc7c9f88ab..0828a897db 100644--- a/app/src/services/transport/TransportManager.test.ts+++ b/app/src/services/transport/TransportManager.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for TransportManager race semantics.*/diff --git a/app/src/services/transport/TunnelTransport.test.ts b/app/src/services/transport/TunnelTransport.test.tsindex 3479f11fe0..cf6597f252 100644--- a/app/src/services/transport/TunnelTransport.test.ts+++ b/app/src/services/transport/TunnelTransport.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Unit tests for TunnelTransport.*diff --git a/app/src/services/transport/logRedaction.test.ts b/app/src/services/transport/logRedaction.test.tsindex f7eccac075..500efa8ece 100644--- a/app/src/services/transport/logRedaction.test.ts+++ b/app/src/services/transport/logRedaction.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport debug from 'debug';import { describe, expect, it } from 'vitest';diff --git a/app/src/services/walletApi.test.ts b/app/src/services/walletApi.test.tsindex cfc1183dd5..0018d12a83 100644--- a/app/src/services/walletApi.test.ts+++ b/app/src/services/walletApi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';const mockCallCoreRpc = vi.fn();diff --git a/app/src/store/__tests__/accountsSlice.core.test.ts b/app/src/store/__tests__/accountsSlice.core.test.tsindex 9f0f1813b7..53ccf87b5b 100644--- a/app/src/store/__tests__/accountsSlice.core.test.ts+++ b/app/src/store/__tests__/accountsSlice.core.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { Account, AccountLogEntry, IngestedMessage } from '../../types/accounts';diff --git a/app/src/store/__tests__/artifactsPersistFilter.test.ts b/app/src/store/__tests__/artifactsPersistFilter.test.tsindex 03b03f4ab9..6c19c96ca0 100644--- a/app/src/store/__tests__/artifactsPersistFilter.test.ts+++ b/app/src/store/__tests__/artifactsPersistFilter.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Coverage for the persist filter that gates `chatRuntime.artifactsByThread`* on its way to storage (#3024). Confirms the slice's contract:diff --git a/app/src/store/__tests__/channelConnectionsSlice.test.ts b/app/src/store/__tests__/channelConnectionsSlice.test.tsindex 456d6ed7fe..1c545d4956 100644--- a/app/src/store/__tests__/channelConnectionsSlice.test.ts+++ b/app/src/store/__tests__/channelConnectionsSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, {diff --git a/app/src/store/__tests__/chatRuntimeSlice.artifactTabs.test.ts b/app/src/store/__tests__/chatRuntimeSlice.artifactTabs.test.tsindex 68b17a220a..4b846d0335 100644--- a/app/src/store/__tests__/chatRuntimeSlice.artifactTabs.test.ts+++ b/app/src/store/__tests__/chatRuntimeSlice.artifactTabs.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, {diff --git a/app/src/store/__tests__/chatRuntimeSlice.queue.test.ts b/app/src/store/__tests__/chatRuntimeSlice.queue.test.tsindex 9f1f7e8587..4899589598 100644--- a/app/src/store/__tests__/chatRuntimeSlice.queue.test.ts+++ b/app/src/store/__tests__/chatRuntimeSlice.queue.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, {diff --git a/app/src/store/__tests__/chatRuntimeSlice.subagentStream.test.ts b/app/src/store/__tests__/chatRuntimeSlice.subagentStream.test.tsindex d65b1e1eb5..f3fe2dc436 100644--- a/app/src/store/__tests__/chatRuntimeSlice.subagentStream.test.ts+++ b/app/src/store/__tests__/chatRuntimeSlice.subagentStream.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { PersistedTurnState } from '../../types/turnState';diff --git a/app/src/store/__tests__/chatRuntimeSlice.thunk.test.ts b/app/src/store/__tests__/chatRuntimeSlice.thunk.test.tsindex ab19a25251..3d36b6eb69 100644--- a/app/src/store/__tests__/chatRuntimeSlice.thunk.test.ts+++ b/app/src/store/__tests__/chatRuntimeSlice.thunk.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { configureStore } from '@reduxjs/toolkit';import { describe, expect, it, vi } from 'vitest';diff --git a/app/src/store/__tests__/connectivitySelectors.test.ts b/app/src/store/__tests__/connectivitySelectors.test.tsindex 617da4a071..d28fcb3a4b 100644--- a/app/src/store/__tests__/connectivitySelectors.test.ts+++ b/app/src/store/__tests__/connectivitySelectors.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { isHostedDegraded, selectBlockingState } from '../connectivitySelectors';diff --git a/app/src/store/__tests__/notificationSlice.test.ts b/app/src/store/__tests__/notificationSlice.test.tsindex af811d2700..8b76fee8ee 100644--- a/app/src/store/__tests__/notificationSlice.test.ts+++ b/app/src/store/__tests__/notificationSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { REHYDRATE } from 'redux-persist';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/__tests__/notificationsSlice.dismissActions.test.ts b/app/src/store/__tests__/notificationsSlice.dismissActions.test.tsindex 8820c0e8ec..175c0f270e 100644--- a/app/src/store/__tests__/notificationsSlice.dismissActions.test.ts+++ b/app/src/store/__tests__/notificationsSlice.dismissActions.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { IntegrationNotification } from '../../types/notifications';diff --git a/app/src/store/__tests__/notificationsSlice.test.ts b/app/src/store/__tests__/notificationsSlice.test.tsindex 21886ba8f6..31f584e42a 100644--- a/app/src/store/__tests__/notificationsSlice.test.ts+++ b/app/src/store/__tests__/notificationsSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { IntegrationNotification } from '../../types/notifications';diff --git a/app/src/store/__tests__/settingsSlice.test.ts b/app/src/store/__tests__/settingsSlice.test.tsindex df6e1be355..6519f36c1f 100644--- a/app/src/store/__tests__/settingsSlice.test.ts+++ b/app/src/store/__tests__/settingsSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, {diff --git a/app/src/store/__tests__/socketSlice.test.ts b/app/src/store/__tests__/socketSlice.test.tsindex 562333a9a5..48b7c72f59 100644--- a/app/src/store/__tests__/socketSlice.test.ts+++ b/app/src/store/__tests__/socketSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { configureStore } from '@reduxjs/toolkit';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/__tests__/threadSlice.createThread.test.ts b/app/src/store/__tests__/threadSlice.createThread.test.tsindex 2673f4b640..c90f4b8db4 100644--- a/app/src/store/__tests__/threadSlice.createThread.test.ts+++ b/app/src/store/__tests__/threadSlice.createThread.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** #5156 — a `threads_create_new` that blows the 30 s RPC budget must land as a* recorded, displayable failure, never as an unhandled rejection.diff --git a/app/src/store/__tests__/userErrorsSlice.test.ts b/app/src/store/__tests__/userErrorsSlice.test.tsindex 0eff87eac2..b331420033 100644--- a/app/src/store/__tests__/userErrorsSlice.test.ts+++ b/app/src/store/__tests__/userErrorsSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { configureStore } from '@reduxjs/toolkit';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/chatRuntimeSlice.reasoningTiming.test.ts b/app/src/store/chatRuntimeSlice.reasoningTiming.test.tsindex 58ec3610e8..72f0c6a16a 100644--- a/app/src/store/chatRuntimeSlice.reasoningTiming.test.ts+++ b/app/src/store/chatRuntimeSlice.reasoningTiming.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { configureStore } from '@reduxjs/toolkit';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/chatRuntimeSlice.toolFailure.test.ts b/app/src/store/chatRuntimeSlice.toolFailure.test.tsindex 9ff93f66d1..41640ce8cb 100644--- a/app/src/store/chatRuntimeSlice.toolFailure.test.ts+++ b/app/src/store/chatRuntimeSlice.toolFailure.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { parseToolFailure } from './chatRuntimeSlice';diff --git a/app/src/store/followupSuggestionsSlice.test.ts b/app/src/store/followupSuggestionsSlice.test.tsindex bc1876557c..9c8e8ad068 100644--- a/app/src/store/followupSuggestionsSlice.test.ts+++ b/app/src/store/followupSuggestionsSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/store/githubStarSlice.test.ts b/app/src/store/githubStarSlice.test.tsindex 43fa7d2669..5cd4563a62 100644--- a/app/src/store/githubStarSlice.test.ts+++ b/app/src/store/githubStarSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, { dismissGithubStarCta, type GithubStarState } from './githubStarSlice';diff --git a/app/src/store/layoutSlice.test.ts b/app/src/store/layoutSlice.test.tsindex 231db7d244..83441cd829 100644--- a/app/src/store/layoutSlice.test.ts+++ b/app/src/store/layoutSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import layoutReducer, {diff --git a/app/src/store/mascotSlice.liveVoice.test.ts b/app/src/store/mascotSlice.liveVoice.test.tsindex 9116e36378..58206fba35 100644--- a/app/src/store/mascotSlice.liveVoice.test.ts+++ b/app/src/store/mascotSlice.liveVoice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { REHYDRATE } from 'redux-persist';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/mascotSlice.voiceMode.test.ts b/app/src/store/mascotSlice.voiceMode.test.tsindex f072910bfb..83f784dd0c 100644--- a/app/src/store/mascotSlice.voiceMode.test.ts+++ b/app/src/store/mascotSlice.voiceMode.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { REHYDRATE } from 'redux-persist';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/personaSlice.test.ts b/app/src/store/personaSlice.test.tsindex 7629aa4734..7db295afea 100644--- a/app/src/store/personaSlice.test.ts+++ b/app/src/store/personaSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { REHYDRATE } from 'redux-persist';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/queueSlice.test.ts b/app/src/store/queueSlice.test.tsindex 6356d45392..0e4ea61735 100644--- a/app/src/store/queueSlice.test.ts+++ b/app/src/store/queueSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { ThreadMessage } from '../types/thread';diff --git a/app/src/store/runModeSlice.test.ts b/app/src/store/runModeSlice.test.tsindex f4baf0b0e1..291bec1c47 100644--- a/app/src/store/runModeSlice.test.ts+++ b/app/src/store/runModeSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, { type RunModeState, setRunMode } from './runModeSlice';diff --git a/app/src/store/themeSlice.test.ts b/app/src/store/themeSlice.test.tsindex ab0fc5ef9f..df6b4c0532 100644--- a/app/src/store/themeSlice.test.ts+++ b/app/src/store/themeSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { REHYDRATE } from 'redux-persist';import { describe, expect, it } from 'vitest';diff --git a/app/src/store/threadGoalSlice.test.ts b/app/src/store/threadGoalSlice.test.tsindex a60ada8157..e13057d77e 100644--- a/app/src/store/threadGoalSlice.test.ts+++ b/app/src/store/threadGoalSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, { clearThreadGoal, setThreadGoal, type ThreadGoalState } from './threadGoalSlice';diff --git a/app/src/store/threadTodosSlice.test.ts b/app/src/store/threadTodosSlice.test.tsindex e526773934..e1a0c21df4 100644--- a/app/src/store/threadTodosSlice.test.ts+++ b/app/src/store/threadTodosSlice.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import reducer, {diff --git a/app/src/test/eslintCentralizedConfigRule.test.ts b/app/src/test/eslintCentralizedConfigRule.test.tsindex cf14b02719..b93dc1ba87 100644--- a/app/src/test/eslintCentralizedConfigRule.test.ts+++ b/app/src/test/eslintCentralizedConfigRule.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport tsparser from '@typescript-eslint/parser';import { Linter } from 'eslint';import { describe, expect, it } from 'vitest';diff --git a/app/src/test/mockApiCore.headersRedaction.test.ts b/app/src/test/mockApiCore.headersRedaction.test.tsindex 72dfd18ec2..d16ed9cf8b 100644--- a/app/src/test/mockApiCore.headersRedaction.test.ts+++ b/app/src/test/mockApiCore.headersRedaction.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { expect, it } from 'vitest';// @ts-ignore - test-only JS module outside app/srcdiff --git a/app/src/test/mockApiCore.portSelection.test.ts b/app/src/test/mockApiCore.portSelection.test.tsindex 95a79e8b68..1de09512c6 100644--- a/app/src/test/mockApiCore.portSelection.test.ts+++ b/app/src/test/mockApiCore.portSelection.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport net from 'node:net';import { afterEach, expect, it } from 'vitest';diff --git a/app/src/test/setup.ts b/app/src/test/setup.tsindex c9e156f3e6..96f347d920 100644--- a/app/src/test/setup.ts+++ b/app/src/test/setup.ts@@ -117,7 +117,7 @@ alignGlobalEventWithDom();// Polyfill window.matchMedia — used by Rive (@rive-app/react-webgl2) and// some media-query hooks; not implemented in jsdom.-if (typeof window !== 'undefined' && typeof window.matchMedia === 'undefined') {+if (typeof window.matchMedia === 'undefined') {Object.defineProperty(window, 'matchMedia', {writable: true,value: vi.fn((query: string) => ({@@ -190,7 +190,7 @@ if (typeof globalThis.IntersectionObserver === 'undefined') {// Polyfill PointerEvent for @testing-library/user-event's pointer sequences// against Radix triggers. jsdom 28 still ships no PointerEvent constructor, so// user-event falls back to MouseEvent and Radix's pointer handlers never fire.-if (typeof globalThis.PointerEvent === 'undefined' && typeof MouseEvent !== 'undefined') {+if (typeof globalThis.PointerEvent === 'undefined') {globalThis.PointerEvent = class PointerEvent extends MouseEvent {readonly pointerId: number;readonly pointerType: string;@@ -212,11 +212,9 @@ if (typeof globalThis.PointerEvent === 'undefined' && typeof MouseEvent !== 'und// regress to the non-Tauri path. Seed a no-op handle once globally so the// IPC-readiness check passes by default. Tests that *want* the CEF gap// behaviour can `delete window.__TAURI_INTERNALS__` in a `beforeEach`.-if (typeof window !== 'undefined') {- (- window as unknown as { __TAURI_INTERNALS__: { invoke: () => Promise<unknown> } }- ).__TAURI_INTERNALS__ = { invoke: vi.fn(() => Promise.resolve()) };-}+(+ window as unknown as { __TAURI_INTERNALS__: { invoke: () => Promise<unknown> } }+).__TAURI_INTERNALS__ = { invoke: vi.fn(() => Promise.resolve()) };// Mock Tauri APIs (not available in test env)vi.mock('@tauri-apps/api/core', () => ({ invoke: vi.fn(), isTauri: vi.fn(() => false) }));@@ -412,18 +410,16 @@ afterEach(async () => {// Fake-timer suites own their clock. Awaiting a synthetic timer there would// wait until Vitest's per-test timeout, rather than draining anything.if (!vi.isFakeTimers()) {- await new Promise<void>(resolve => setTimeout(resolve, 0));+ await new Promise<void>(resolve => window.setTimeout(resolve, 0));}alignGlobalEventWithDom();// Re-seed the IPC handle after any test that may have deleted it// (e.g. tests exercising the CEF-gap branch of `isTauri()`). Without// this, sibling tests in the same jsdom worker would silently regress// to the non-Tauri path. Per graycyrus review on PR #1556.- if (typeof window !== 'undefined') {- (- window as unknown as { __TAURI_INTERNALS__: { invoke: () => Promise<unknown> } }- ).__TAURI_INTERNALS__ = { invoke: vi.fn(() => Promise.resolve()) };- }+ (+ window as unknown as { __TAURI_INTERNALS__: { invoke: () => Promise<unknown> } }+ ).__TAURI_INTERNALS__ = { invoke: vi.fn(() => Promise.resolve()) };});afterAll(async () => {await stopMockServer();diff --git a/app/src/utils/__tests__/latex.test.ts b/app/src/utils/__tests__/latex.test.tsindex 24ab002b44..c4f3897b28 100644--- a/app/src/utils/__tests__/latex.test.ts+++ b/app/src/utils/__tests__/latex.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { hasLatexContent, normalizeLatexDelimiters } from '../latex';diff --git a/app/src/utils/__tests__/openrouterOAuth.test.ts b/app/src/utils/__tests__/openrouterOAuth.test.tsindex 2b20db2707..d4c6896ead 100644--- a/app/src/utils/__tests__/openrouterOAuth.test.ts+++ b/app/src/utils/__tests__/openrouterOAuth.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import { connectOpenRouterViaOAuth } from '../openrouterOAuth';diff --git a/app/src/utils/__tests__/sanitize.test.ts b/app/src/utils/__tests__/sanitize.test.tsindex 6143c8f1c6..60940d07d0 100644--- a/app/src/utils/__tests__/sanitize.test.ts+++ b/app/src/utils/__tests__/sanitize.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { createSafeLogData, sanitizeError, sanitizeForLogging } from '../sanitize';diff --git a/app/src/utils/__tests__/tauriCoreBridge.e2e.test.ts b/app/src/utils/__tests__/tauriCoreBridge.e2e.test.tsindex e1437b03be..7d37509266 100644--- a/app/src/utils/__tests__/tauriCoreBridge.e2e.test.ts+++ b/app/src/utils/__tests__/tauriCoreBridge.e2e.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { isTauri } from '@tauri-apps/api/core';import { beforeEach, describe, expect, type Mock, test, vi } from 'vitest';diff --git a/app/src/utils/__tests__/toolTimelineFormatting.test.ts b/app/src/utils/__tests__/toolTimelineFormatting.test.tsindex f8c047c8f0..017e87a337 100644--- a/app/src/utils/__tests__/toolTimelineFormatting.test.ts+++ b/app/src/utils/__tests__/toolTimelineFormatting.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import type { ToolTimelineEntry } from '../../store/chatRuntimeSlice';diff --git a/app/src/utils/cryptoKeys.test.ts b/app/src/utils/cryptoKeys.test.tsindex b3828cd1a8..40b9429969 100644--- a/app/src/utils/cryptoKeys.test.ts+++ b/app/src/utils/cryptoKeys.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { deriveAesKeyFromSeed } from './cryptoKeys';diff --git a/app/src/utils/format.test.ts b/app/src/utils/format.test.tsindex 1d6c3174a0..013c3d2158 100644--- a/app/src/utils/format.test.ts+++ b/app/src/utils/format.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { formatBytes } from './format';diff --git a/app/src/utils/hashRouterBootstrap.test.ts b/app/src/utils/hashRouterBootstrap.test.tsindex 6f62384345..25e45cf8cd 100644--- a/app/src/utils/hashRouterBootstrap.test.ts+++ b/app/src/utils/hashRouterBootstrap.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { missingHashRedirectTarget } from './hashRouterBootstrap';diff --git a/app/src/utils/ollamaUrlValidation.test.ts b/app/src/utils/ollamaUrlValidation.test.tsindex ae8a0931fb..2f799bc968 100644--- a/app/src/utils/ollamaUrlValidation.test.ts+++ b/app/src/utils/ollamaUrlValidation.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { validateOllamaUrl } from './ollamaUrlValidation';diff --git a/app/src/utils/relativeTime.test.ts b/app/src/utils/relativeTime.test.tsindex 8517136334..920ce8572a 100644--- a/app/src/utils/relativeTime.test.ts+++ b/app/src/utils/relativeTime.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { fullTimestamp, relativeTime } from './relativeTime';diff --git a/app/src/utils/semver.test.ts b/app/src/utils/semver.test.tsindex a91aa89767..8282103a3b 100644--- a/app/src/utils/semver.test.ts+++ b/app/src/utils/semver.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { compareSemver, isVersionAtLeast, parseSemverParts } from './semver';diff --git a/app/src/utils/supportUrl.test.ts b/app/src/utils/supportUrl.test.tsindex ae5abae4e7..368a090d0a 100644--- a/app/src/utils/supportUrl.test.ts+++ b/app/src/utils/supportUrl.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, test, vi } from 'vitest';import { DISCORD_INVITE_URL } from './links';diff --git a/app/src/utils/tauriCommands/__tests__/config.test.ts b/app/src/utils/tauriCommands/__tests__/config.test.tsindex f54ac45380..280c15d727 100644--- a/app/src/utils/tauriCommands/__tests__/config.test.ts+++ b/app/src/utils/tauriCommands/__tests__/config.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../../../services/coreRpcClient';diff --git a/app/src/utils/tauriCommands/__tests__/migrateHermes.test.ts b/app/src/utils/tauriCommands/__tests__/migrateHermes.test.tsindex c7f70c4b77..57aae363c1 100644--- a/app/src/utils/tauriCommands/__tests__/migrateHermes.test.ts+++ b/app/src/utils/tauriCommands/__tests__/migrateHermes.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it, vi } from 'vitest';import { callCoreRpc } from '../../../services/coreRpcClient';diff --git a/app/src/utils/tauriCommands/config.test.ts b/app/src/utils/tauriCommands/config.test.tsindex e65ff2396d..3f87ae75e0 100644--- a/app/src/utils/tauriCommands/config.test.ts+++ b/app/src/utils/tauriCommands/config.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { isTauri } from '@tauri-apps/api/core';import { afterEach, beforeEach, describe, expect, type Mock, test, vi } from 'vitest';diff --git a/app/src/utils/tauriCommands/cron.test.ts b/app/src/utils/tauriCommands/cron.test.tsindex fa6d871160..51f9fa25ba 100644--- a/app/src/utils/tauriCommands/cron.test.ts+++ b/app/src/utils/tauriCommands/cron.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Vitest coverage for the two new cron tauriCommand wrappers added by the* skills runner PR: openhumanCronRun and openhumanCronRuns.diff --git a/app/src/utils/tauriCommands/directoryPicker.test.ts b/app/src/utils/tauriCommands/directoryPicker.test.tsindex 8b84739d48..68a620431c 100644--- a/app/src/utils/tauriCommands/directoryPicker.test.ts+++ b/app/src/utils/tauriCommands/directoryPicker.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Tests for the native directory chooser wrapper (#5831).*diff --git a/app/src/utils/tauriCommands/localAi.test.ts b/app/src/utils/tauriCommands/localAi.test.tsindex f7aa8f803d..fb5d88c8dc 100644--- a/app/src/utils/tauriCommands/localAi.test.ts+++ b/app/src/utils/tauriCommands/localAi.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { beforeEach, describe, expect, it, vi } from 'vitest';vi.mock('../../services/coreRpcClient', () => ({ callCoreRpc: vi.fn() }));diff --git a/app/src/utils/tauriCommands/taskSources.test.ts b/app/src/utils/tauriCommands/taskSources.test.tsindex bbafbe75ac..e753b1b847 100644--- a/app/src/utils/tauriCommands/taskSources.test.ts+++ b/app/src/utils/tauriCommands/taskSources.test.ts@@ -1,4 +1,3 @@-// @vitest-environment node/*** Vitest for the task-sources tauriCommands surface.*diff --git a/app/src/utils/tauriCommands/workspacePaths.test.ts b/app/src/utils/tauriCommands/workspacePaths.test.tsindex cd18aae799..4e5c3f9f80 100644--- a/app/src/utils/tauriCommands/workspacePaths.test.ts+++ b/app/src/utils/tauriCommands/workspacePaths.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { invoke } from '@tauri-apps/api/core';import { beforeEach, describe, expect, test, vi } from 'vitest';diff --git a/app/src/utils/tauriCsp.test.ts b/app/src/utils/tauriCsp.test.tsindex c89cfa16b7..bfc1634c1f 100644--- a/app/src/utils/tauriCsp.test.ts+++ b/app/src/utils/tauriCsp.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { readFileSync } from 'node:fs';import { resolve } from 'node:path';import { describe, expect, it } from 'vitest';diff --git a/app/src/utils/toolDefinitions.test.ts b/app/src/utils/toolDefinitions.test.tsindex a4f4226062..359523b6c6 100644--- a/app/src/utils/toolDefinitions.test.ts+++ b/app/src/utils/toolDefinitions.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import {diff --git a/app/src/utils/workspaceLinks.test.ts b/app/src/utils/workspaceLinks.test.tsindex 978fa146b8..78136cfee7 100644--- a/app/src/utils/workspaceLinks.test.ts+++ b/app/src/utils/workspaceLinks.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, test } from 'vitest';import { isWorkspaceHref, parseWorkspaceHref } from './workspaceLinks';diff --git a/app/test/core-rpc-node.test.ts b/app/test/core-rpc-node.test.tsindex 9d6a2b1b41..5af670abf0 100644--- a/app/test/core-rpc-node.test.ts+++ b/app/test/core-rpc-node.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { afterEach, describe, expect, it, vi } from 'vitest';import { formatRpcCallFailure } from './e2e/helpers/core-rpc-node';diff --git a/app/test/coverage-matrix-parser.test.ts b/app/test/coverage-matrix-parser.test.tsindex 86e2902f8b..d6ec3ce7af 100644--- a/app/test/coverage-matrix-parser.test.ts+++ b/app/test/coverage-matrix-parser.test.ts@@ -1,4 +1,3 @@-// @vitest-environment nodeimport { describe, expect, it } from 'vitest';import { parseMatrix, validateAgainstCatalog } from '../../scripts/lib/coverage-matrix-parser.mjs';