Skip to content

Fix static activity feed timestamps, mis-slugged trustedOrgs, orphaned SponsorSummary type, mutable claimant id - #315

Merged
chonilius merged 4 commits into
MergeFi:mainfrom
davidishere1:fix/live-activity-feed-trusted-orgs-sponsor-summary-claimant-id
Aug 25, 2026
Merged

chonilius merged 4 commits into
MergeFi:mainfrom
davidishere1:fix/live-activity-feed-trusted-orgs-sponsor-summary-claimant-id

Conversation

@davidishere1

Copy link
Copy Markdown
Contributor

Summary

Four small, targeted fixes across the mock-data layer and the Bounty/SponsorSummary types:

Static "live" activity feed (#201) — recentActivity hardcoded each event's age as a fixed minutesAgo number, never derived from Date.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. ActivityEvent now carries occurredAt (an ISO timestamp) instead, and ActivityList derives the "Nm/h/d ago" text from it via Date.now() at render time.

Mis-slugged trustedOrgs (#200) — trustedOrgs 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. 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.ts listed SponsorSummary alongside Bounty/Milestone/MaintenancePool/ReputationProfile, but unlike those four, it has no corresponding adapter — it's only ever instantiated as mockSponsorSummary for 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 in mock-data.ts so the shared domain-type list no longer implies parity with a live-data path that doesn't exist.

Mutable claimant identifier (#203) — Bounty.claimedBy modeled 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's claimedBy relation is keyed off a real user object, but adaptBounty only ever extracted .username. Added an optional id to RawUser and a corresponding claimedById on Bounty, 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 — trustedOrgs entries replaced.
  • src/lib/mock-data.ts / src/types/index.ts — SponsorSummary relocated.
  • src/lib/adapters.ts / .test.ts / src/types/index.ts — claimedById added.

Test plan

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

Closes #201
Closes #200
Closes #202
Closes #203

… 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).
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

@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! 🚀

Learn more about application limits

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