Skip to content

[TASK] Refactor re-arm the TUI chat listener centrally and drop the isDomainEvent type list #1152

Closed as not planned

Description

@edenreich

Summary

Every chat event handler in internal/presentation/tui/handlers/chat_handler.go must re-arm the chat listener (ListenForChatEvents) by hand, and every new event type must also be added to isDomainEvent in internal/presentation/tui/app/chat.go. Missing either silently kills the event chain: in PR #1148 the judge verdict event was missing from both, and the TUI dropped every event after the first verdict, leaving the tool card stuck at "queued".

Re-arm the listener once in the dispatcher after any domain event, and replace the hand-maintained isDomainEvent type list with a check against the agentdomain.ChatEvent interface, so a new event needs zero registrations to keep the chain alive.

Acceptance Criteria

  • ChatHandler.Handle (or the app dispatcher) re-arms the chat listener centrally; per-handler ListenForChatEvents calls are removed
  • isDomainEvent no longer enumerates event types; domain events are recognised by interface
  • A test proves an unknown ChatEvent implementation still keeps the listener chain alive

Activity

  1. added
    refactor
    on Sep 2, 2026
  2. added theissue type on Sep 2, 2026
  3. moved this to Todo in 2026on Sep 2, 2026
  4. edenreich commented on Sep 2, 2026

    @edenreich
    ContributorAuthor

    Duplicate of #1150, resolved by #1159 (438c9fb).

  5. moved this from Todo to Done in 2026on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactor

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions