diff --git a/README.md b/README.md index eafd931..189485d 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Detailed guides live in [`docs/`](docs/README.md): - [MPV Plugin](docs/mpv-plugin.md) — Chord keybindings, subminer.conf options, script messages - [Troubleshooting](docs/troubleshooting.md) — Common issues and solutions - [Development](docs/development.md) — Building, testing, contributing -- [Architecture](docs/architecture.md) — Service-oriented design, composition model +- [Architecture](docs/architecture.md) — Service-oriented design, composition model, and modular renderer layout (`src/renderer/{modals,handlers,utils,...}`) ### Third-Party Components diff --git a/backlog/tasks/task-13 - Fix-second-instance-start-when-texthooker-only-instance-is-running.md b/backlog/tasks/task-13 - Fix-second-instance-start-when-texthooker-only-instance-is-running.md new file mode 100644 index 0000000..2117a8e --- /dev/null +++ b/backlog/tasks/task-13 - Fix-second-instance-start-when-texthooker-only-instance-is-running.md @@ -0,0 +1,51 @@ +--- +id: TASK-13 +title: Fix second-instance --start when texthooker-only instance is running +status: Done +assignee: [] +created_date: '2026-02-11 23:47' +updated_date: '2026-02-11 23:47' +labels: + - bugfix + - cli + - overlay +dependencies: [] +priority: high +--- + +## Description + + +When SubMiner is already running in texthooker-only mode, a subsequent `--start` command from a second instance is currently ignored. This can leave users without an initialized overlay runtime even though startup commands were issued. Adjust CLI command handling so `--start` on second-instance initializes overlay runtime when it is not yet initialized, while preserving current ignore behavior when overlay runtime is already active. + + +## Acceptance Criteria + +- [x] #1 Second-instance `--start` initializes overlay runtime when current instance has deferred/not-initialized overlay runtime. +- [x] #2 Second-instance `--start` remains ignored (existing behavior) when overlay runtime is already initialized. +- [x] #3 CLI command service tests cover both behaviors and pass. + + +## Implementation Notes + + +Patched CLI second-instance `--start` handling in `src/core/services/cli-command-service.ts` to initialize overlay runtime when deferred. + +Added regression test for deferred-runtime start path and updated initialized-runtime second-instance tests in `src/core/services/cli-command-service.test.ts`. + + +## Final Summary + + +Fixed overlay startup regression path where a second-instance `--start` could be ignored even when the primary instance was running in texthooker-only/deferred overlay mode. + +Changes: +- Updated `handleCliCommandService` logic so `ignoreStart` applies only when source is second-instance, `--start` is present, and overlay runtime is already initialized. +- Added explicit overlay-runtime initialization path for second-instance `--start` when runtime is not initialized. +- Kept existing behavior for already-initialized runtime (still logs and ignores redundant `--start`). +- Added and updated tests in `cli-command-service.test.ts` to validate both deferred and initialized second-instance startup behaviors. + +Validation: +- `pnpm run build` succeeded. +- `node dist/core/services/cli-command-service.test.js` passed (11/11). + diff --git a/backlog/tasks/task-14 - Ensure-subminer-launcher-shows-visible-overlay-on-startup.md b/backlog/tasks/task-14 - Ensure-subminer-launcher-shows-visible-overlay-on-startup.md new file mode 100644 index 0000000..f332b8b --- /dev/null +++ b/backlog/tasks/task-14 - Ensure-subminer-launcher-shows-visible-overlay-on-startup.md @@ -0,0 +1,43 @@ +--- +id: TASK-14 +title: Ensure subminer launcher shows visible overlay on startup +status: Done +assignee: [] +created_date: '2026-02-12 00:22' +updated_date: '2026-02-12 00:23' +labels: + - bugfix + - launcher + - overlay +dependencies: [] +priority: high +--- + +## Description + + +The `subminer` launcher starts SubMiner with `--start` but can leave the visible overlay hidden when runtime config defers auto-show (`auto_start_overlay=false`). Update launcher command args to explicitly request visible overlay at startup so script-mode behavior matches user expectations. + + +## Acceptance Criteria + +- [x] #1 Running `subminer