Decompose: Break down #10 into implementable work units #11

Closed
opened 2026-05-16 23:35:18 +00:00 by Mark · 3 comments
Owner

Decomposition of #10: [smoke-test] Test coverage review: 96 source files, 3 test files (3.1%)

This issue decomposes the parent feature into independently implementable phases.


P1: Test infrastructure setup — install vitest, React Testing Library, jsdom, msw, and mock factories for Dexie/IndexedDB and Capacitor plugins. Creates vitest.config.ts, setupTests.ts with jest-dom matchers, and shared mock factories. Without this, no tests can run.

Files: package.json, vitest.config.ts, src/setupTests.ts, src/lib/mocks/db.ts, src/lib/mocks/capacitor.ts

P2: Pure utility function tests — utils.ts and date-utils.ts are pure functions with no external deps (no mocking needed). Fast to write, immediate coverage wins. ~15-20 tests covering edge cases for date formatting, relationship calculations, overdue alerts.

Files: src/lib/tests/utils.test.ts, src/lib/tests/date-utils.test.ts
Depends on: P1

P3: Data layer tests — db.ts (Dexie IndexedDB CRUD operations) and store.ts (Zustand state transitions). Uses mocks from P1. Covers contact CRUD, interaction logging, gift tracking, import/export, and store action dispatch correctness.

Files: src/lib/tests/db.test.ts, src/lib/tests/store.test.ts
Depends on: P1

P4: Shared UI component tests — each shadcn/ui wrapper and shared component (button, input, dialog, card, avatar, badge, etc.) gets a smoke test (renders without crashing) plus key interaction tests where applicable. Pure RTL, no store integration needed.

Files: src/components/tests/shared-components.test.tsx
Depends on: P1

P5: Page/screen component tests — Home, People, Dates, Settings, LogInteraction pages with store integration tests. Each page rendered with mocked Zustand store state covering loading, empty, populated, and error states. The most impactful slice for coverage %.

Files: src/pages/tests/Home.test.tsx, src/pages/tests/People.test.tsx, src/pages/tests/Dates.test.tsx, src/pages/tests/Settings.test.tsx, src/pages/tests/LogInteraction.test.tsx
Depends on: P3, P4

P6: App shell and native wrapper tests — App.tsx router smoke test, Capacitor native plugin wrapper tests (contacts import, camera, haptics, notifications, share). Covers any remaining uncovered files and pushes toward the 50% target.

Files: src/tests/App.test.tsx, src/lib/native/tests/plugin-wrappers.test.ts
Depends on: P5


Post-completion: When each phase is complete, comment on #10 with a summary of what was implemented.

## Decomposition of #10: [smoke-test] Test coverage review: 96 source files, 3 test files (3.1%) This issue decomposes the parent feature into independently implementable phases. --- ### P1: Test infrastructure setup — install vitest, React Testing Library, jsdom, msw, and mock factories for Dexie/IndexedDB and Capacitor plugins. Creates vitest.config.ts, setupTests.ts with jest-dom matchers, and shared mock factories. Without this, no tests can run. **Files:** package.json, vitest.config.ts, src/setupTests.ts, src/lib/__mocks__/db.ts, src/lib/__mocks__/capacitor.ts ### P2: Pure utility function tests — utils.ts and date-utils.ts are pure functions with no external deps (no mocking needed). Fast to write, immediate coverage wins. ~15-20 tests covering edge cases for date formatting, relationship calculations, overdue alerts. **Files:** src/lib/__tests__/utils.test.ts, src/lib/__tests__/date-utils.test.ts **Depends on:** P1 ### P3: Data layer tests — db.ts (Dexie IndexedDB CRUD operations) and store.ts (Zustand state transitions). Uses mocks from P1. Covers contact CRUD, interaction logging, gift tracking, import/export, and store action dispatch correctness. **Files:** src/lib/__tests__/db.test.ts, src/lib/__tests__/store.test.ts **Depends on:** P1 ### P4: Shared UI component tests — each shadcn/ui wrapper and shared component (button, input, dialog, card, avatar, badge, etc.) gets a smoke test (renders without crashing) plus key interaction tests where applicable. Pure RTL, no store integration needed. **Files:** src/components/__tests__/shared-components.test.tsx **Depends on:** P1 ### P5: Page/screen component tests — Home, People, Dates, Settings, LogInteraction pages with store integration tests. Each page rendered with mocked Zustand store state covering loading, empty, populated, and error states. The most impactful slice for coverage %. **Files:** src/pages/__tests__/Home.test.tsx, src/pages/__tests__/People.test.tsx, src/pages/__tests__/Dates.test.tsx, src/pages/__tests__/Settings.test.tsx, src/pages/__tests__/LogInteraction.test.tsx **Depends on:** P3, P4 ### P6: App shell and native wrapper tests — App.tsx router smoke test, Capacitor native plugin wrapper tests (contacts import, camera, haptics, notifications, share). Covers any remaining uncovered files and pushes toward the 50% target. **Files:** src/__tests__/App.test.tsx, src/lib/native/__tests__/plugin-wrappers.test.ts **Depends on:** P5 --- **Post-completion:** When each phase is complete, comment on #10 with a summary of what was implemented.
Author
Owner

GSD VERIFY phase failed after 3 attempts.
Conformance failure: Unexpected files modified: package-lock.json; Expected files not modified: src/test/factories.ts, src/test/mocks/capacitor.ts, src/test/mocks/server.ts, tsconfig.app.json, vitest.config.ts; The files on disk do not contain a single change specified in the plan or the implementation diff. The entire milestone is unimplemented.

GSD VERIFY phase failed after 3 attempts. Conformance failure: Unexpected files modified: package-lock.json; Expected files not modified: src/test/factories.ts, src/test/mocks/capacitor.ts, src/test/mocks/server.ts, tsconfig.app.json, vitest.config.ts; The files on disk do not contain a single change specified in the plan or the implementation diff. The entire milestone is unimplemented.
Author
Owner

This issue has been decomposed into the following sub-issues:

# Title Phase Scope
#16 Break down #10 into implementable work units — Phase 1: Test Files: package.json, vitest.config.ts, src/setupTests.ts, src/lib/mocks/
#17 Break down #10 into implementable work units — Phase 2: Pure Files: src/lib/tests/utils.test.ts, src/lib/tests/date-utils.test.ts
#18 Break down #10 into implementable work units — Phase 3: Data Files: src/lib/tests/db.test.ts, src/lib/tests/store.test.ts **Depen
#19 Break down #10 into implementable work units — Phase 4: Shar Files: src/components/tests/shared-components.test.tsx Depends on: P
#20 Break down #10 into implementable work units — Phase 5: Page Files: src/pages/tests/Home.test.tsx, src/pages/tests/People.test.ts
#21 Break down #10 into implementable work units — Phase 6: App Files: src/tests/App.test.tsx, src/lib/native/tests/plugin-wrappers.

Each sub-issue has been labeled with triage-approved and is ready for queue routing.

This issue has been decomposed into the following sub-issues: | # | Title | Phase Scope | |---|-------|-------------| | #16 | Break down #10 into implementable work units — Phase 1: Test | **Files:** package.json, vitest.config.ts, src/setupTests.ts, src/lib/__mocks__/ | | #17 | Break down #10 into implementable work units — Phase 2: Pure | **Files:** src/lib/__tests__/utils.test.ts, src/lib/__tests__/date-utils.test.ts | | #18 | Break down #10 into implementable work units — Phase 3: Data | **Files:** src/lib/__tests__/db.test.ts, src/lib/__tests__/store.test.ts **Depen | | #19 | Break down #10 into implementable work units — Phase 4: Shar | **Files:** src/components/__tests__/shared-components.test.tsx **Depends on:** P | | #20 | Break down #10 into implementable work units — Phase 5: Page | **Files:** src/pages/__tests__/Home.test.tsx, src/pages/__tests__/People.test.ts | | #21 | Break down #10 into implementable work units — Phase 6: App | **Files:** src/__tests__/App.test.tsx, src/lib/native/__tests__/plugin-wrappers. | Each sub-issue has been labeled with `triage-approved` and is ready for queue routing.
Mark 2026-05-20 20:04:52 +00:00
Author
Owner

GSD VERIFY phase found no changes after implementation.
Worker output: ]11;?\

GSD VERIFY phase found no changes after implementation. Worker output: ]11;?\
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_kin_app_sync#11
No description provided.