Skip to content

Fix mislabeled 'Recommended for you', hardcoded mainnet badge, dead error status, and inert Create bounty button - #320

Merged
chonilius merged 3 commits into
MergeFi:mainfrom
boluwacodes:fix/recommended-label-hero-network-badge-error-status-create-bounty-link
Aug 25, 2026
Merged

Fix mislabeled 'Recommended for you', hardcoded mainnet badge, dead error status, and inert Create bounty button#320
chonilius merged 3 commits into
MergeFi:mainfrom
boluwacodes:fix/recommended-label-hero-network-badge-error-status-create-bounty-link

Conversation

@boluwacodes

Copy link
Copy Markdown
Contributor

Summary

Four fixes across the contributor dashboard, homepage hero, and maintainer dashboard:

Mislabeled "Recommended for you" (#239) — the section was labeled as personalized, but available is simply every open bounty sliced to the first 4, in whatever order the backend/mock data returns them — no relevance scoring against the contributor's history, languages, or past claims. This page doesn't even fetch the languages/organizations data (already available on ReputationProfile) that real personalization would need. Renamed to the honest "Open bounties" rather than building relevance scoring this page has no data plumbing for yet.

Hardcoded "Built for Stellar Mainnet" (#238) — the hero badge was a literal, entirely independent of STELLAR_NETWORK, even though this app already has NetworkBadge.tsx specifically for surfacing that value accurately. A deployment configured with NEXT_PUBLIC_STELLAR_NETWORK=TESTNET (exactly the case where NetworkBadge's navbar indicator does show, to warn visitors) rendered a hero flatly contradicting that warning — a meaningfully misleading claim for a fundraising/escrow product. Now reads "Built for Stellar Mainnet" only when STELLAR_NETWORK === "PUBLIC", otherwise "Built for Stellar (Testnet)".

Dead error-status detection (#240)fetchBounties already catches every failure internally and resolves to its fallback argument instead of rejecting, so the try/catch around it that set statStatus = "error" was unreachable dead code — the maintainer dashboard had no way to distinguish live data from "backend down, showing 5 hardcoded mock bounties." Detected the fallback case by reference instead: fetchBounties returns the exact fallback array on failure, but always a freshly-mapped array (a new reference) on a real live fetch — this reliably distinguishes the two without changing fetchBounties' shared contract, which other pages depend on.

Inert "Create bounty" button (#241) — rendered as a bare <span> with button-styled classes but no onClick or href — visually identical to a real CTA, but did nothing when clicked. The contributor and sponsor dashboards' equivalent buttons are both wrapped in <Link href="/issues">; this was the only one of the three left unwired. Wrapped it the same way.

Changes

  • src/app/dashboard/contributor/page.tsx — section renamed.
  • src/app/page.tsx — hero badge now derived from STELLAR_NETWORK.
  • src/app/dashboard/maintainer/page.tsx — fallback-detection fix + Create bounty now links to /issues.

Test plan

  • npx tsc --noEmit — clean
  • npx eslint on all changed files — clean
  • npx jest (full suite) — 202/202 passing, no regressions

Closes #239
Closes #238
Closes #240
Closes #241

…nties"

The section was labeled "Recommended for you" but available is simply
bounties.filter((b) => b.status === "open"), sliced to the first 4 in
whatever order the backend/mock data returns them — no relevance
scoring against the signed-in contributor's history, languages, or
past claims. "Recommended for you" implies a personalization that
doesn't exist anywhere in this code path; this page doesn't even fetch
the languages/organizations data (already available on
ReputationProfile) that a real recommendation would need.

Renamed to the honest "Open bounties" rather than building relevance
scoring this page has no data plumbing for yet — matches the
suggested fix's first option (closes MergeFi#239).
The hero badge hardcoded "Built for Stellar Mainnet" as a literal,
entirely independent of STELLAR_NETWORK — the same value
NetworkBadge.tsx already exists specifically to surface accurately,
with its own doc comment explaining why showing the wrong network is
dangerous. A deployment configured with
NEXT_PUBLIC_STELLAR_NETWORK=TESTNET (exactly the case where
NetworkBadge's navbar indicator *does* show, to warn visitors) rendered
a homepage hero flatly contradicting that warning: "Built for Stellar
Mainnet" directly above marketing copy about low transaction costs and
fast settlement, while the navbar a few pixels above correctly flagged
that this build isn't on the real network at all — a meaningfully
misleading claim for a fundraising/escrow product, not just a copy nit.

Now reads "Built for Stellar Mainnet" only when STELLAR_NETWORK ===
"PUBLIC", otherwise the honest "Built for Stellar (Testnet)" (closes MergeFi#238).
…reate bounty

fetchBounties (lib/api.ts) already catches every failure internally and
resolves to the fallback argument instead of rejecting — it can never
throw, so the try/catch here that set statStatus = "error" on catch was
unreachable dead code. statStatus was "loaded" in literally every case,
including when the live fetch silently failed and fell back to
mockBounties, so the maintainer dashboard had no way to distinguish
live data from "backend down, showing 5 hardcoded mock bounties" —
contrary to what the surrounding comment claimed. Detected the fallback
case by reference instead: fetchBounties returns the exact fallback
array on failure, but always a freshly-mapped array (a new reference)
on a real live fetch, so this reliably distinguishes the two cases
without changing fetchBounties' shared contract, which other pages
depend on for its transparent-fallback behavior (closes MergeFi#240).

Also, the "Create bounty" action rendered as a bare <span> with
button-styled classes but no onClick or href — visually identical to a
real call-to-action, but clicking it did nothing. The contributor and
sponsor dashboards' equivalent action buttons are both wrapped in
<Link href="/issues">; this was the only one of the three left
unwired. Wrapped it the same way — bounties are created from GitHub
issues per this page's own subtitle, so /issues is the natural
destination (closes MergeFi#241).
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@boluwacodes is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@boluwacodes 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

@chonilius
chonilius merged commit e5d984c into MergeFi:main Aug 25, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment