You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(frontend): unblock browser-mode vitest and land visual baselines (#2500)
* fix(frontend): unblock browser-mode vitest so visual baselines can generate
Baseline generation has never completed ('blocks on the first cold
Vitest+Playwright browser-mode launch and runs out the job timeout' per
the test-browser CI comment). Root causes, in the order they unmasked:
- @icons-pack/react-simple-icons was barrel-imported; dev-mode Vite
pre-bundles the ~3000-icon 59MB package into one module, crashing the
chromium tab ('Browser connection was closed'). Switched to deep
per-icon .mjs imports (exports map is verbatim './icons/*') with an
ambient wildcard declaration for types.
- ai-agent-list-page.browser.test.tsx mocked state/ui-state via
importOriginal, evaluating the real module's huge transitive graph and
stalling module loading. Replaced with a plain factory.
- The same test mocked react-query/api/remote-mcp but the page imports
react-query/api/aigw/mcp-servers (stale mock target); fixed and wrapped
the render in QueryClientProvider.
- mockConnectQuery now spreads the actual @connectrpc/connect-query so
every re-export (TransportProvider, hooks) stays available; vi.mock
factories resolve helpers via dynamic import (hoisting-safe).
- vitest.config.browser.mts scans browser specs via optimizeDeps.entries
so Vite pre-bundles their dep graph up front instead of re-optimizing
mid-run.
Full browser suite now completes under CI=true: 6 files, 15 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore(frontend): add visual regression baselines
Generated by the frontend-update-baselines workflow on the original
branch; carried over verbatim so test-browser runs strict comparison.
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
0 commit comments