Repository navigation
Description
Summary
Five tests assert contracts the code has already moved past. Each still fails,
but none indicates a live defect — the risk is the opposite one: two of them
had stopped testing what they claim to test.
1. releaseWorkflow expects a bundle target that moved
expect(workflow).toContain('bundles: app,dmg');desktop-release.yml now builds macOS with bundles: app and produces the DMG
in a dedicated step (Notarize macOS app and create DMG →
scripts/macos-notarize-and-dmg.js), so the disk image wraps an
already-notarized bundle. The DMG is still published; only the assertion is
stale. Worth asserting the notarize step by name so DMG coverage is retained
rather than deleted.
2. dialog.styles lists App.tsx as a custom modal
const customModalFiles = ['src/App.tsx', ...];
// each must contain 'modal-surface'App.tsx no longer hand-rolls a modal — its crash dialog moved to
CrashReportDialog, which uses the shared Dialog / DialogContent
primitives that already own the surface contract. The other three entries
(SearchPalette, GitDiscardDialog, GitDiffModal) are still genuine custom
modals and still carry modal-surface.
3. UseSessionComposerQueue asserts a renamed payload field
expect(api.submitInput).toHaveBeenCalledWith('session-1', {
...
pluginActions: [],The submit payload field is workflowRefs throughout
sendAgentRuntimeTurn.ts, conversationApi.ts and backendTransport.ts;
pluginActions is only the local UI-side name, mapped in
useSessionComposerQueue.ts.
4. The web-fetch test was silently not testing its fallback
// The Tauri shell plugin is unavailable in jsdom, so the system-browser
// opener falls back to window.open.
const openSpy = vi.spyOn(window, 'open')...The premise is false: src/test/vitest.setup.ts mocks
@tauri-apps/plugin-shell for every suite with
open: vi.fn().mockResolvedValue(undefined). So openInSystemBrowser
succeeds through the mocked Tauri path and never reaches window.open — the
fallback the test exists to cover was never exercised. Making the mocked
open reject restores the coverage.
5. AgentRegistryView matches a name that now appears twice
expect(screen.getByText('DeepSeek Harness')).toBeInTheDocument();AgentManagementIcon renders the agent name in an SVG <title> for screen
readers, so getByText matches both that and the visible row label and throws
"Found multiple elements". The a11y title is correct and worth keeping; the
query needs to target the visible label.
Reproduce
cd frontend && pnpm exec vitest run
Activity