Skip to content

feat(proposals): email outbox templates and send/revoke actions (TASK-0060) - #72

Merged
Ediminator merged 5 commits into
mainfrom
feat/task-0060-proposals-email-outbox-templates-and-sen
Oct 28, 2026
Merged

Ediminator merged 5 commits into
mainfrom
feat/task-0060-proposals-email-outbox-templates-and-sen

Conversation

@Ediminator

Copy link
Copy Markdown
Owner

Summary

Implements TASK-0060: Proposals email outbox templates, outbox processor wiring, getAcceptedProposalForProject query helper, and saveDraftProposalAction / sendProposalAction / revokeProposalTokenAction server actions.

  • Database Schema & Migration (0021_motionless_cerebro.sql): Extended email_outbox with nullable proposal_id (ON DELETE CASCADE) and email kinds proposal_sent, proposal_accepted_client, and proposal_accepted_owner.
  • Localized Email Templates & Outbox Processor: Added English and German (en/de) HTML + plain-text templates with RFC 3834 anti-loop headers (Auto-Submitted: auto-generated, Precedence: bulk) and validated absolute /p/[token] URLs (NEXT_PUBLIC_APP_URL). Wired processEmailOutboxBatch to dispatch proposal emails via SMTP and suppress proposal_sent emails if a proposal token was revoked prior to delivery.
  • Proposal Actions & Services: Implemented saveDraftProposalAction, sendProposalAction (generating 256-bit cryptographically random tokens and persisting only the SHA-256 hash), and revokeProposalTokenAction (protected by requireOwner()), plus getAcceptedProposalForProject in src/server/proposals/accepted-summary.ts (decoupled from Next.js request headers for worker bundle safety).

Validation

  • Quality Gate (--profile full): 13/13 steps PASS on 927f3ff5a186 (unit/integration coverage: 91.10% statements, 85.98% branches, 87.09% functions, 91.45% lines; 208/208 Playwright E2E tests).
  • Independent Reviews: validator (PASS, 0 blocking) and security-privacy-auditor (PASS, 0 blocking) in iteration 2.

…/revoke actions (TASK-0060)

Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
…okens (TASK-0060)

Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
… fixtures (TASK-0060)

Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
… revoked deliveries (TASK-0060)

Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
@Ediminator
Ediminator merged commit f31a233 into main Oct 28, 2026
8 checks passed
@Ediminator
Ediminator deleted the feat/task-0060-proposals-email-outbox-templates-and-sen branch October 28, 2026 20:39
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