Skip to content

feat: notification jobs and emails for workflows#327

Merged
gusfcarvalho merged 13 commits intomainfrom
gc-feat-notification-jobs
Feb 23, 2026
Merged

feat: notification jobs and emails for workflows#327
gusfcarvalho merged 13 commits intomainfrom
gc-feat-notification-jobs

Conversation

@gusfcarvalho
Copy link
Contributor

No description provided.

feat: new task assigned
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copilot AI review requested due to automatic review settings February 20, 2026 10:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a comprehensive notification system for workflows, adding email notifications for task assignments, due-soon reminders, daily digests, and execution failures. The changes integrate a new notification enqueuer pattern into the workflow execution engine and introduce several new River worker types to handle asynchronous email delivery.

Changes:

  • Adds four new notification worker types (task-assigned, due-soon, task-digest, execution-failed) with corresponding email templates
  • Introduces NotificationEnqueuer interface for decoupling notification jobs from the workflow engine
  • Updates workflow configuration to support scheduling notification jobs
  • Implements user repository for notification recipient lookup
  • Adds CreatedByID/UpdatedByID tracking to workflow instances

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
workflow.yaml Adds configuration flags for enabling due-soon and task-digest notifications with cron schedules
internal/config/workflow.go Defines new configuration fields for notification features with defaults
internal/config/workflow_test.go Tests for new notification configuration fields
internal/workflow/executor.go Integrates NotificationEnqueuer interface and enqueues task-assigned notifications during workflow initialization and step unblocking
internal/workflow/overdue.go Adds notification enqueuing when workflow executions fail during overdue checks
internal/workflow/manager.go Enqueues failure notifications when workflow execution job enqueuing fails
internal/workflow/assignment.go Enqueues task-assigned notifications after step reassignment, adds logger parameter to constructor
internal/workflow/assignment_test.go Updates tests to pass logger to NewAssignmentService
internal/workflow/executor_integration_test.go Updates tests to pass logger to NewAssignmentService
internal/service/worker/service.go Implements notification enqueuer methods, wires up new workers, adds periodic job configuration
internal/service/worker/jobs.go Defines job args for notification types, adds notification worker implementations
internal/service/worker/user_repository.go Implements user lookup for notification recipients
internal/service/worker/due_soon_checker.go Periodic worker that finds tasks due soon and enqueues reminder emails
internal/service/worker/workflow_task_digest_checker.go Periodic worker that enqueues digest jobs for subscribed users
internal/service/worker/workflow_task_digest_worker.go Sends per-user digest of pending/overdue tasks
internal/service/worker/workflow_execution_failed_worker.go Sends failure notification to workflow instance creator
internal/service/worker/*_test.go Comprehensive test coverage for new workers
internal/service/email/templates/templates/*.html HTML email templates for notifications
internal/service/email/templates/templates/*.txt Plain text email templates for notifications
internal/service/email/templates/service_test.go Tests for new email templates
internal/api/handler/workflows/workflow_instance.go Captures CreatedByID and UpdatedByID from actor claims
internal/api/handler/workflows/*_integration_test.go Updates tests to pass logger to NewAssignmentService
internal/api/handler/api.go Updates handler initialization to pass logger to NewAssignmentService
Makefile Changes "reviewable" target from swagger generation to linting and integration tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 68 out of 68 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fix: tests
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 74 out of 74 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fix: email templates for my tasks
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 74 out of 74 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 74 out of 74 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 74 out of 74 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gusfcarvalho gusfcarvalho merged commit 7c9f878 into main Feb 23, 2026
8 checks passed
@gusfcarvalho gusfcarvalho deleted the gc-feat-notification-jobs branch February 23, 2026 11:05
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.

2 participants