Skip to content

feat(react-email): filter compatibility warnings by email client#3547

Merged
felipefreitag merged 1 commit into
canaryfrom
feat/clients-compat-flag
May 27, 2026
Merged

feat(react-email): filter compatibility warnings by email client#3547
felipefreitag merged 1 commit into
canaryfrom
feat/clients-compat-flag

Conversation

@felipefreitag
Copy link
Copy Markdown
Contributor

@felipefreitag felipefreitag commented May 27, 2026

Adds --clients to email dev and reads COMPATIBILITY_EMAIL_CLIENTS from the environment so teams that only target a subset of clients can quiet warnings for the rest. The CLI flag wins over the env var; an empty or fully-invalid list falls back to the defaults so warnings can't be silently switched off. The Compatibility tab shows the active client list above the results so the filter is never invisible.

Builds on #2797 by @ReemX with the cubic-flagged regressions fixed: the port-retry path now preserves the flag, undefined no longer clobbers a user-set env var, and invalid env values fall back to the defaults instead of suppressing all checks. This PR supersedes that one.

Added a list of the current clients to the Compatibility tab so the user can know what the template is verified against:
CleanShot 2026-05-27 at 11 28 52@2x


Summary by cubic

Add a clients filter for compatibility checks so teams only see warnings for the email clients they target. Adds email dev --clients and COMPATIBILITY_EMAIL_CLIENTS, and updates the Compatibility tab and success copy to name the active clients.

  • New Features

    • react-email CLI: --clients <comma-separated> controls which clients trigger warnings. Validates names; errors on unknown or empty lists. Overrides COMPATIBILITY_EMAIL_CLIENTS. Defaults: gmail, apple-mail, outlook, yahoo. Example: email dev --clients outlook,apple-mail.
    • Preview app reads COMPATIBILITY_EMAIL_CLIENTS; invalid or empty values fall back to defaults.
    • UI: shows the active client list and uses it in empty-state/success messages (nicenames shown).
  • Bug Fixes

    • Port retry preserves the selected clients.
    • Preview startup no longer overwrites a user-set COMPATIBILITY_EMAIL_CLIENTS with undefined.

Written for commit 3b5af2f. Summary will update on new commits. Review in cubic

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment May 27, 2026 2:56pm
react-email-demo Ready Ready Preview, Comment May 27, 2026 2:56pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

🦋 Changeset detected

Latest commit: 3b5af2f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@react-email/ui Minor
react-email Minor
@react-email/editor Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/react-email@3547
npm i https://pkg.pr.new/@react-email/ui@3547

commit: 3b5af2f

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 13 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: The changes add a controlled filter for compatibility warnings with proper validation, fallback to defaults when invalid, and clear UI indicators, all within an isolated subsystem and without affecting core business logic, security, or data integrity.

Re-trigger cubic

Comment thread packages/ui/src/components/toolbar/compatibility.tsx Outdated
@felipefreitag felipefreitag force-pushed the feat/clients-compat-flag branch from 464f488 to 4eb0fe5 Compare May 27, 2026 14:53
Adds --clients to email dev and reads COMPATIBILITY_EMAIL_CLIENTS from the
environment so teams that only target a subset of clients can quiet warnings
for the rest. The CLI flag wins over the env var; an empty or fully-invalid
list falls back to the defaults so warnings can't be silently switched off.
The empty-state copy on the Compatibility tab now names the active client
list ("Template should render properly in Gmail") instead of claiming
"everywhere," so the filter scope isn't misrepresented when there are no
issues.

Builds on #2797 by @ReemX with the cubic-flagged regressions fixed: the
port-retry path now preserves the flag, undefined no longer clobbers a
user-set env var, and invalid env values fall back to the defaults instead
of suppressing all checks.

Co-authored-by: ReemX <reemasaf44@gmail.com>
Co-authored-by: Gabriel Miranda <gabrielmfern@outlook.com>
@felipefreitag felipefreitag force-pushed the feat/clients-compat-flag branch from 4eb0fe5 to 3b5af2f Compare May 27, 2026 14:54
@felipefreitag felipefreitag merged commit 3875d2a into canary May 27, 2026
18 of 20 checks passed
@felipefreitag felipefreitag deleted the feat/clients-compat-flag branch May 27, 2026 14:58
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