1.8 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-87 | Fix plugin --start flow so tokenization/frequency/N+1 initialize correctly | Done | 2026-02-19 19:05 | 2026-02-19 23:18 | medium | 69000 |
Description
Plugin startup flow (--texthooker then --start) can miss tokenization initialization, which makes frequency highlighting and N+1 appear broken even when dictionaries/config are correct. Ensure --start initializes overlay runtime when needed, including second-instance handoff mode.
Acceptance Criteria
- #1
--startinitializes overlay runtime when runtime is not yet initialized. - #2
second-instance --startis ignored only when overlay runtime is already initialized. - #3 Regression tests cover both
--startbehaviors and pass.
Implementation Notes
Root cause: subtitle tokenization path in src/main.ts only runs when overlay windows exist; command runtime did not initialize overlay runtime for --start, especially visible in plugin handoff (--texthooker -> --start). Updated src/core/services/cli-command.ts to initialize overlay runtime for --start, and narrowed second-instance ignore behavior to already-initialized runtime only. Added regression tests in src/core/services/cli-command.test.ts.
Final Summary
Fixed plugin/start regression by ensuring --start initializes overlay runtime when needed and no longer gets dropped in second-instance handoff before runtime init. Added/updated CLI command tests; targeted suite passes.