Skip to content

fix(web): editor's unsaved-changes dialog - #180

Merged
clbotdev merged 2 commits into
mainfrom
fix/editor-unsaved-guard
Nov 3, 2026
Merged

clbotdev merged 2 commits into
mainfrom
fix/editor-unsaved-guard

Conversation

@clbotdev

@clbotdev clbotdev commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Two fixes to the "Save your changes?" dialog in the full-screen email editor.

  • It appeared after a save. The Send test dialog saves the email first, through the editor's actions prop, which called onSave directly and left the unsaved-changes flag set. Leaving then asked to save an email that was already saved. All saves now go through one persist helper that clears the flag (and sets it again if the save fails).
  • It was laid out wrong. The three buttons need about 414px but the confirmation card is 384px, so the button row and text spilled past the card's right edge. This dialog now uses data-[size=default]:sm:max-w-lg. The shared alert-dialog.tsx is unchanged.

Tests: a new case for each (save via action then exit shows no dialog; the dialog has the wider class). Checked the width by rendering the markup with the compiled Tailwind CSS, not in the live editor.

🤖 Generated with Claude Code

s3rot0n1n and others added 2 commits November 3, 2026 13:52
…email

The 'Send test' dialog saves the document through the editor's actions prop,
which called onSave directly. That left the unsaved-changes flag set, so
leaving the editor showed 'Save your changes?' for an email that was already
saved. Every save now goes through one persist helper that clears the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three actions need about 414px, but a confirmation dialog is 384px wide, so
the button row and the text pushed past the card's right edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clbotdev
clbotdev merged commit b332950 into main Nov 3, 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