mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-05 19:21:35 -07:00
afa66ee508
- Cap only blind shrinking-window retries (not backend-guided shrinks); a line that exhausts the cap escalates to one parseText fallback instead of dropping to raw text - Bound the cross-line termsFind cache by retained dictionary-entry weight, not just key count, and re-check it when a lookup resolves - Keep halfwidth katakana character names in the greedy pre-pass, and let a generic word beat a name it fully contains - Share one Han code-point table between the character dictionary and the scanner's name pre-pass; narrow the mob-disambiguator filter to the split letters, not every one-character term - Release the subtitle prefetch pause on a new onProcessingSettled signal instead of the tokenized emit, so duplicate/suppressed/failed lines no longer pause prefetch indefinitely - Split the Yomitan scan runtime's injected helper script into its own file
Architecture Map
Status: active Last verified: 2026-05-23 Owner: Kyle Yasuda Read when: runtime ownership, composition boundaries, or layering questions
SubMiner runs as three cooperating runtimes:
- Electron desktop app in
src/ - Launcher CLI in
launcher/ - mpv Lua plugin in
plugin/subminer/
The desktop app keeps src/main.ts as composition root and pushes behavior into small runtime/domain modules.
Read Next
- Domains - who owns what
- Layering - how modules should depend on each other
- Subtitle Overlay Priming - visible-overlay subtitle startup flow
- Public contributor summary:
docs-site/architecture.md
Current Shape
src/main/owns composition, runtime setup, IPC wiring, and app lifecycle adapters.src/main/boot/owns boot-phase assembly seams sosrc/main.tscan stay focused on lifecycle coordination and startup-path selection.src/core/services/owns focused runtime services plus pure or side-effect-bounded logic.src/renderer/owns overlay rendering and input behavior.src/config/owns config definitions, defaults, loading, and resolution.src/types/owns shared cross-runtime contracts via domain entrypoints;src/types.tsstays a compatibility barrel.src/main/runtime/composers/owns larger domain compositions.src/main.tscall sites invoke configured runtime handlers and runtime-object methods directly; do not add local pass-through wrappers around them.
Architecture Intent
- Small units, explicit boundaries
- Composition over monoliths
- Pure helpers where possible
- Stable user behavior while internals evolve