Files
hermes-agent/apps/desktop/vitest.config.ts
T
Eugeniusz Gilewski 4588126bbd fix(desktop): bound inflight journal persistence (#63047)
The desktop journal synchronously read, parsed, cloned, and rewrote one
aggregate localStorage value while streamed turns were repainting. Large
tool results and multi-session state could therefore block the renderer and
leave the app unresponsive, while the existing macOS diagnostic path lacked
a real native hide/restore regression check.

Store bounded recovery projections under per-session keys, migrate legacy v1
data once, isolate quota and storage failures, and preserve the newest
recoverable tail without allowing oversized writes to replace valid state.
Add a real Electron/CDP macOS-arm64 A/B harness with native visibility control,
renderer heartbeat and Settings/composer/transcript checks, plus focused
regressions. Keep bulk tool payloads, diagnostics, and the existing recovery
merge behavior out of the hot path.

Fixes #63047
2026-08-14 21:10:13 -07:00

33 lines
920 B
TypeScript

import type { TestProjectConfiguration } from 'vitest/config'
import { defineConfig } from 'vitest/config'
const reactUi: TestProjectConfiguration = {
extends: './vite.config.ts',
test: {
name: 'ui',
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts'],
include: ['src/**/*.test.{ts,tsx}'],
globals: true,
// The first test in each file pays jsdom env init + full module transform,
// which can exceed vitest's 5000ms default under CI/load. 15s gives the
// cold start headroom without masking genuinely hung tests.
testTimeout: 15_000
}
}
const electronNative: TestProjectConfiguration = {
test: {
name: 'electron',
environment: 'node',
include: ['electron/**/*.test.ts', 'scripts/**.test.{ts,mjs}'],
exclude: ['scripts/run-short-session-hang-repro.test.mjs']
}
}
export default defineConfig({
test: {
projects: [reactUi, electronNative]
}
})