Skip to content

feat(followers): ticket followers + add_follower handler + CI tests#95

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

feat(followers): ticket followers + add_follower handler + CI tests#95
mpge merged 1 commit into
masterfrom
feat/follower-notifications

Conversation

@mpge

@mpge mpge commented Jun 30, 2026

Copy link
Copy Markdown
Member

Closes #78

Problem

add_follower was whitelisted in @action_types but unhandled (fell through to {:error, type, :unknown}), with no followers table.

Change

  • Migration: escalated_ticket_followers (ticket_id/user_id, unique).
  • Schema Escalated.Schemas.TicketFollower + changeset.
  • Context Escalated.Services.Followers: follower_recipients/2 (exclude actor + dedup, unit tested), add_follower/2, follower_user_ids/2.
  • Handler: WorkflowExecutor now dispatches add_follower (records the follower) instead of :unknown.
  • CI: new mix test job — previously CI ran only format + credo.

Design note

Like the Go port, Phoenix has no reply/status notification fan-out of its own, so the package records followers and exposes the resolved recipients (follower_user_ids/2) for the host to deliver to, rather than emitting on an event.

…tests

Phoenix had add_follower whitelisted in @action_types but unhandled (fell
through to :unknown), with no followers table.

- Migration: escalated_ticket_followers table.
- Escalated.Schemas.TicketFollower schema + changeset.
- Escalated.Services.Followers context: follower_recipients/2 (exclude actor +
  dedup, unit tested), add_follower/2, follower_user_ids/2.
- WorkflowExecutor now handles add_follower (records the follower).
- New `mix test` CI job — previously CI only ran format + credo.

Phoenix has no reply/status notification fan-out of its own, so followers are
recorded and the resolved recipients are exposed for the host to deliver to.

Closes #78
@mpge mpge merged commit 01181c1 into master Jun 30, 2026
2 checks passed
@mpge mpge deleted the feat/follower-notifications branch June 30, 2026 04:53
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