Skip to content

feat(channels): add a subject label to email channels - #159

Merged
btouchard merged 3 commits into
mainfrom
049-email-subject-prefix
Oct 24, 2026
Merged

btouchard merged 3 commits into
mainfrom
049-email-subject-prefix

Conversation

@btouchard

Copy link
Copy Markdown
Member

What

An email channel can carry a subject label, set in the channel wizard, the edit form, the REST API (config.subject_label) or the MCP channel tools. It replaces maintenant between the brackets of every subject:

  • alert: [prod-paris] ALERT: <message>
  • resolution: [prod-paris] RESOLVED: <message>
  • test: [prod-paris] TEST: Test notification

Why

With several instances sending to the same mailbox, the subject is the only thing a mail rule can sort on. The test email used a different subject from the alerts, so a rule that caught one missed the other.

Behaviour

  • Without a label, alert and resolution subjects are unchanged. The test subject becomes [maintenant] TEST: Test notification.
  • The label is trimmed and limited to 64 characters. A control character (line break, tab, NUL...) is refused with 400 VALIDATION_ERROR, and the channel keeps its previous label.
  • An update without config keeps the stored label.
  • The edit form now displays the error returned by the server instead of closing silently.

No migration: the label lives in the existing config column.

An email channel can carry config.subject_label, which replaces
"maintenant" between the brackets of every subject: alert, resolution
and test. The test email now reads [<label>] TEST: Test notification.

The label is trimmed, limited to 64 characters and refused when it holds
a control character, on the REST API and the MCP tools. The channel
wizard and the edit form get a Subject label field, and the edit form
now shows the error returned by the server.
@btouchard
btouchard force-pushed the 049-email-subject-prefix branch from d9d88b1 to 105bacc Compare October 24, 2026 14:59
@btouchard
btouchard merged commit eb6e091 into main Oct 24, 2026
22 checks passed
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