Files
SubMiner/backlog/tasks/task-177.1 - Fix-overview-lookup-rate-metric.md
sudacode 5feed360ca feat: add app-owned YouTube subtitle flow with absPlayer-style parsing (#31)
* fix: harden preload argv parsing for popup windows

* fix: align youtube playback with shared overlay startup

* fix: unwrap mpv youtube streams for anki media mining

* docs: update docs for youtube subtitle and mining flow

* refactor: unify cli and runtime wiring for startup and youtube flow

* feat: update subtitle sidebar overlay behavior

* chore: add shared log-file source for diagnostics

* fix(ci): add changelog fragment for immersion changes

* fix: address CodeRabbit review feedback

* fix: persist canonical title from youtube metadata

* style: format stats library tab

* fix: address latest review feedback

* style: format stats library files

* test: stub launcher youtube deps in CI

* test: isolate launcher youtube flow deps

* test: stub launcher youtube deps in failing case

* test: force x11 backend in launcher ci harness

* test: address latest review feedback

* fix(launcher): preserve user YouTube ytdl raw options

* docs(backlog): update task tracking notes

* fix(immersion): special-case youtube media paths in runtime and tracking

* feat(stats): improve YouTube media metadata and picker key handling

* fix(ci): format stats media library hook

* fix: address latest CodeRabbit review items

* docs: update youtube release notes and docs

* feat: auto-load youtube subtitles before manual picker

* fix: restore app-owned youtube subtitle flow

* docs: update youtube playback docs and config copy

* refactor: remove legacy youtube launcher mode plumbing

* fix: refine youtube subtitle startup binding

* docs: clarify youtube subtitle startup behavior

* fix: address PR #31 latest review follow-ups

* fix: address PR #31 follow-up review comments

* test: harden youtube picker test harness

* udpate backlog

* fix: add timeout to youtube metadata probe

* docs: refresh youtube and stats docs

* update backlog

* update backlog

* chore: release v0.9.0
2026-03-24 00:01:24 -07:00

3.8 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, references, parent_task_id, priority, ordinal
id title status assignee created_date updated_date labels dependencies references parent_task_id priority ordinal
TASK-177.1 Fix overview lookup rate metric Done
@codex
2026-03-19 17:46 2026-03-23 03:22
stats
immersion-tracking
yomitan
stats/src/components/overview/OverviewTab.tsx
stats/src/lib/dashboard-data.ts
stats/src/lib/yomitan-lookup.ts
src/core/services/immersion-tracker/query.ts
src/core/services/stats-server.ts
TASK-177 medium 132500

Description

Update the stats homepage Tracking Snapshot so Lookup Rate reflects lifetime intentional Yomitan lookups normalized by total tokens seen, matching the newer stats semantics already used in session, media, and anime views.

Acceptance Criteria

  • #1 Overview data exposes the lifetime totals needed to compute global Yomitan lookups per 100 tokens on the homepage
  • #2 The homepage Tracking Snapshot Lookup Rate card shows Yomitan lookup rate as X / 100 tokens with tooltip/copy aligned to that meaning
  • #3 Automated tests cover the lifetime totals plumbing and homepage summary/rendering change

Implementation Plan

  1. Extend overview lifetime hints/query plumbing to include total tokens seen and total intentional Yomitan lookups from finished sessions.
  2. Add/adjust focused tests first for query hints, stats overview API typing/mocks, and overview summary formatting so the homepage metric fails under old semantics.
  3. Update the overview summary/card to derive Lookup Rate from lifetime Yomitan lookups per 100 tokens and align tooltip/copy with that meaning.
  4. Run focused verification on the touched query, stats-server, and stats UI tests; record results and blockers in the task notes.

Implementation Notes

Extended overview lifetime hints to include total tokens seen and total intentional Yomitan lookups from finished sessions so the homepage can compute a true global lookup rate.

Extracted the homepage Tracking Snapshot into a dedicated presentational component to keep OverviewTab smaller and make the Lookup Rate card copy directly testable.

Focused verification passed for query hints, IPC/stats overview plumbing, stats server overview response, dashboard summary logic, and homepage snapshot rendering.

SubMiner verifier core lane artifact: .tmp/skill-verification/subminer-verify-20260319-105320-7FDlwh. bun run typecheck passed there; bun run test:fast failed for a pre-existing/unrelated environment issue in scripts/update-aur-package.test.ts because scripts/update-aur-package.sh reported mapfile: command not found.

Final Summary

Homepage Lookup Rate now uses lifetime intentional Yomitan lookups normalized by lifetime tokens seen, matching the existing session/media/anime semantics instead of the old known-word hit-rate metric. I extended overview query hints and API typings with total token and Yomitan lookup totals, updated the overview summary builder to reuse the shared per-100-token formatter, and replaced the inline Tracking Snapshot block with a dedicated component that renders X / 100 tokens plus Yomitan-specific tooltip copy.

Tests added/updated: query hints coverage for the new lifetime totals, stats server and IPC overview fixtures, overview summary assertions, and a dedicated Tracking Snapshot render test for the homepage card text. Focused bun test runs passed for those touched areas. Repo-native verifier --lane core also passed bun run typecheck; its bun run test:fast step still fails for the unrelated existing scripts/update-aur-package.sh: line 71: mapfile: command not found environment issue.