Skip to content

feat(notifications): notify users of their own actions by default#909

Merged
timothyfroehlich merged 2 commits intomainfrom
feat/notify-actors-by-default
Feb 2, 2026
Merged

feat(notifications): notify users of their own actions by default#909
timothyfroehlich merged 2 commits intomainfrom
feat/notify-actors-by-default

Conversation

@timothyfroehlich
Copy link
Owner

Summary

Users requested notifications for their own actions as a personal record/reminder in their inbox. This changes the default behavior of createNotification to include the actor in the recipient list.

  • Change includeActor default from undefined to true
  • Remove redundant includeActor: true flags from call sites
  • Update integration tests to explicitly test actor exclusion scenarios
  • Fix pre-existing invalid UUID bug in database-queries.test.ts

Fixes #849

Test plan

  • Unit tests pass
  • Integration tests pass
  • CI passes
  • Manual verification: Create a comment and verify you receive a notification for it

🤖 Generated with Claude Code

Users requested notifications for their own actions as a personal
record/reminder in their inbox. This changes the default behavior
of createNotification to include the actor in the recipient list.

Changes:
- notifications.ts: Set includeActor default to true
- issues.ts: Remove redundant includeActor: true flags (now default)
- issues.test.ts: Remove includeActor from test expectations
- Integration tests: Add explicit includeActor: false to tests that
  specifically test actor exclusion or recipient preference behavior
- database-queries.test.ts: Fix invalid UUID that was using
  "some-other-user-id" instead of a valid UUID format

Fixes #849

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 2, 2026 03:43
@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pin-point Ready Ready Preview, Comment Feb 2, 2026 3:56am

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 PR changes the default notification behavior to include actors (users who perform actions) in the recipient list, addressing user feedback that they want a personal record of their actions in their inbox. The change is implemented by modifying the includeActor parameter default from undefined to true in the createNotification function.

Changes:

  • Changed includeActor default parameter from undefined to true in createNotification
  • Removed redundant includeActor: true flags from service call sites (3 locations in issues service)
  • Updated integration tests to explicitly set includeActor: false when testing actor exclusion scenarios
  • Fixed pre-existing invalid UUID bug in database-queries.test.ts

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/notifications.ts Changed default value of includeActor parameter from undefined to true
src/services/issues.ts Removed redundant includeActor: true flags from createIssue, updateIssueStatus, and assignIssue functions
src/services/issues.test.ts Updated test expectations to remove redundant includeActor: true assertions
src/test/integration/notifications.test.ts Added explicit includeActor: false to tests that verify actor exclusion behavior
src/test/integration/database-queries.test.ts Fixed invalid UUID and added explicit includeActor: false with clarifying comment

Comment on lines 66 to 72
resourceId: issue.id,
resourceType: "issue",
actorId: actor.id,
includeActor: false, // Explicitly test actor exclusion
commentContent: "Test comment",
},
db
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

Critical test coverage gap: There is no test that validates the new default behavior where actors ARE notified by default. The existing tests either explicitly exclude the actor with includeActor false, or they don't verify that the actor receives a notification. Consider adding a test like "should notify the actor by default" that creates a notification with an actor, doesn't specify includeActor, and verifies that the actor receives the notification. This would ensure the new default behavior is properly tested and prevent regressions.

Copilot uses AI. Check for mistakes.
@timothyfroehlich
Copy link
Owner Author

Closing - implementation needs rework

Addresses Copilot review feedback: adds a test that verifies
actors ARE notified by default when includeActor is not specified.
This ensures the new default behavior is properly tested.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@timothyfroehlich
Copy link
Owner Author

Thanks for the review feedback! I've added a test should notify the actor by default that validates the new default behavior - it creates a notification without specifying includeActor and verifies the actor receives the notification.

@timothyfroehlich timothyfroehlich merged commit 877d2cf into main Feb 2, 2026
19 of 20 checks passed
@timothyfroehlich timothyfroehlich deleted the feat/notify-actors-by-default branch February 2, 2026 04:22
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.

UX: Ensure users receive notifications for their own actions

1 participant