Skip to content

feat(followers): TicketFollower entity + add_follower handler#99

Merged
mpge merged 1 commit into
mainfrom
feat/follower-notifications
Jun 30, 2026
Merged

feat(followers): TicketFollower entity + add_follower handler#99
mpge merged 1 commit into
mainfrom
feat/follower-notifications

Conversation

@mpge

@mpge mpge commented Jun 30, 2026

Copy link
Copy Markdown
Member

Closes #92

Problem

add_follower was whitelisted in WorkflowEngine.ActionTypes but unhandledWorkflowExecutorService.DispatchAsync hit the default warn-log, with no followers table.

Change

  • Model TicketFollower + DbSet + EF Core config (unique index on TicketId/UserId).
  • Migration: escalated_ticket_followers (multi-provider, hand-written to match the repo's clean style).
  • FollowerRecipients.Resolve() (exclude actor + dedup, unit tested).
  • Handler: WorkflowExecutorService now idempotently records a follower for add_follower.

Notes

  • .NET's IEscalatedNotificationSender is a no-op by design, so the package records followers and exposes the resolved recipients for the host to deliver to.
  • The model snapshot is config-derived (it calls EscalatedModelConfiguration.Configure), so adding the entity to that config updates the snapshot automatically — no snapshot file edit.

Verification

Local: 346 tests pass (incl. 2 new), dotnet build clean, dotnet format clean on changed files.

.NET had add_follower whitelisted in WorkflowEngine.ActionTypes but unhandled
(the dispatch switch hit the default warn-log), with no followers table.

- TicketFollower model + DbSet + EF Core configuration (unique index).
- Migration: escalated_ticket_followers table (multi-provider: Npgsql/SqlServer/Sqlite).
- FollowerRecipients.Resolve() (exclude actor + dedup, unit tested).
- WorkflowExecutorService now handles add_follower (idempotently records the follower).

.NET's notification sender is a no-op by design, so followers are recorded and
the resolved recipients exposed for the host to deliver to. The snapshot is
config-derived (EscalatedModelConfiguration.Configure), so it picks up the new
entity automatically — no snapshot edit needed.

Closes #92
@mpge mpge merged commit f252f49 into main Jun 30, 2026
2 checks passed
@mpge mpge deleted the feat/follower-notifications branch June 30, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement ticket followers feature (currently a whitelisted no-op stub)

1 participant