Skip to content

feat(review): automatic per-status messages to the applicant#215

Merged
Musiker15 merged 1 commit into
mainfrom
feat/status-change-messages
Jul 21, 2026
Merged

feat(review): automatic per-status messages to the applicant#215
Musiker15 merged 1 commit into
mainfrom
feat/status-change-messages

Conversation

@Musiker15

Copy link
Copy Markdown
Member

Feature request: send an automatic preset (or custom) message when a submission's status changes, a different message per status, overridable with a custom one, and optional per-form overrides.

What it does

  • Per-status templates (guild-wide): a new manager-only Messages tab lists every status (built-in + custom) with a message box. Whatever you set is sent to the applicant automatically when a submission enters that status. Stored in Guild.statusMessages.
  • Per-form override: the form builder gets a collapsible "Status messages (this form)" section that overrides the guild templates for that one form (Form.settings.statusMessages).
  • At-change override: in the review panel, changing the status prefills the target status' template into an editable box. Send it as-is, edit it, or clear it to send no message for that change.
  • Applied everywhere: resolution + delivery live in the shared changeSubmissionStatus, so it also fires for bulk status changes, the bot's Accept/Reject buttons and score automations. A public status change records the message as a message event (shown on the applicant's status page) and DMs it. A resolved message supersedes the generic "status changed" DM so the applicant gets one meaningful notification; hidden changes stay silent.

Implementation

  • Schema: Guild.statusMessages JSON (+ migration). Per-form lives in the existing Form.settings JSON (no migration).
  • Shared: statusMessagesSchema, parseStatusMessages, resolveStatusMessage (form override -> guild) + tests.
  • API: PATCH /api/guilds/[guildId]/status-messages; the submission status action gained an optional message.
  • Resolution order: explicit override -> per-form template -> guild template. Empty = no message.

Localized in all 7 languages. Typecheck, lint, tests (shared 186) and build green. Migration applies via the deploy prisma migrate deploy.

Note: per-form overrides are not plan-gated in this version (guild-level presets are the core). Easy to gate later if desired.

Send an automatic message to the applicant when a submission enters a status,
with a different message per status, editable per change, and overridable per
form.

- Guild-wide templates: new Guild.statusMessages map { statusKey: message }
  (+ migration), edited on a new manager-only "Messages" tab that lists every
  status (built-in + custom).
- Per-form override: Form.settings.statusMessages (no schema change), edited in
  the form builder; overrides the guild template for that form.
- Applied in the shared changeSubmissionStatus chokepoint, so it covers web
  review, bulk actions, the bot's Accept/Reject buttons and automations: a
  public status change resolves the template (form -> guild) and records it as a
  message event + applicant DM. A resolved message supersedes the generic
  status-change DM (one meaningful notification); hidden changes stay silent.
- At-change override: the review panel prefills the target status' template into
  an editable box; send it as-is, edit it, or clear it to send no message
  (status action gained an optional `message`).

Shared resolveStatusMessage/parseStatusMessages (+ tests). Localized in all 7
languages. Typecheck, lint, tests (shared 186) and build green.
@Musiker15
Musiker15 merged commit f91433a into main Jul 21, 2026
5 checks passed
@Musiker15
Musiker15 deleted the feat/status-change-messages branch July 21, 2026 15:23
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.

1 participant