2.4 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ordinal | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-13 | Fix second-instance --start when texthooker-only instance is running | Done | 2026-02-11 23:47 | 2026-02-18 04:11 |
|
high | 51000 |
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
- #1 Second-instance
--startinitializes overlay runtime when current instance has deferred/not-initialized overlay runtime. - #2 Second-instance
--startremains ignored (existing behavior) when overlay runtime is already initialized. - #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
handleCliCommandServicelogic soignoreStartapplies only when source is second-instance,--startis present, and overlay runtime is already initialized. - Added explicit overlay-runtime initialization path for second-instance
--startwhen 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.tsto validate both deferred and initialized second-instance startup behaviors.
Validation:
pnpm run buildsucceeded.node dist/core/services/cli-command-service.test.jspassed (11/11).