Repository navigation
Fix static activity feed timestamps, mis-slugged trustedOrgs, orphaned SponsorSummary type, mutable claimant id - #315
Merged
chonilius merged 4 commits intoAug 25, 2026
Conversation
… list types/index.ts declared five core domain types — Bounty, Milestone, MaintenancePool, ReputationProfile, and SponsorSummary — but adapters.ts exports exactly four adapter functions, one per type except SponsorSummary. SponsorSummary is only ever instantiated once, as mockSponsorSummary, used purely for the signed-out demo title on the sponsor dashboard; the live-data path on that same page defines its own separate SponsorDashboardData interface instead. So SponsorSummary was scaffolding for a data path that doesn't exist yet, inconsistent with every other type in the file having a real adapter turning backend JSON into that shape. Moved the interface (renamed MockSponsorSummary) to live next to its only usage in mock-data.ts instead of types/index.ts, so the shared domain-type list no longer implies parity that doesn't exist. It can move back once mergefi-backend exposes a matching endpoint and an adaptSponsorSummary is written (closes MergeFi#202).
…repo names
trustedOrgs (rendered on the homepage under "Trusted by open-source
teams on Stellar") mixed genuine org names with repo names dressed up
as orgs: "core-indexer" matches the repo field of a mockBounties entry
whose actual org is "stellar-labs", and "wallet-kit" doesn't match any
real slug used elsewhere (the actual repo is "stellar-wallet-kit").
mockBounties consistently models org and repo as distinct fields, so
this was the same concept modeled two different, contradictory ways
within the same file.
Replaced both with genuine Stellar-ecosystem org names ("obsrvr",
"lightsail-network"), consistent with the org/repo distinction the rest
of mock-data.ts and the real Bounty type use (closes MergeFi#200).
… static literal recentActivity hardcoded each event's age as a fixed minutesAgo number, never computed from Date.now() minus an actual event timestamp. The homepage renders this feed under "Live on the platform" with a pulsing Activity icon implying real-time freshness, but every visitor saw the identical "devrel_ana was paid ... 6m ago" event forever, regardless of how long the site had been deployed — a feed that visually promises freshness rendering static, non-advancing ages. ActivityEvent now carries occurredAt (an ISO timestamp) instead of a static minutesAgo; the mock data anchors each event N minutes before whenever the module is evaluated, and ActivityList derives the "Nm/h/d ago" text from occurredAt via Date.now() at render time, so the feed's relative time actually advances instead of being frozen at deploy time (closes MergeFi#201).
Bounty.claimedBy modeled the claimer purely as a GitHub username
string. Every place this app links from a bounty to the claimer's
profile builds the URL directly from a raw handle (see Navbar.tsx's
/reputation/${user.username} and DashboardShell.tsx's hardcoded
/reputation/priyaeth pattern), and GitHub usernames are mutable — a
contributor can rename their account at any time. mergefi-backend's
claimedBy relation is keyed off a real user object (RawUser), but
adaptBounty only ever extracted .username, discarding any stable
identifier a profile link could anchor to instead.
Added an optional id to RawUser and a corresponding claimedById on
Bounty, mapped from raw.claimedBy?.id alongside the existing claimedBy
display username. Purely additive — no existing render call site
changes — so this lays the groundwork for profile links to prefer the
stable id once they're wired to use it, without discarding the display
text callers already rely on (closes MergeFi#203).
|
@davidishere1 is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@davidishere1 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four small, targeted fixes across the mock-data layer and the
Bounty/SponsorSummarytypes:Static "live" activity feed (#201) —
recentActivityhardcoded each event's age as a fixedminutesAgonumber, never derived fromDate.now()minus a real timestamp. The homepage renders this feed under "Live on the platform" with a pulsing icon implying real-time freshness, but every visitor saw the identical event ages forever, no matter how long the site had been deployed.ActivityEventnow carriesoccurredAt(an ISO timestamp) instead, andActivityListderives the "Nm/h/d ago" text from it viaDate.now()at render time.Mis-slugged trustedOrgs (#200) —
trustedOrgsmixed genuine org names with repo names dressed up as orgs:"core-indexer"matches the repo field of amockBountiesentry whose actual org is"stellar-labs", and"wallet-kit"doesn't match any real slug used elsewhere. Replaced both with genuine Stellar-ecosystem org names ("obsrvr","lightsail-network"), consistent with the org/repo distinction the rest of the file uses.Orphaned SponsorSummary type (#202) —
types/index.tslistedSponsorSummaryalongsideBounty/Milestone/MaintenancePool/ReputationProfile, but unlike those four, it has no corresponding adapter — it's only ever instantiated asmockSponsorSummaryfor the sponsor dashboard's signed-out demo title, while the live-data path on that same page uses its own separate ad hoc interface. Moved the type to live next to its only usage inmock-data.tsso the shared domain-type list no longer implies parity with a live-data path that doesn't exist.Mutable claimant identifier (#203) —
Bounty.claimedBymodeled the claimer purely as a GitHub username, which is mutable — a contributor renaming their handle silently breaks any profile link built from historical bounty data.mergefi-backend'sclaimedByrelation is keyed off a real user object, butadaptBountyonly ever extracted.username. Added an optionalidtoRawUserand a correspondingclaimedByIdonBounty, mapped alongside the existing display username — purely additive, no existing render call site changes.Changes
src/lib/mock-data.ts/src/components/dashboard/ActivityList.tsx/.test.tsx—occurredAt-based relative time.src/lib/mock-data.ts—trustedOrgsentries replaced.src/lib/mock-data.ts/src/types/index.ts—SponsorSummaryrelocated.src/lib/adapters.ts/.test.ts/src/types/index.ts—claimedByIdadded.Test plan
npx tsc --noEmit— cleannpx eslinton all changed files — cleannpx jest(full suite) — 169/169 passing, no regressionsCloses #201
Closes #200
Closes #202
Closes #203