Decompose: Break down #28 into implementable work units #29
Labels
No labels
blocked:needs-human
blocked:verify-failed
bug
feature-request
quickfix
security/high
security/medium
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/subvault#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Decomposition of #28: [smoke-test] Test coverage review: 93 source files, 8 test files (8.6%)
This issue decomposes the parent feature into independently implementable phases.
P1: Test Infrastructure — install Vitest + React Testing Library, write vitest.config.ts, add npm scripts ('npm run test', CI-friendly), write a smoke test that imports App and renders (confirms infra works), update AGENTS.md with test commands.
Files: vitest.config.ts, src/setupTests.ts, package.json, AGENTS.md
P2: Utility & Hook Tests — test all pure utility functions in src/lib/ and src/utils/ (formatDate, validateEmail, crypto helpers), test custom hooks (useAuth, useVault, useMobile) with mock providers, aim for 100% coverage on these files since they're pure logic with zero UI complexity.
Files: src/lib/formatDate.ts, src/lib/validateEmail.ts, src/hooks/useAuth.ts, src/hooks/useVault.ts, src/hooks/useMobile.ts
Depends on: P1
P3: Core UI Component Tests — test shared UI primitives (src/components/ui/*: Button, Card, Input, Dialog) and auth flow components (AuthPage, LoginForm). These are the highest-traffic components and catch the most regressions.
Files: src/components/ui/button.tsx, src/components/ui/card.tsx, src/components/ui/input.tsx, src/components/AuthPage.tsx, src/components/LoginForm.tsx
Depends on: P1
P4: Feature Component Tests — test vault management components (VaultList, VaultDetail, VaultCard, FileUploader) and settings/profile pages. Use MSW or mock service layer to avoid real API calls.
Files: src/components/VaultList.tsx, src/components/VaultDetail.tsx, src/components/VaultCard.tsx, src/components/FileUploader.tsx, src/components/SettingsPage.tsx
Depends on: P3
P5: Backend Tests — set up Vitest in backend/ (or Jest if preferred), test Express route handlers, middleware (auth, rate-limit), and service layer. Mock Firestore/DynamoDB. Add CI config to run both frontend + backend test suites.
Files: backend/package.json, backend/vitest.config.ts, backend/src/routes/auth.ts, backend/src/routes/vaults.ts, backend/src/middleware/auth.ts
Depends on: P1
P6: Integration & Edge Cases — add integration tests for full auth flow (register → login → access vault), file encryption/decryption round-trip tests, error boundary tests, and any remaining untested source files to push coverage past 50%. Coverage threshold enforcement in CI.
Files: .github/workflows/test.yml, vitest.config.ts, src/App.tsx, src/ErrorBoundary.tsx
Depends on: P4, P5
Post-completion: When each phase is complete, comment on #28 with a summary of what was implemented.