Files
SubMiner/backlog/tasks/task-212 - Fix-mac-texthooker-helper-startup-blocking-mpv-launch.md
sudacode af74102964 Fix startup autoplay and dictionary progress sequencing
- keep paused startup release retries aligned with the full gate window
- restore dictionary sync progress and reuse merged zips on unchanged revisits
- surface later dictionary OSD updates once tokenization is ready
2026-03-20 02:27:00 -07:00

2.5 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, references, priority
id title status assignee created_date updated_date labels dependencies references priority
TASK-212 Fix mac texthooker helper startup blocking mpv launch In Progress
2026-03-20 08:27 2026-03-20 08:45
bug
macos
startup
/Users/sudacode/projects/japanese/SubMiner/src/core/services/startup.ts
/Users/sudacode/projects/japanese/SubMiner/src/main.ts
/Users/sudacode/projects/japanese/SubMiner/plugin/subminer/process.lua
high

Description

subminer mpv auto-start on mac can stall before the video is usable because the helper process launched with --texthooker still runs heavy app-ready startup. Recent logs show the helper loading the Yomitan Chromium extension, emitting Permission 'contextMenus' is unknown warnings, then hitting Chromium runtime errors before SubMiner signals readiness back to the mpv plugin. The texthooker helper should take the minimal startup path needed to serve texthooker traffic without loading overlay/window-only startup work that can crash or delay readiness.

Acceptance Criteria

  • #1 Launching SubMiner with --texthooker avoids heavy app-ready startup work that is not required for texthooker helper mode.
  • #2 A regression test covers texthooker helper startup so it fails if Yomitan extension loading is reintroduced on that path.
  • #3 The change preserves existing startup behavior for non-texthooker app launches.

Implementation Notes

Follow-up: user confirmed the root issue is the plugin auto-start ordering. Adjust mpv plugin sequencing so --start launches before any separate --texthooker helper, then verify plugin regressions still pass.

Final Summary

Fixed the mac mpv startup hang caused by the --texthooker helper taking the full app-ready path. runAppReadyRuntime now fast-paths texthooker-only mode through minimal startup (reloadConfig plus CLI handling) so it no longer loads Yomitan or first-run setup work before serving texthooker traffic. Added regression coverage in src/core/services/app-ready.test.ts, then verified with bun test src/core/services/app-ready.test.ts src/core/services/startup.test.ts, bun test src/cli/args.test.ts src/main/early-single-instance.test.ts src/main/runtime/stats-cli-command.test.ts, and bun run typecheck.