mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
2.1 KiB
2.1 KiB
id, title, status, assignee, created_date, labels, dependencies, priority
| id | title | status | assignee | created_date | labels | dependencies | priority | |||
|---|---|---|---|---|---|---|---|---|---|---|
| TASK-39 | Add hot-reload for non-destructive config changes | To Do | 2026-02-14 02:04 |
|
low |
Description
Watch the config file for changes and apply non-destructive updates (colors, font sizes, subtitle modes, overlay opacity, keybindings) without requiring an app restart.
Motivation
Currently all config is loaded at startup. Users tweaking visual settings (font size, colors, subtitle positioning) must restart the app after every change, which breaks their video session. Hot-reload for safe config values would dramatically improve the tuning experience.
Scope
- Watch the config file using
fs.watchor similar - On change, re-parse and re-validate the config
- Categorize config fields as hot-reloadable vs restart-required
- Apply hot-reloadable changes immediately (push to renderer via IPC if needed)
- For restart-required changes, show a notification that a restart is needed
- Debounce file-change events (editors save multiple times rapidly)
Hot-reloadable candidates
- Font family, size, weight, color
- Subtitle background opacity/color
- Secondary subtitle display mode
- Overlay opacity and positioning offsets
- Keybinding mappings
- AI translation provider settings
Restart-required (NOT hot-reloadable)
- Anki field mappings (affects card creation pipeline)
- MeCab path / tokenizer settings
- MPV socket path
- Window tracker selection
Acceptance Criteria
- #1 Config file changes are detected automatically via file watcher.
- #2 Hot-reloadable fields are applied immediately without restart.
- #3 Restart-required fields trigger a user-visible notification.
- #4 File change events are debounced to handle editor save patterns.
- #5 Invalid config changes are rejected with an error notification, keeping the previous valid config.
- #6 Renderer receives updated styles/settings via IPC without full page reload.