Skip to content

Introducing Event-Driven Architecture #191

Closed

Description

@kubrickcode

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

  1. added a commit that references this issue on Dec 2, 2025
    45cc4b8
  2. moved this from Backlog to Review in Issue Trackeron Dec 2, 2025
  3. added 4 commits that reference this issue on Dec 2, 2025
    c006fb7
    0f2968e
    f4fb3d7
    dd269c0
  4. kubrickcode commented on Dec 7, 2025

    @kubrickcode
    OwnerAuthor

    🎉 This issue has been resolved in version 0.10.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions