- Stats dashboard redesign design and implementation plans - Episode detail and Anki card link design - Internal knowledge base restructure - Backlog tasks for testing, verification, and occurrence tracking
3.2 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, references
| id | title | status | assignee | created_date | updated_date | labels | dependencies | references | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-172 | Wire immersion occurrence drilldown into stats API and vocabulary drawer | Done |
|
2026-03-14 12:05 | 2026-03-14 12:11 |
|
|
Description
Expose the new immersion word/kanji occurrence queries through the stats server and add a right-side Vocabulary drawer that shows recent occurrence rows with paging when a word or kanji is clicked.
Acceptance Criteria
- #1 Stats server exposes word and kanji occurrence endpoints with bounded recent-first paging.
- #2 Stats client/types support loading occurrence pages for a selected word or kanji.
- #3 Vocabulary tab opens a right drawer for the selected word/kanji, shows recent occurrences, and supports loading more.
- #4 Focused regression coverage exists for the server endpoint contract, and the stats UI still typechecks/builds.
- #5 Verification covers the cheapest sufficient backend and stats-UI lanes.
Implementation Notes
2026-03-14: Design approved in-thread. Chosen UX: click a word chip or kanji glyph to open a right-side drawer with recent-first occurrences, initial cap 50, plus “Load more”.
2026-03-14: Implemented /api/stats/vocabulary/occurrences and /api/stats/kanji/occurrences with limit + offset paging. The drawer uses direct stats HTTP client calls and keeps existing aggregate vocabulary data flow intact.
2026-03-14: Verification commands run:
bun test src/core/services/__tests__/stats-server.test.tsbun run typecheckcd stats && bun run buildbun run docs:testbun run docs:buildcd stats && bunx tsc --noEmitbash .agents/skills/subminer-change-verification/scripts/verify_subminer_change.sh --lane core src/core/services/stats-server.ts src/core/services/__tests__/stats-server.test.ts2026-03-14: Verification results:- stats server endpoint tests: passed
- root typecheck: passed
- stats UI production build: passed
- docs-site test/build: passed
cd stats && bunx tsc --noEmit: passed after removing stalehasCoverArtprop usage in the library stats UI- verifier result: passed (
typecheck,test:fast) - verifier artifacts:
.tmp/skill-verification/subminer-verify-20260314-120900-J0VvB0/
Final Summary
Wired occurrence drilldown into the stats server and Vocabulary tab. Words and kanji now open a right-side drawer that loads recent occurrence rows 50 at a time and supports “Load more”.
Added bounded recent-first occurrence endpoints to the stats HTTP API, extended the stats client/type surface, and made word chips plus kanji glyphs selectable with active-state styling.
Updated the immersion-tracking docs to mention vocabulary occurrence drilldown. Verified with focused stats-server tests, root typecheck, stats UI production build, docs-site test/build, the repo verifier core lane, and a direct stats package typecheck after removing the stale MediaHeader prop mismatch.