Summary
Phase 2 of #88. Add title_template and body_template Jinja2 string fields to ContentOptions, enabling fully custom notification titles and bodies per config.
Design context
docs/plans/2026-04-14-notification-content-options-design.md — Phase 2 section:
ContentOptions gains title_template / body_template Jinja2 string fields. No schema migration needed — JSONB column already in place.
Scope
- Add
title_template: str | None and body_template: str | None to ContentOptions
- Template context: all fields currently in
WatchEvent + metadata keys (diff_lines, effective_domain, check_interval, etc.)
build_body() renders body_template via Jinja2 when set; falls back to Phase 1 additive composition otherwise
dispatch_event title override: render title_template when set (currently title is unchanged)
- Dashboard: textarea inputs for template strings in the Content Options section (collapsed by default)
- Template preview: render against a synthetic event (deferred if needed — can ship templates without live preview)
Out of scope
- AI-powered summaries (separate future item)
- Template variable autocomplete in the UI
Summary
Phase 2 of #88. Add
title_templateandbody_templateJinja2 string fields toContentOptions, enabling fully custom notification titles and bodies per config.Design context
docs/plans/2026-04-14-notification-content-options-design.md— Phase 2 section:Scope
title_template: str | Noneandbody_template: str | NonetoContentOptionsWatchEvent+metadatakeys (diff_lines,effective_domain,check_interval, etc.)build_body()rendersbody_templatevia Jinja2 when set; falls back to Phase 1 additive composition otherwisedispatch_eventtitle override: rendertitle_templatewhen set (currently title is unchanged)Out of scope