Skip to content

test: v1.1.0 coverage 55% → 65% (+77 component/hook tests) - #125

Merged
TeFuirnever merged 1 commit into
mainfrom
feat/v1.1.0-coverage-65
Jul 30, 2026
Merged

test: v1.1.0 coverage 55% → 65% (+77 component/hook tests)#125
TeFuirnever merged 1 commit into
mainfrom
feat/v1.1.0-coverage-65

Conversation

@TeFuirnever

Copy link
Copy Markdown
Owner

Summary

Reaches v1.1.0 roadmap target. Full-src coverage: 54.8% → 65.2% (+10.4pp).

New tests (77 total)

File Tests Coverage target
useFileTranscription.test.tsx 10 Hook state machine
useHotkey.test.tsx 13 Register/unregister/sync
useModelStatus.test.tsx 13 Stage transitions + listeners
settings-panel.test.tsx 12 Rendering + callbacks
effects-layer-component.test.tsx 6 WebGL/reduced-motion gates
ui-components.test.tsx 23+1skip Card/Input/Label/StatusLight/HistoryModal

Coverage progress

  • 996 → 1073 tests (+77)
  • Full src/: 54.8% → 65.2% statements
  • Threshold bumped 52→62

Verification

  • ✅ 1073 pass, 4 skip, 0 fail (100 files)
  • ✅ typecheck + typecheck:tests exit 0
  • ✅ lint clean
  • ✅ coverage gate passes

Reaches v1.1.0 roadmap target of 65% statements. Adds 77 new tests
across 7 files covering React components, hooks, and UI primitives.

New test files:
- useFileTranscription.test.tsx (10): state machine idle→selected→
  transcribing→done/error, cancel, reset, no-file error
- useHotkey.test.tsx (13): register/unregister/sync, dedup, error paths
- useModelStatus.test.tsx (13): stage transitions, downloadModels,
  listener registration, error paths
- settings-panel.test.tsx (12): rendering, permissions, AI modes,
  close/onChange/save callbacks
- effects-layer-component.test.tsx (6): enabled/disabled, WebGL gate,
  reduced-motion gate, Aurora mounting
- ui-components.test.tsx (24, 1 skip): Card/Input/Label/StatusLight/
  HistoryModal/Toaster rendering + prop forwarding

Coverage: 54.8% → 65.2% (full src/). Threshold bumped 52→62 (stmts).
Tests: 996 → 1073 (+77). All typecheck + lint clean.
@TeFuirnever
TeFuirnever merged commit 3ad10c6 into main Jul 30, 2026
1 check passed
@TeFuirnever
TeFuirnever deleted the feat/v1.1.0-coverage-65 branch July 30, 2026 04:30
TeFuirnever added a commit that referenced this pull request Jul 31, 2026
Roadmap hygiene pass after auditing the strategic plan against actual
git state. Three issues fixed:

1. CHANGELOG: backfill missing [1.1.0] entry. PRs #123/#124/#125
   (frontend coverage work) merged to main but never recorded in
   CHANGELOG. Documents the vitest coverage scope expansion (helpers
   only -> full src/**) and threshold bump (62->66 stmts) that caused
   the 95%->46% apparent coverage drop (same tests, wider scope).

2. README: replace hardcoded '672 tests / 95% coverage' badges with
   a dynamic CI status badge. The old numbers were stale (95% used
   the narrow ~40-file scope; full-src reality is ~46%). Coverage
   badge removed since no codecov/coveralls uploader is wired into
   CI yet — to restore, add codecov-action and link a codecov badge.
   Roadmap section numbers also de-hardcoded to 'see CI'.

3. strategic-plan-gap-analysis.md: add HISTORICAL SNAPSHOT freeze
   notice at top. README linked this as the authoritative 'full
   plan' but the doc is a 2026-05-24 snapshot with stale .js refs
   (pre ADR-010 big-bang) and outdated 97% coverage figure. Now
   points readers to follow-ups.md + CHANGELOG + ADRs as the live
   sources of truth.

Co-authored-by: woshiguanxiaoliang <woshiguanxiaoliang@noreply.gitcode.com>
TeFuirnever added a commit that referenced this pull request Jul 31, 2026
* docs: fix stale roadmap data and align version bookkeeping

Roadmap hygiene pass after auditing the strategic plan against actual
git state. Three issues fixed:

1. CHANGELOG: backfill missing [1.1.0] entry. PRs #123/#124/#125
   (frontend coverage work) merged to main but never recorded in
   CHANGELOG. Documents the vitest coverage scope expansion (helpers
   only -> full src/**) and threshold bump (62->66 stmts) that caused
   the 95%->46% apparent coverage drop (same tests, wider scope).

2. README: replace hardcoded '672 tests / 95% coverage' badges with
   a dynamic CI status badge. The old numbers were stale (95% used
   the narrow ~40-file scope; full-src reality is ~46%). Coverage
   badge removed since no codecov/coveralls uploader is wired into
   CI yet — to restore, add codecov-action and link a codecov badge.
   Roadmap section numbers also de-hardcoded to 'see CI'.

3. strategic-plan-gap-analysis.md: add HISTORICAL SNAPSHOT freeze
   notice at top. README linked this as the authoritative 'full
   plan' but the doc is a 2026-05-24 snapshot with stale .js refs
   (pre ADR-010 big-bang) and outdated 97% coverage figure. Now
   points readers to follow-ups.md + CHANGELOG + ADRs as the live
   sources of truth.

* test: v1.3.0 coverage 70% → 79% (+58 tests, near industry 80%)

Largest single-PR coverage jump: +9pp (70% → 79%). useRecording.ts
(520 lines) went from 2.67% → 87.5% — the biggest win in the repo.

New test files (58 tests):
- useRecording.test.tsx (25): start/stop recording, transcription flow,
  AI optimization, save callback, error paths, determineProcessingMode.
  Mocks MediaRecorder + AudioContext + getUserMedia in jsdom.
- model-status-indicator.test.tsx (21): all stage branches (need_download/
  downloading/loading/ready/error), progress bars, download/cancel buttons.
- app-expanded.test.tsx (9): model-ready toggleRecording, file-import mode,
  transcription result + reset, copy callback.
- settings-sections.test.tsx: unskipped 2 AboutSection tests (version +
  feature list) using container.textContent matchers.

Coverage: 69.4% → 79.0% (full src/). Threshold bumped 66→76 (stmts).
Tests: 1090 → 1148 (+58). All typecheck + lint clean.

---------

Co-authored-by: woshiguanxiaoliang <woshiguanxiaoliang@noreply.gitcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant