Repository navigation
Closed
Labels
GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Stellar WaveIssues in the Stellar wave programarchitectureArchitecture/design issuebugSomething isn't workingvery hardVery difficult task, expert-level effort required
Description
Problem
src/lib/api.ts#fetchWithFallback silently swallows every failure mode from the backend — a 500, a timeout, a malformed JSON body, a DNS failure, a CORS rejection — and substitutes mock data with zero signal to the user or to observability. On /issues, /milestones, and the three dashboard routes, this means a genuinely broken backend renders a pixel-perfect, fully interactive UI full of fabricated bounties, reward amounts, and escrow IDs. A sponsor could look at /dashboard/sponsor, see "budget remaining: $4,230" from mock-data.ts, and make a funding decision based on fiction, with no visual distinction between live and mock data anywhere in the render tree.
Why this is hard
This isn't a one-line fix. You need to:
- Design a way to propagate "this is mock data" as a typed signal through
fetchWithFallback,fetchBounties,fetchBounty,fetchMilestones,fetchMaintenancePools, andfetchReputationByUsernamewithout breaking the Server Component call sites that currently just want a plain array/object back. - Decide the right UX: a banner? Per-card badge? Different treatment for "backend down" (systemic) vs "record not found" (fell back to a single mocked bounty)? These are currently indistinguishable —
fetchBountyfalls back on both a 404 and a network error. - Do this without breaking the "always demoable" promise the README makes — the fallback must still render, just distinguishably.
- Add server-side logging/telemetry (there is none currently — no error reporting integration exists in this repo) so a real outage is discoverable, since these are Server Components and errors never reach the browser console.
- Handle the race where the backend is flaky (intermittent 500s) rather than fully down — avoid flapping banners across navigations.
Scope
- Introduce a
FetchResult<T> = { data: T; source: "live" | "mock" }(or equivalent) return shape, threading it through every fetcher insrc/lib/api.ts. - Update all Server Component call sites in
src/app/**to read the new shape. - Add a visible, dismissible "showing sample data" indicator on affected pages, styled to match the slate/emerald dark-mode design system.
- Add minimal server-side error logging (structured console.error is acceptable given no APM exists) distinguishing network failure, non-2xx, and parse failure.
- Write down (in the PR description) the decision on how
apiRequest(used for user-triggered actions) should behave differently fromfetchWithFallbackgiven it already throws instead of falling back — confirm no regression there.
Acceptance criteria
- With the backend stopped, every affected route visibly indicates mock data is in use.
- With the backend returning 500s, the same indicator appears, and a server log line identifies the failing path and status.
- With the backend healthy, no indicator appears and no behavior changes.
apiRequest-based flows (claim, fund, deposit) are unaffected.
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Stellar WaveIssues in the Stellar wave programarchitectureArchitecture/design issuebugSomething isn't workingvery hardVery difficult task, expert-level effort required
Activity
Ahbiz commentedon Aug 25, 2026
@Ahbiz has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ahbiz to this issue.
devgodfreytem commentedon Aug 25, 2026
@devgodfreytem has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @devgodfreytem to this issue.
drips-wave commentedon Aug 25, 2026
Congratulations, @devgodfreytem! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.
🧑💻 @devgodfreytem: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
feat: add FetchResult type, server-side error logging, and paralleliz…
grantfox-oss commentedon Aug 25, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!
@devgodfreytem's PR #335 was approved and merged by @chonilius.
🏆 @devgodfreytem: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (156 total points). Track your full progress on GrantFox.
👏 Great work, @devgodfreytem! Keep contributing to MergeFi.
drips-wave commentedon Aug 25, 2026
This issue has been completed by @devgodfreytem as part of the Stellar Wave Program's 8th Wave 🥳
😎 @devgodfreytem: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.