Files
deepseek-harness/vitest.config.ts
T
NI0317 c4584b5c19 feat(ui): rebuild desktop renderer on a shared trace graph and design tokens
Replace the full-innerHTML render loop with a static shell plus
per-region updates, so composer drafts, fold state, focus, and scroll
survive streaming turns. Fold session events into one trace graph
consumed by Chat, Trajectory, Waterfall, and the shared inspector
drawer, with live ACP updates patched into a keyed live-turn region.

Align the visual system with a tokenized design spec: a 4px spacing
base with fixed control/row height steps, foreground-derived text
tiers and borders (color-mix), neutral interaction overlays, tiered
motion durations with a reduced-motion collapse, hover-revealed
scrollbars, and drawer-aware layout elasticity. Localize trajectory
role chips and row previews.

The renderer entry (app.ts) joins the coverage exclude list as a
self-executing DOM bootstrap: jsdom lifecycle specs exercise its
behavior, and extractable logic lives in covered modules
(trace-graph.ts, renderer-content.ts).
2026-07-19 01:37:04 +08:00

38 lines
2.0 KiB
TypeScript

import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'
export default defineConfig({
// Native path resolution reads each package's nearest tsconfig, but only the root defines
// workspace paths. Keep this plugin pinned to the root map so unbuilt bare package imports resolve
// to source; native resolution would fall through to absent `lib/` outputs.
plugins: [tsconfigPaths({ projects: ['./tsconfig.json'] })],
test: {
include: ['packages/*/*/tests/**/*.spec.ts', 'examples/*/tests/**/*.spec.ts', 'scripts/**/*.spec.ts'],
coverage: {
provider: 'v8',
// Coverage measures OUR runtime source. Types-only files carry no
// executable code; vendor/ and examples/ are out of scope (examples are
// exercised by the demo smoke test instead).
include: ['packages/*/*/src/**/*.ts'],
// Types-only files have no runtime coverage. Importing self-executing bins/workers would boot
// them inside the unit process, so real subprocess/Worker tests cover their thin entry glue.
// The desktop renderer entry is the same shape: a self-executing DOM bootstrap whose behavior
// is exercised by jsdom lifecycle specs; its extractable logic lives in covered modules
// (trace-graph.ts, renderer-content.ts) and grows there, not in the entry.
exclude: ['packages/*/*/src/types.ts', 'packages/*/*/src/bin.ts', 'packages/*/*/src/worker.ts', 'packages/ui/desktop/src/app.ts'],
// 100% or it doesn't merge (docs/testing.md: excessive tests are welcome).
// Per-file so a well-covered big file can't subsidize a bare one.
// Every v8 ignore comment must carry a reason — see the quality-gates RFC
// (docs/rfc/implemented/process/2026-06-11-quality-gates.md).
thresholds: {
perFile: true,
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
reporter: process.env.CI ? ['text'] : ['text', 'html'],
},
},
})