feat(export): richer mailto flow — recipients, team context, signed footer - #36
Merged
Conversation
…ooter Rework the "Email report" button so the report actually leaves the device the way a real coach would send it, without the previous guesswork: - Composer modal collects To / Cc / Subject / Message before assembling the mailto: link (Gmail, Outlook web, and native clients all need a recipient before they enable Send). - Subject now carries the active team name (from MisterTeams); body starts with a "From: <team> · <formation> · <coach>" line. - Body footer appends the device's public-key fingerprint (from MisterSigning) so the recipient can cross-check identity. - "Copy report" button dumps the FULL text (no 40-line cap) to the clipboard as a fallback for extra-long reports. - "Download PDF too" button triggers the existing exportPdf() side by side, so the attachment reminder becomes a one-click action. - Last-used To / Cc addresses persist in localStorage. - Preflights the URL length — if the client would truncate, we warn and suggest the clipboard route instead of dropping content silently. - demo/styles.css: .em-modal (wider), textarea, meta chips, footer - demo/index.html + demo/sw.js: ?v=34 / CACHE_VERSION → v34 Verified in jsdom: modal opens with team-aware subject + From line + live URL + trim indicator; mailto assembles with to/cc/subject/body; localStorage remembers recipients; empty report path shows warning toast; clipboard copy delivers the full report.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Composer modal collects To / Cc / Subject / Message before we assemble the
mailto:link (Gmail/Outlook web need a recipient before Send is active). Subject carries the active team name; body starts withFrom: <team> · <formation> · <coach>and ends with the device pubkey fingerprint so the recipient can cross-check identity.Three buttons in the footer:
exportPdf()so attaching becomes one clickto,cc,subject,body; preflights URL length and warns instead of silently truncating.Last-used recipients persist in
localStorage. Verified end-to-end via jsdom: modal opens, subject has team, From line present, live URL present, trim indicator present,mailtocorrectly assembled, recipients persisted, empty-report path shows warning.