implement registration-confirmation-email

- Add qrbill and pillow dependencies for Swiss QR-bill PNG generation
- Add _STRINGS_DE / _STRINGS_EN bilingual string tables to AdminNotifier
- Add _generate_qr_bill_png(): Swiss QR code with cross overlay (PNG bytes)
- Add _build_parent_html(): HTML confirmation with inline cid:qrbill image
- Add _build_parent_text(): plain-text fallback with IBAN in full
- Add notify_parent(): multipart/mixed MIME email to parent on completion
- Persist metadata.language in _build_record() in json_store.py
- Wire notify_parent() into src/agent/core.py and chat_app.py completion events
- Add 9 tests for notify_parent, _generate_qr_bill_png, language fallback
- Update tasks.md: tasks 1–5 complete; task 6 (smoke test) remains manual

112 tests passing.

https://claude.ai/code/session_01LjjK7RjKVnC8bETtccfgna
This commit is contained in:
Claude
2026-02-22 21:23:32 +00:00
parent 1632433b6a
commit b2e04fa07b
9 changed files with 756 additions and 19 deletions
+9
View File
@@ -172,6 +172,15 @@ async def on_message(message: cl.Message) -> None:
logger.exception(
"Failed to save/notify for session %s", state.conversation_id
)
try:
_notifier.notify_parent(
registration=state.registration,
language=state.language,
)
except Exception:
logger.exception(
"Failed to send parent confirmation for session %s", state.conversation_id
)
# --- Handle post-completion update intent ---
if state.completed and intent == "update" and any(v is not None for v in updates.values()):