Skip to content

fix: recent supporters, embed HTML nesting, and 401 hard reload - #842

Merged
OlaGreat merged 1 commit into
OlaGreat:mainfrom
Obiajulu-gif:fix/issues-826-827-829-embed-and-auth-fixes
Jul 24, 2026
Merged

fix: recent supporters, embed HTML nesting, and 401 hard reload#842
OlaGreat merged 1 commit into
OlaGreat:mainfrom
Obiajulu-gif:fix/issues-826-827-829-embed-and-auth-fixes

Conversation

@Obiajulu-gif

@Obiajulu-gif Obiajulu-gif commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #829
Closes #827
Closes #826

Test plan

  • Confirm the embed widget shows the 5 most recent transactions, not the all-time leaderboard
  • Load /embed/:username directly and inspect the rendered DOM — no nested <html>, embed.css applied, background transparent
  • Embed the page in a test iframe on a page with a non-white background and confirm the widget background is transparent
  • Trigger a 401 (e.g. expire the session) while mid-edit on the profile form and confirm the re-auth prompt appears without losing form input
  • next build — pre-existing lint errors in privacy/terms pages are unrelated to this change (verified present on main before this branch)

OlaGreat#829, OlaGreat#827, OlaGreat#826)

- OlaGreat#829: embed page now fetches /transactions?limit=5 (sorted by createdAt
  desc) instead of the all-time leaderboard, so "Recent Supporters" shows
  genuinely recent activity instead of the biggest all-time donors.
- OlaGreat#827: added frontend/src/app/embed/layout.tsx and stopped the embed page
  from rendering its own <html>/<head>/<body>, eliminating the invalid
  double-nested document that broke embed.css and background transparency
  in iframes. embed.css now forces a transparent background since the
  route still inherits the root layout's <body>.
- OlaGreat#826: apiFetch no longer calls window.location.reload() on a 401 —
  it dispatches an "auth:expired" CustomEvent. A new AuthExpiredListener
  (mounted in Providers) shows a re-auth prompt instead of destroying
  in-progress form state on pages like edit-profile or the dashboard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@Obiajulu-gif Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions

Copy link
Copy Markdown

Lighthouse Report 🚀

⚠️ Lighthouse results not available. The audit may have failed during collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment