Skip to content

Web versions show the content that was sent - #121

Merged
clbotdev merged 1 commit into
test-send-limitsfrom
sent-content-versions
Oct 22, 2026
Merged

clbotdev merged 1 commit into
test-send-limitsfrom
sent-content-versions

Conversation

@clbotdev

Copy link
Copy Markdown
Contributor

Stacked on #120.

What

  • New email_content_versions table: one immutable row per distinct subject + content of an email (deduped by hash, public ver_ id, deleted with the email).
  • Sequence worker, broadcast sends and test sends store or reuse the version and put its public id in the view-in-browser token (v claim). email_deliveries.content_version_id records which version each contact got.
  • GET /view/:token renders the stored version; a version from another email returns 404. Links without v (sent before this) keep rendering current content.
  • updateSequence refuses to change a sent broadcast's title (its subject), matching the existing content lock.
  • REST contract, MCP tool descriptions and docs updated.

Why

Editing an active sequence's email changed what earlier recipients saw in their web version, and test links showed later draft edits.

Tests

Version dedupe and ownership, edit mid-sequence (earlier link shows A, later shows B), legacy links, foreign version 404, test link shows tested content, broadcast title lock.

Each send stores (or reuses) an immutable copy of the email's subject and
content, and its view-in-browser link carries that version's public id, so
editing a running sequence's email no longer changes what earlier
recipients and test links show. Older links keep showing current content.
A sent broadcast's title (its subject) is now locked like its content.
@clbotdev
clbotdev merged commit 17fd829 into test-send-limits Oct 22, 2026
5 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.

2 participants