Skip to content

Markee buy-flow modal on Explore#338

Merged
tnrdd merged 2 commits into
mainfrom
feat/markee-buy-modal
Jul 2, 2026
Merged

Markee buy-flow modal on Explore#338
tnrdd merged 2 commits into
mainfrom
feat/markee-buy-modal

Conversation

@tnrdd

@tnrdd tnrdd commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Replaces the display-only Markee banner on the Explore page with an embedded buy flow.

  • MarkeeSign trigger: top message and owner from the leaderboards proxy, hover price badge, per-session view tracking, moderation handling, opens the modal
  • MarkeeModal (native dialog): Buy a Message and Boost Existing Message tabs, on-chain reads (minimumPrice, maxMessageLength, getTopMarkees + per-markee multicall), createMarkee/addFunds writes, success state with Basescan link
  • Submit buttons follow the existing connect/switch/submit cascade pattern
  • Wallet connect closes the dialog so RainbowKit renders on top, then reopens it; form state lives in the trigger so it survives the round trip
  • Proxy routes: /api/markee/leaderboards, /api/markee/views, /api/markee/moderation, /api/markee/health
  • Removes MarkeeBanner, getFlowStateMarkee, and the old /api/markee route

Verified with headless-browser checks against the dev server: SSR data-markee-address attribute, boost list read from Base, preset amounts, 8-digit input cap, and the connect round trip.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
platform Ready Ready Preview, Comment Jul 2, 2026 6:07am

Request Review

@gaston-review gaston-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gaston Review

Verdict: Approved

Score: ███████░░░ 7/10

Pull Request Summary

This PR replaces the old Markee banner (a link to markee.xyz) with a full in-app buy/boost modal. It moves data fetching from server-side (which blocked page load in Promise.all) to client-side, adds three proxy API routes to markee.xyz (leaderboards, moderation, views), introduces a MarkeeSign component for the explore page sign, and a MarkeeModal with buy and boost tabs backed by on-chain transactions via wagmi.

Review Summary

🟡 Warning — Health endpoint is a hardcoded lie
The /api/markee/health route always returns { overall: "ok" } with three sub-checks all returning ok, regardless of whether markee.xyz is actually reachable. If this is consumed by monitoring, it will mask real outages. Either remove it, make it a static endpoint that doesn't pretend to check things, or actually probe the upstream services.

🔵 Suggestion — Duplicate moderation fetch between MarkeeSign and MarkeeModal
Both MarkeeSign and MarkeeModal independently fetch /api/markee/moderation on mount and maintain separate flagged state. The moderation data could be fetched once in MarkeeSign and passed as a prop to MarkeeModal, avoiding the redundant request when the dialog opens.

🟡 Warning — Views POST proxy is an open relay with no rate limiting
The /api/markee/views endpoint accepts any POST with an address and message field and forwards it to markee.xyz. There's no authentication, no CSRF protection, no rate limiting. Anyone can call this endpoint to inflate view counts for arbitrary markee addresses. If markee.xyz doesn't rate-limit by IP, this could be abused trivially.

The overall direction is good — moving from a blocking server-side fetch to a client-side flow with a richer UX. Code is well-structured with proper error handling throughout. I have a few concerns about the health endpoint being misleading, duplicate moderation fetches, and the open views proxy, but none are blockers.

📌 4 inline comments
🟡 Warning: 1 · 🔵 Suggestion: 2 · ⚪ Nitpick: 1


🔍 Reviewed by Gaston

Comment thread src/app/api/markee/health/route.ts Outdated
Comment thread src/app/api/markee/views/route.ts
Comment thread src/app/explore/components/MarkeeModal.tsx
Comment thread src/app/explore/components/MarkeeSign.tsx Outdated

@gaston-review gaston-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gaston Review

Verdict: Approved

Score: ████████░░ 8/10

Pull Request Summary

This PR replaces the old Markee banner (a link to markee.xyz) with a full in-app buy/boost modal. It moves data fetching from server-side to client-side, adds three proxy API routes plus a real health check, introduces a MarkeeSign component for the explore page, and a MarkeeModal with buy and boost tabs backed by on-chain transactions via wagmi.

Clean follow-up push. All three actionable items from my prior review are addressed: health check now actually probes upstream with timeouts, views validation properly checks types with typeof, and the duplicate moderation fetch is eliminated by passing flagged as a prop. No new issues to flag. Ship it.


🔍 Reviewed by Gaston

@tnrdd tnrdd merged commit 150523e into main Jul 2, 2026
4 checks passed
@tnrdd tnrdd deleted the feat/markee-buy-modal branch July 2, 2026 19:09
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.

1 participant