Files
fusion/.planning/test-cull-duplicates.md
Fusion c990c115a3 test(dashboard): consolidate low-signal TaskDetailModal matrix tests
Collapse CSS-class presence checks and column-gate permutations into
table-driven variants. The rest of this file covers real user flows
(retry uniqueness FN-bug, paste/drag upload, plan approval, inline
editing, agent assignment, etc.) and was left intact.

- mobile responsive structure 6→1 (class-presence aggregate)
- Commits tab visibility 3→1 (it.each over done-task variants)
- Refinement button column gate 5→2 (it.each over columns)
- Workflow tab visibility 4→1 (it.each over data states)

5,676 → 5,433 LOC (-243). 190 tests still passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 10:03:57 -07:00

1.5 KiB

Confirmed dashboard test duplicates

9 components/hooks have two parallel test files in packages/dashboard: one in the flat dir and one in a sibling __tests__/ dir. Same filename, different content.

Subject flat (LOC) __tests__/ (LOC) Larger
TaskCard.test.tsx 556 4399 tests
SettingsModal.test.tsx 893 4317 tests
Header.test.tsx 1125 1710 tests
QuickScriptsDropdown.test.tsx 510 196 flat
MissionInterviewModal.test.tsx ? ?
AgentImportModal.test.tsx ? ?
useProjects.test.ts 446 419 flat
useUsageData.test.ts 108 59 flat
useActivityLog.test.ts 280 92 flat

Both vitest configs (if any per-pkg excludes) need checking — some of these may already be excluded from the run.

Cross-package integration overlap

File core (LOC) engine (LOC)
mission-factory-parity.integration.test.ts 544 666
run-audit.integration.test.ts 560 703

Not true duplicates (different packages own different implementations) but contract overlap warrants review before Phase 1 deletion.

Next step

Before deleting any flat-vs-__tests__ pair, diff the two to confirm they really cover the same thing. Auto-assumption: __tests__/ is newer and larger wins; flat version is stale. QuickScriptsDropdown, useProjects, useUsageData, useActivityLog break that pattern — the flat file is larger, so the __tests__ copy may be the redundant one.