Reduce coupling between managers with a central event bus. ``` type EventMap = { 'config:changed': { scope: ConfigurationTarget; buttons: ButtonConfig[] }; 'buttonSet:switched': { from: string | null; to: string | null }; 'button:executed': { buttonId: string; command: string; timestamp: number }; 'import:completed': { strategy: ImportStrategy; count: number }; 'terminal:created': { terminalId: string; buttonId: string }; }; class EventBus { on<K extends keyof EventMap>(event: K, handler: EventHandler<EventMap[K]>): Disposable; emit<K extends keyof EventMap>(event: K, payload: EventMap[K]>): Promise<void>; } ``` Current: ConfigManager directly calls StatusBarManager.refresh() Improved: ConfigManager emits a 'config:changed' event → Interested parties subscribe to it. - Decoupled managers. - Easier testing. - Adding new features doesn't require modifying existing code.
Activity
refactor: add event subscriptions to UI components and remove direct …
refactor: add event subscriptions to UI components and remove direct …
refactor: add event subscriptions to UI components and remove direct …
refactor: add event subscriptions to UI components and remove direct …
refactor: add event subscriptions to UI components and remove direct …
kubrickcode commentedon Dec 7, 2025
🎉 This issue has been resolved in version 0.10.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀