feat: [49] feat: persist failed matrix deliveries with mail notification and re-send #56

Merged
forgejo-bot merged 3 commits from enhancement/49_delivery_outbox into main 2026-10-13 18:26:15 +00:00
Owner

Summary

  • Persistiert fehlgeschlagene Matrix-Zustellungen als Messaging::Matrix::Delivery (Outbox-Weg: nur Fehler werden gespeichert, kein Statusfeld)
  • Delivery#deliver: Erfolg löscht den Record, Fehler persistiert ihn und informiert den Nutzer per MatrixMailer (kein Dedup, Mail pro Fehlerfall)
  • MatrixJob#deliver_to baut pro Hook ein Delivery-Objekt; GiroCode-Binary wird via ActiveStorage-Attachment für Re-Send vorgehalten
  • Re-Send-UI auf der Matrix-Settings-Seite (POST /app/matrix/deliveries/:id/resend) inkl. Policy; Re-Send-Fehler sendet bewusst keine Mail
  • 19 fehlende helpers.flash-Übersetzungen ergänzt
  • Neuer FlashTranslationsTest: parsst alle Controller via Prism und stellt sicher, dass jeder set_flash-Aufruf unter seinem Laufzeit-Key eine Übersetzung hat (i18n-tasks übersieht die dynamischen Keys)

Closes #49

## Summary - Persistiert fehlgeschlagene Matrix-Zustellungen als `Messaging::Matrix::Delivery` (Outbox-Weg: nur Fehler werden gespeichert, kein Statusfeld) - `Delivery#deliver`: Erfolg löscht den Record, Fehler persistiert ihn und informiert den Nutzer per `MatrixMailer` (kein Dedup, Mail pro Fehlerfall) - `MatrixJob#deliver_to` baut pro Hook ein Delivery-Objekt; GiroCode-Binary wird via ActiveStorage-Attachment für Re-Send vorgehalten - Re-Send-UI auf der Matrix-Settings-Seite (`POST /app/matrix/deliveries/:id/resend`) inkl. Policy; Re-Send-Fehler sendet bewusst keine Mail - 19 fehlende `helpers.flash`-Übersetzungen ergänzt - Neuer `FlashTranslationsTest`: parsst alle Controller via Prism und stellt sicher, dass jeder `set_flash`-Aufruf unter seinem Laufzeit-Key eine Übersetzung hat (i18n-tasks übersieht die dynamischen Keys) Closes #49
Failed matrix deliveries now persist themselves so they can be re-sent
from the matrix settings page. Every failure informs the user by email
via MatrixMailer; a failed re-send updates the delivery in place without
sending another mail (the user already sees the error in the UI).

- Messaging::Matrix::Delivery model with deliver(notify:) and image
  attachment for re-sending GiroCode uploads
- MatrixJob#deliver_to builds deliveries per hook
- MatrixMailer.delivery_failure (MJML) with error message
- Re-Send cards on the matrix settings page (POST /app/matrix/deliveries/:id/resend)
- error flash now survives the resend redirect

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
Systematically compared every set_flash call against the existing
helpers.flash keys (they are excluded from i18n-tasks) and added the
19 missing messages, mostly error cases that previously fell back to
the generic error title with a translation-missing message.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
chore: add flash translations test
All checks were successful
PR Triage / Triage pull request (pull_request) Successful in 0s
PR Triage / Triage pull request-1 (pull_request) Successful in 37s
CI / Quality / Brakeman (pull_request) Successful in 1m9s
CI / Quality / Bundler Audit (pull_request) Successful in 1m10s
CI / Quality / RuboCop (pull_request) Successful in 1m13s
CI / Quality (pull_request) Successful in 0s
CI / Tests / Unit (pull_request) Successful in 1m35s
CI / Tests / System (pull_request) Successful in 1m40s
CI / Tests / Coverage (pull_request) Successful in 31s
CI / Tests (pull_request) Successful in 0s
CI / Container / Build and push (pull_request) Successful in 1m5s
CI / Container (pull_request) Successful in 0s
CI / Deploy (pull_request) Has been skipped
cdda62cd29
---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
forgejo-actions changed title from [49] feat: persist failed matrix deliveries with mail notification and re-send to feat: [49] feat: persist failed matrix deliveries with mail notification and re-send 2026-10-13 18:24:09 +00:00
forgejo-bot scheduled this pull request to auto merge when all checks succeed 2026-10-13 18:24:10 +00:00
forgejo-bot canceled auto merging this pull request when all checks succeed 2026-10-13 18:24:10 +00:00
forgejo-bot scheduled this pull request to auto merge when all checks succeed 2026-10-13 18:24:11 +00:00
forgejo-bot canceled auto merging this pull request when all checks succeed 2026-10-13 18:24:11 +00:00
forgejo-bot scheduled this pull request to auto merge when all checks succeed 2026-10-13 18:24:11 +00:00

📊 Coverage

Metrik Abdeckung
Zeilen 97.96% (3657/3733)
Branches 83.4% (844/1012)
Methoden 98.18% (593/604)

Patch-Coverage: 82.05% (64/78 geänderte Zeilen)

Geänderte Dateien (schwach zuerst)

Datei Patch-Coverage Fehlende Zeilen
app/views/app/matrix/show.rb 30.0% (6/20) 67-68, 71, 75, 77-81, 85-86, 88, 90-91
app/models/messaging/matrix/delivery.rb 100.0% (22/22)
app/controllers/app/matrix/deliveries_controller.rb 100.0% (7/7)
app/mailers/matrix_mailer.rb 100.0% (7/7)
app/jobs/matrix_job.rb 100.0% (5/5)
app/components/card.rb 100.0% (4/4)
app/policies/messaging/matrix/delivery_policy.rb 100.0% (3/3)
app/jobs/bank/account/balance_information_job.rb 100.0% (2/2)
app/jobs/bank/session/check_expiring_job.rb 100.0% (2/2)
app/jobs/bank/transaction/notify_job.rb 100.0% (2/2)

Schwächste Dateien im Projekt

Datei Abdeckung
app/components/form/select.rb 75.86%
app/components/layout/notification.rb 80.95%
app/views/app/matrix/show.rb 83.91%
app/views/app/bank/accounts/index.rb 86.89%
app/controllers/app/matrix/logins_controller.rb 87.5%
app/components/concerns/actionable.rb 88.89%
app/components/layout/sidebar.rb 89.47%
app/components/concerns/inferrable.rb 90.63%
app/models/concerns/has_uuid_v7.rb 90.91%
app/components/users/avatar.rb 91.23%

🔍 Report im Browser ansehen · 📄 Run-Artifact „coverage-report“

<!-- coverage-report --> ## 📊 Coverage | Metrik | Abdeckung | |---|---| | Zeilen | 97.96% (3657/3733) | | Branches | 83.4% (844/1012) | | Methoden | 98.18% (593/604) | **Patch-Coverage**: 82.05% (64/78 geänderte Zeilen) **Geänderte Dateien (schwach zuerst)** | Datei | Patch-Coverage | Fehlende Zeilen | |---|---|---| | app/views/app/matrix/show.rb | 30.0% (6/20) | 67-68, 71, 75, 77-81, 85-86, 88, 90-91 | | app/models/messaging/matrix/delivery.rb | 100.0% (22/22) | | | app/controllers/app/matrix/deliveries_controller.rb | 100.0% (7/7) | | | app/mailers/matrix_mailer.rb | 100.0% (7/7) | | | app/jobs/matrix_job.rb | 100.0% (5/5) | | | app/components/card.rb | 100.0% (4/4) | | | app/policies/messaging/matrix/delivery_policy.rb | 100.0% (3/3) | | | app/jobs/bank/account/balance_information_job.rb | 100.0% (2/2) | | | app/jobs/bank/session/check_expiring_job.rb | 100.0% (2/2) | | | app/jobs/bank/transaction/notify_job.rb | 100.0% (2/2) | | **Schwächste Dateien im Projekt** | Datei | Abdeckung | |---|---| | app/components/form/select.rb | 75.86% | | app/components/layout/notification.rb | 80.95% | | app/views/app/matrix/show.rb | 83.91% | | app/views/app/bank/accounts/index.rb | 86.89% | | app/controllers/app/matrix/logins_controller.rb | 87.5% | | app/components/concerns/actionable.rb | 88.89% | | app/components/layout/sidebar.rb | 89.47% | | app/components/concerns/inferrable.rb | 90.63% | | app/models/concerns/has_uuid_v7.rb | 90.91% | | app/components/users/avatar.rb | 91.23% | [🔍 Report im Browser ansehen](https://pages.hoppe-dev.eu/hobbypunk-centinel/pr-56/coverage) · [📄 Run-Artifact „coverage-report“](https://code.hoppe-dev.eu/hobbypunk/centinel/actions/runs/2738/artifacts/coverage-report)
forgejo-bot deleted branch enhancement/49_delivery_outbox 2026-10-13 18:26:15 +00:00
Sign in to join this conversation.
No description provided.