Commit Graph

199 Commits

Author SHA1 Message Date
baf2553f57 fix: stabilize immersion tracker trend test 2026-03-28 15:20:57 -07:00
6cbfc35b45 fix(test): correct trends dashboard lookups expectation
- Update expected lookups array to include both day buckets
2026-03-28 15:14:40 -07:00
0dbef59a57 fix(verification): improve real-runtime lease trap handling
- Add dedicated termination handler with proper exit codes for INT/TERM
- Register traps only when lease is actually acquired instead of globally
- Ensure clean lease release on all signal paths
2026-03-28 15:14:36 -07:00
100f3cc827 chore(backlog): mark tasks 238.1 and 238.2 acceptance criteria as done
- task-238.1: Extract main/overlay window composition from src/main.ts
- task-238.2: Extract CLI and headless command wiring from src/main.ts
2026-03-28 15:14:31 -07:00
7d5fa02301 chore(backlog): move 5 completed tasks to backlog/completed
- task-165: Rewrite agentic testing automation plan
- task-169: Cut minor release v0.7.0
- task-202: Use ended session media position for episode progress
- task-203: Restore known/JLPT annotation for reading-mismatch tokens
- task-204: Make known-word cache incremental
2026-03-28 15:14:27 -07:00
7d70ceede7 chore: add coverage/ to .gitignore
- Exclude generated test coverage output from version control
2026-03-28 15:14:19 -07:00
77a109b3d5 docs: use bun-managed electron commands in dev guide 2026-03-28 15:11:33 -07:00
5059c881ea fix: stabilize immersion tracker ci 2026-03-28 15:10:10 -07:00
67a87c4cc2 fix(ci): correct comma syntax in daily session count cast 2026-03-28 13:27:31 -07:00
13a88a8382 fix(ci): normalize daily session count extraction 2026-03-28 13:26:36 -07:00
b1638afe21 fix(ci): simplify first-session day count cast 2026-03-28 13:25:38 -07:00
e4c8c60b3e fix(ci): normalize session-day count comparison 2026-03-28 13:24:44 -07:00
a96df287d1 fix(ci): align rollup timestamp types with DB millis strings 2026-03-28 13:23:01 -07:00
f4d1cc9fb9 fix(ci): resolve immersion tracker type mismatches 2026-03-28 13:22:03 -07:00
2582c2a7ad fix(ci): restore stats-server fallback and unblock coverage tests 2026-03-28 13:19:44 -07:00
c5fcd50cc0 Fix monthly rollup test expectations
- Preserve multi-arg Date construction in mock helper
- Align rollup assertions with the correct videoId
2026-03-28 12:12:58 -07:00
0e0c676a9a refactor: remove Node.js fallback from stats-server, use Bun only 2026-03-28 12:09:18 -07:00
5348ae8528 refactor: consolidate toDbMs into query-shared.ts 2026-03-28 12:06:58 -07:00
c43941fc7e refactor: normalize import extensions in query modules 2026-03-28 12:06:12 -07:00
99b30c4cf0 test: add behavioral assertions to composer tests
Upgrade 8 composer test files from shape-only typeof checks to behavioral
assertions that invoke returned handlers and verify injected dependencies are
actually called, following the mpv-runtime-composer pattern.
2026-03-28 11:22:58 -07:00
4779ac85dc test: extract mpv composer test fixture factory to reduce duplication 2026-03-28 11:17:14 -07:00
5359e47610 chore: consolidate duplicate import paths in main.ts 2026-03-28 11:12:59 -07:00
916dd5d37d refactor: inline subtitle-prefetch-runtime-composer
The composer was a pure pass-through that destructured an object and
reassembled it with the same fields. Inlined at the call site.
2026-03-28 11:11:49 -07:00
1a448cf7d9 fix: tighten type safety in boot services
- Add AppLifecycleShape and OverlayModalInputStateShape constraints
  so TAppLifecycleApp and TOverlayModalInputState generics are bounded
- Remove unsafe `as { handleModalInputStateChange? }` cast — now
  directly callable via the constraint
- Use `satisfies AppLifecycleShape` for structural validation on the
  appLifecycleApp object literal
- Document Electron App.on incompatibility with simple signatures
2026-03-28 11:10:51 -07:00
86b50dcb70 refactor: deduplicate ensureDir into shared/fs-utils
5 copies of mkdir-p-if-not-exists consolidated into one shared module
with ensureDir (directory path) and ensureDirForFile (file path) variants.
2026-03-28 10:42:21 -07:00
ab315c737f fix: replace any types in boot services with proper signatures 2026-03-28 10:34:36 -07:00
8784a1072a chore: remove unused token/queue file path constants from main.ts 2026-03-28 10:33:13 -07:00
312cba6955 refactor: inline identity composers (stats-startup, overlay-window)
composeStatsStartupRuntime was a no-op that returned its input.
composeOverlayWindowHandlers was a 1-line delegation.
Both removed in favor of direct usage.
2026-03-28 10:33:09 -07:00
c6d349886e refactor: parameterize duplicated getAffected*Ids query helpers
Four structurally identical functions collapsed into two parameterized
helpers while preserving the existing public API.
2026-03-28 10:31:06 -07:00
17e715b2bf refactor: consolidate 3 near-identical setup window factories
Extract shared createSetupWindowHandler with a config parameter.
Public API unchanged.
2026-03-28 10:30:35 -07:00
549ff66d09 refactor: remove boot re-export alias layer
main.ts now imports directly from the runtime/composers and runtime/domains
modules, eliminating the intermediate boot/ indirection.
2026-03-28 10:26:56 -07:00
5141a936d8 refactor: remove unused createMainBootRuntimes/Handlers aggregate functions
These functions were never called by production code — main.ts imports
the individual composeBoot* re-exports directly.
2026-03-28 10:23:28 -07:00
b92f253458 fix: use variadic array type for MockDate constructor args
TS2367: fixed-length tuple made args.length === 0 unreachable.
2026-03-28 10:21:47 -07:00
efcacded66 Factor out mock date helper in tracker tests
- reuse a shared `withMockDate` helper for date-sensitive query tests
- make monthly rollup assertions key off `videoId` instead of row order
2026-03-28 00:26:19 -07:00
615625d215 fix: use explicit super args for MockDate constructors 2026-03-28 00:09:25 -07:00
90a9147363 fix: remove strict spread usage in Date mocks 2026-03-28 00:08:13 -07:00
8f6877db12 fix: resolve CI type failures in boot and immersion query tests 2026-03-28 00:07:11 -07:00
8e5cb5f885 Fix verification and immersion-tracker grouping
- isolate verifier artifacts and lease handling
- switch weekly/monthly tracker cutoffs to calendar boundaries
- tighten boot lifecycle and zip writer tests
2026-03-28 00:01:17 -07:00
1408ad652a fix(ci): normalize Windows shortcut paths for cross-platform tests 2026-03-28 00:00:49 -07:00
d5b746bd1d Restrict docs analytics and build coverage input
- limit Plausible init to docs.subminer.moe
- build Yomitan before src coverage lane
2026-03-27 23:52:07 -07:00
6139d14cd1 Switch plausible endpoint and harden coverage lane parsing
- update docs-site tracking to use the Plausible capture endpoint
- tighten coverage lane argument and LCOV parsing checks
- make script entrypoint use CommonJS main guard
2026-03-27 23:41:23 -07:00
9caf25bedb test: stabilize bun coverage reporting 2026-03-27 23:37:29 -07:00
23b2360ac4 refactor: split main boot phases 2026-03-27 23:37:29 -07:00
742a0dabe5 chore(backlog): update task notes and changelog fragment 2026-03-27 23:37:29 -07:00
4c03e34caf refactor(main): extract remaining inline runtime logic from main 2026-03-27 23:37:29 -07:00
4d95de51a0 fix: address CodeRabbit review feedback 2026-03-27 03:05:32 -07:00
ed32f985c6 test: increase launcher test timeout for CI stability 2026-03-27 02:24:56 -07:00
854179b9c1 Add backlog tasks and launcher time helper tests
- Track follow-up cleanup work in Backlog.md
- Replace Date.now usage with shared nowMs helper
- Add launcher args/parser and core regression tests
2026-03-27 02:01:36 -07:00
a3ddfa0641 refactor: compose startup and setup window wiring 2026-03-27 01:14:58 -07:00
49a582b4fc refactor: migrate shared type imports 2026-03-27 00:33:52 -07:00