Skip to content

Add draft and publish workflows for broadcast and sequence emails - #186

Merged
s3rot0n1n merged 3 commits into
mainfrom
t3/issue-184
Nov 5, 2026
Merged

s3rot0n1n merged 3 commits into
mainfrom
t3/issue-184

Conversation

@s3rot0n1n

Copy link
Copy Markdown
Contributor

Summary

  • Add draft editing, publishing, discarding, version history, and restore workflows for active sequences and scheduled broadcasts.
  • Keep sends on the published version until changes are published; support publish scope choices for sequence recipients.
  • Update dashboard controls, API and MCP contracts, SDK, documentation, migration, and OpenAPI reference.
  • Fix scheduled broadcast titles to reflect the published subject and drop unpublished drafts when sending starts.

Testing

  • Browser E2E: exercised sequence and scheduled broadcast draft, publish, discard, restore, and send flows; no browser console errors.
  • API suite: 1,050 passed, 0 failed.
  • Web tests: 116 passed, 0 failed; SDK tests: 77 passed, 0 failed.
  • Typecheck, conformance, schema drift, OpenAPI check, lint, and format checks passed.

- Add draft editing, publishing, discarding, and email version history for broadcasts and sequences
- Update API, SDK, dashboard, and documentation
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T14:00:07.714602Z 3ff09da PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ff09da5aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +642 to +644
patch.subject = subject ?? working.subject;
patch.content = (content ?? working.content) as any;
Object.assign(patch, noDraft);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the prior live version before direct edits

When a sequence is paused after sends and an email is edited through this direct-save branch, the current subject and content are replaced without recording the version being displaced. The send path may already have created an email_content_versions row for that content, but with published_at still null; listEmailVersions filters out null timestamps and marks only the new current version, so the previously sent version disappears from history and cannot be restored. Record the prior live version before replacing it directly.

Useful? React with 👍 / 👎.

content: email.draftContent,
}),
]);
await db.transaction(async (tx) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Publish requested email changes atomically

When a request publishes multiple emails and another editor changes a later draft after the initial scan, that email's guarded update throws draft_changed after earlier loop iterations have already committed. The caller receives a failure even though some requested emails are live. Keep the multi-email updates and pin changes in one transaction, or otherwise prevent this partial-success outcome.

Useful? React with 👍 / 👎.

Rajat added 2 commits November 5, 2026 21:45
- Surface unpublished changes beside email content with publish and discard actions
- Group version history and discard in an email actions menu
- Align broadcast and sequence docs with the updated workflow
- Add MCP connection instructions to settings and promote assistants across empty states
- Document dashboard setup and expose the configured MCP URL
@s3rot0n1n
s3rot0n1n merged commit 905a1bd into main Nov 5, 2026
6 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.

1 participant