Commit 1836b02
fix: gate built-in plugins until enabled state loads + fix IPC listener cleanup (#239)
## Summary
This commit was pushed to #237 after the squash-merge, so it didn't make
it into develop. Cherry-picked here.
- **P1: gate built-in plugins until enabled state loads** —
`builtInEnabledMap` started as `{}` so `!== false` passed for every
plugin, briefly activating disabled plugins on launch. Now starts as
`null` and built-in plugins are excluded from `PluginHost` until
`listState()` resolves
- **P2: fix IPC listener cleanup** — `ipc.on()` cleanup used
`removeAllListeners(channel)` which nuked other listeners on the same
channel (e.g. `pluginRuntimeStore`). Changed to `removeListener` with
the specific handler reference
## Test plan
- [x] `pnpm typecheck` — clean
- [x] `pnpm test` — all pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 272c85f commit 1836b02
2 files changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
473 | 477 | | |
474 | 478 | | |
475 | 479 | | |
| |||
0 commit comments