Skip to content

bring in latest feature changes from staging#38

Merged
funmu merged 10 commits intomurali-devfrom
synvya-staging
Apr 22, 2026
Merged

bring in latest feature changes from staging#38
funmu merged 10 commits intomurali-devfrom
synvya-staging

Conversation

@funmu
Copy link
Copy Markdown

@funmu funmu commented Apr 22, 2026

No description provided.

alejandro-runner and others added 10 commits April 21, 2026 19:27
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>
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
@funmu funmu merged commit a31f974 into murali-dev Apr 22, 2026
4 of 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