bring in latest feature changes from staging#38
Merged
funmu merged 10 commits intomurali-devfrom Apr 22, 2026
Merged
Conversation
Rework the team-invitation email so it mirrors the accept-invite page: centred Synvya wordmark, "Team Invitation" header, white card with the team's avatar and display name, inviter + recipient + expiry, and a prominent Accept Invitation button. - New api/src/nostr_profile.rs fetches kind-0 metadata (display_name, picture) from BUNKER_RELAYS with a 3s timeout; returns None on any failure so the email still sends with the DB handle as fallback. - Prefer inviter email over the pubkey-prefix fallback when the admin has no display_name/username, so recipients see "staging@…" instead of "f7ebfcf1…". - Team display name + avatar in the email now match what the accept page shows, because both derive from the same kind-0 record. - HTML-escape all interpolated values and restrict avatar URLs to http/https. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(invitations): card-style invite email with kind-0 team profile
Fixes formatting in teams.rs, email_service.rs, and nostr_profile.rs flagged by the `cargo fmt --all -- --check` CI step on synvya-staging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
style: apply cargo fmt
Align the three remaining transactional emails (verification, password reset, account claim) with the visual language of the new team-invite email: centred Synvya wordmark header, centred heading + intro, rounded pill button, copy-link fallback, muted footer note. Done via a small shared helper `basic_email_html` that takes heading, intro, CTA label, CTA URL, and footer note. Keeps the emails minimal — no card, no stylised subject — since these flows have no entity to present and overly stylised reset/verify emails can read as phishing. All interpolated values are HTML-escaped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claim emails now render the same card layout as team invites when the
preloaded account has kind-0 metadata: avatar, display name (restaurant
name), and "Claim your login for {email}". Falls back to the plain
single-CTA layout when kind-0 is unavailable.
- Extend send_claim_email signature with account_display_name and
account_picture Options; threaded through all three EmailSender impls
and the EmailService facade.
- claim_email_html: branches to card layout when either field is set;
otherwise delegates to basic_email_html. HTML-escapes interpolated
values; avatar URL restricted to http/https via safe_http_url.
- admin.rs batch claim handler: best-effort kind-0 fetch from
BUNKER_RELAYS for each user_pubkey (3s timeout, handled entirely in
fetch_profile_metadata) before sending. Silent fallback on failure so
batch throughput degrades gracefully.
Password-reset and verification emails intentionally left on the plain
layout — no entity to present, and over-stylised reset mail reads as
phishing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(email): unify verify / reset / claim email layouts
Collapse a two-line statement onto one line to satisfy rustfmt's width heuristics — the preceding line ran one char longer than cargo fmt's breakpoint, leaving the two lines inconsistent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chore(fmt): apply cargo fmt to admin.rs claim-email call site
Murali dev diVine-> synvya; enable local host build and test
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.
No description provided.