feat: announce new submissions in the guild review channel (bot)#52
Merged
Conversation
When a form is submitted, the bot posts a review embed (applicant + answer preview + 'Open in dashboard' link) to the guild's configured review channel. - db migration: Notification.user_id is now nullable and gains an optional guild_id (+ index), so the outbox can target a guild channel, not only a user DM. - shared: 'submission_review' notification type + SubmissionReviewNotification payload (submissionId, formTitle, applicantName, preview lines). - submit route: best-effort queues a submission_review Notification (guildId + payload) after the submission is created; failure never breaks the submit. - bot: deliverReview resolves the guild's botConfig.reviewChannelId and posts the embed; drops cleanly when no guild/channel or on permanent channel errors (Unknown Channel / Missing Access / Missing Permissions), retries transient. Accept/Reject buttons + role grant land in the next task.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 finish — Task 2/5: New-submission review embed
When a form is submitted, the bot posts a review embed (applicant + answer preview + an Open in dashboard link) to the guild's configured review channel (concept §11 / §5.1 step 7).
Changes
Notification.user_idis now nullable and gains an optionalguild_id(+ index), so the outbox can target a guild channel, not only a user DM. (prisma migrate deployapplies it.)submission_reviewnotification type +SubmissionReviewNotificationpayload (submissionId, formTitle, applicantName, preview lines).submission_reviewNotification (guildId + payload) after the submission is created; a queue failure never breaks the submit.deliverReviewresolves the guild'sbotConfig.reviewChannelIdand posts the embed; drops cleanly when there's no guild/channel or on permanent channel errors (Unknown Channel / Missing Access / Missing Permissions), retries transient ones.dashboardSubmissionUrlhelper (+ test).Notes
Guild.botConfig. If unset, the embed is silently skipped.Verification
pnpm typecheck✅ (web + bot) ·pnpm lint✅ ·pnpm test✅ ·pnpm build✅ · bot loads under tsx ✅