[#499] Add notification for new storyline created#505
Conversation
Add a dedicated notification for new storylines with "New story
published" title and "{title} by {author}" body. Called from the
backfill cron when a StorylineCreated event is first indexed.
Fixes #499
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The new trigger is wired into the right backfill path, but the notification body does not match the copy requested in issue #499 / the T1 assignment. The implementation currently truncates both the title and author before sending.
Findings
- [medium]
notifyNewStoryline()rewrites the requested body instead of sending"{title}" by {author} is now on PlotLink.- File:
lib/notifications.server.ts:175 - Suggestion: Send the full
titleandauthorvalues in the body, or explicitly document and test a notification length constraint before changing the requested copy.
- File:
Decision
Requesting changes because the acceptance criteria call for the correct notification body, and the current helper intentionally changes that body for longer titles/authors.
Send the exact body from the requirement: "{title}" by {author}
is now on PlotLink — without truncating either value.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The requested change is resolved. notifyNewStoryline() now sends the exact body specified in issue #499, and the backfill cron triggers it on StorylineCreated events.
Findings
- None.
Decision
Approve because the new notification helper, notification ID, deep link, and backfill trigger now match the issue requirements.
Summary
notifyNewStoryline()tolib/notifications.server.ts— sends "New story published" /"{title}" by {author} is now on PlotLinkwith target/story/{storylineId}and notification IDpl-new-storyline-{storylineId}notifyNewStoryline()onStorylineCreatedevents instead ofnotifyNewPlot()(which was sending a generic "New Genesis published" message)0x1234…5678)Test plan
notifyNewStorylinesends correct title/body/targetUrl via backfill cronnotifyNewPlotstill fires forPlotChainedeventspl-new-storyline-{id})Fixes #499
🤖 Generated with Claude Code