3 Commits

Author SHA1 Message Date
Teknium d5774ad880 fix(tests): pay heavy view imports at collection, not the first test's budget
Three CI-load flakes from the same class — a fixed per-test timeout billed
for one-time module-transform/env-init cost:

- apps/desktop messaging/index.test.tsx: `await import('./index')` ran inside
  renderMessaging(), so the FIRST test paid the whole MessagingView transform.
  On loaded runners that alone blew the 15s testTimeout and cascade-failed all
  subsequent tests in the file (unmounted DOM). Red on main runs 34599517793,
  34600757569, 34601269252 (green file takes 15.7s on a green main run —
  already over the first test's budget when billed there). Import moved to
  module scope, where vitest bills it to collection.
- apps/desktop skills/index.test.tsx: same pattern, 9 call sites; the file ran
  18.6s on a green main run. Deduplicated to one module-scope import (the
  existing 60s describe-timeout stays for the legitimately slow tests).
- web SessionsPage.test.tsx: the web vitest project still ran on vitest's 5s
  default while its per-row routing test legitimately takes 3.6-4.6s on GREEN
  runs; run 34600757569 tipped it to 5079ms. Gave web/vitest.config.ts the
  same 15s testTimeout the desktop project already carries, with the same
  rationale comment.

Validation: both desktop files 5x consecutive green + green pinned to 1 CPU
core (worst-case contention); SessionsPage 3x green; full desktop ui project
(801 files / 7622 tests) green; tsc + eslint clean on touched files.
2026-09-12 21:34:17 -07:00
Jaaneek 95057c2a63 feat(desktop,web): enable the React Compiler in both renderer builds
Wire babel-plugin-react-compiler through @vitejs/plugin-react v6's
reactCompilerPreset + @rolldown/plugin-babel in the web and desktop
vite configs, scoped to modules that can actually contain components
or hooks (JSX syntax or a react-ish import — the preset's default
filter babel-parsed every TS module). Both vitest configs run compiled
components, so rules-of-react violations fail in CI.

Also fixes the latent bug the compiler exposed: usePluginI18n kept a
stable translator identity over a mutating locale registry, so
memoized consumers (React.memo today, compiled components tomorrow)
served stale strings after a late bundle registration. The registry
version now keys the translator identity — correct with or without
the compiler.
2026-08-20 19:44:26 -07:00
Alex Yates dc5cb0a440 fix(dashboard): refresh Sessions list in real time when new sessions are created
The dashboard's FastAPI server and a terminal CLI are separate processes
sharing one SQLite session DB; there is no inter-process push channel.
The Sessions page polled the 50 newest sessions every 5s for the
"overview" card but only re-fetched the paginated sessions list on page
change or delete, so a session started in a terminal never appeared in
the list until the user navigated.

Reuse the existing 5s overview poll as a change signal: when the head
session id changes, silently reload the current page (no loading
spinner flicker, no scroll/reset of expanded rows or bulk selection,
which are keyed by id). The detection logic is extracted into a pure
shouldRefreshSessions() helper with unit tests. Adds a minimal vitest
setup for web/ (test script + config).
2026-06-19 17:26:11 +05:30