Decompose: Break down #16 into implementable work units #17

Closed
opened 2026-05-16 00:27:02 +00:00 by Mark · 1 comment
Owner

Decomposition of #16: [smoke-test] Test coverage review: 73 source files, 1 test files (1.4%)

This issue decomposes the parent feature into independently implementable phases.


P1: Test infrastructure — install vitest, @testing-library/react, jsdom, @testing-library/jest-dom, @testing-library/user-event. Add vitest.config.ts, test setup file, and test:run script to package.json. Verify with a trivial smoke test.

Files: package.json, vitest.config.ts, src/test/setup.ts, src/test/smoke.test.ts

P2: Pure logic tests — test services/pricing.ts, services/providers.ts, data/services.ts, types/quota.ts, lib/utils.ts. These are pure functions/constants with no React dependency, so they can run without jsdom. Fastest ROI for coverage.

Files: src/test/services/pricing.test.ts, src/test/services/providers.test.ts, src/test/data/services.test.ts, src/test/types/quota.test.ts, src/test/lib/utils.test.ts
Depends on: P1

P3: Hook tests — test useQuotaStore (core state management with localStorage persistence) and use-mobile (responsive breakpoint detection). These need jsdom + renderHook from testing-library.

Files: src/test/hooks/useQuotaStore.test.ts, src/test/hooks/use-mobile.test.ts
Depends on: P1

P4: Core component tests — test AccountCard, QuotaProgress, ServiceSection, DashboardHeader, ServiceIcon. These are the primary dashboard rendering components with props-driven logic.

Files: src/test/components/AccountCard.test.tsx, src/test/components/QuotaProgress.test.tsx, src/test/components/ServiceSection.test.tsx, src/test/components/DashboardHeader.test.tsx, src/test/components/ServiceIcon.test.tsx
Depends on: P1, P3

P5: Dialog/flow tests — test AddAccountDialog and AddServiceDialog. These have form state, validation, and modal interactions (radix dialog + react-hook-form + zod). Most complex test setup required.

Files: src/test/components/AddAccountDialog.test.tsx, src/test/components/AddServiceDialog.test.tsx
Depends on: P1, P3

P6: Integration tests — test App.tsx end-to-end: rendering the full dashboard, data loading, localStorage persistence, and key user flows (add account, delete account, quota updates).

Files: src/test/App.test.tsx
Depends on: P4, P5


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

## Decomposition of #16: [smoke-test] Test coverage review: 73 source files, 1 test files (1.4%) This issue decomposes the parent feature into independently implementable phases. --- ### P1: Test infrastructure — install vitest, @testing-library/react, jsdom, @testing-library/jest-dom, @testing-library/user-event. Add vitest.config.ts, test setup file, and test:run script to package.json. Verify with a trivial smoke test. **Files:** package.json, vitest.config.ts, src/test/setup.ts, src/test/smoke.test.ts ### P2: Pure logic tests — test services/pricing.ts, services/providers.ts, data/services.ts, types/quota.ts, lib/utils.ts. These are pure functions/constants with no React dependency, so they can run without jsdom. Fastest ROI for coverage. **Files:** src/test/services/pricing.test.ts, src/test/services/providers.test.ts, src/test/data/services.test.ts, src/test/types/quota.test.ts, src/test/lib/utils.test.ts **Depends on:** P1 ### P3: Hook tests — test useQuotaStore (core state management with localStorage persistence) and use-mobile (responsive breakpoint detection). These need jsdom + renderHook from testing-library. **Files:** src/test/hooks/useQuotaStore.test.ts, src/test/hooks/use-mobile.test.ts **Depends on:** P1 ### P4: Core component tests — test AccountCard, QuotaProgress, ServiceSection, DashboardHeader, ServiceIcon. These are the primary dashboard rendering components with props-driven logic. **Files:** src/test/components/AccountCard.test.tsx, src/test/components/QuotaProgress.test.tsx, src/test/components/ServiceSection.test.tsx, src/test/components/DashboardHeader.test.tsx, src/test/components/ServiceIcon.test.tsx **Depends on:** P1, P3 ### P5: Dialog/flow tests — test AddAccountDialog and AddServiceDialog. These have form state, validation, and modal interactions (radix dialog + react-hook-form + zod). Most complex test setup required. **Files:** src/test/components/AddAccountDialog.test.tsx, src/test/components/AddServiceDialog.test.tsx **Depends on:** P1, P3 ### P6: Integration tests — test App.tsx end-to-end: rendering the full dashboard, data loading, localStorage persistence, and key user flows (add account, delete account, quota updates). **Files:** src/test/App.test.tsx **Depends on:** P4, P5 --- **Post-completion:** When each phase is complete, comment on #16 with a summary of what was implemented.
Author
Owner

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

# Title Phase Scope
#19 Break down #16 into implementable work units — Phase 1: Test Files: package.json, vitest.config.ts, src/test/setup.ts, src/test/smoke.tes
#20 Break down #16 into implementable work units — Phase 2: Pure Files: src/test/services/pricing.test.ts, src/test/services/providers.test.t
#21 Break down #16 into implementable work units — Phase 3: Hook Files: src/test/hooks/useQuotaStore.test.ts, src/test/hooks/use-mobile.test.
#22 Break down #16 into implementable work units — Phase 4: Core Files: src/test/components/AccountCard.test.tsx, src/test/components/QuotaPr
#23 Break down #16 into implementable work units — Phase 5: Dial Files: src/test/components/AddAccountDialog.test.tsx, src/test/components/Ad
#24 Break down #16 into implementable work units — Phase 6: Inte Files: src/test/App.test.tsx Depends on: P4, P5 --- **Post-completion:

Each sub-issue has been labeled with needs-triage and will be evaluated by the triage pipeline before queue routing.

This issue has been decomposed into the following sub-issues: | # | Title | Phase Scope | |---|-------|-------------| | #19 | Break down #16 into implementable work units — Phase 1: Test | **Files:** package.json, vitest.config.ts, src/test/setup.ts, src/test/smoke.tes | | #20 | Break down #16 into implementable work units — Phase 2: Pure | **Files:** src/test/services/pricing.test.ts, src/test/services/providers.test.t | | #21 | Break down #16 into implementable work units — Phase 3: Hook | **Files:** src/test/hooks/useQuotaStore.test.ts, src/test/hooks/use-mobile.test. | | #22 | Break down #16 into implementable work units — Phase 4: Core | **Files:** src/test/components/AccountCard.test.tsx, src/test/components/QuotaPr | | #23 | Break down #16 into implementable work units — Phase 5: Dial | **Files:** src/test/components/AddAccountDialog.test.tsx, src/test/components/Ad | | #24 | Break down #16 into implementable work units — Phase 6: Inte | **Files:** src/test/App.test.tsx **Depends on:** P4, P5 --- **Post-completion: | Each sub-issue has been labeled with `needs-triage` and will be evaluated by the triage pipeline before queue routing.
Mark closed this issue 2026-05-26 20:38:18 +00:00
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/llm_quota#17
No description provided.