feat(frontend): referrals footer pending referral pill (GitLab #205) #388
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega!388
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/glab-205-referrals-footer-pending-pill"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #205.
What this changes
Adds a small footer pill on
/referralsthat shows the browser-locked pending referral code (yieldomega.ref.v1) so participants can confirm what will apply on the next qualifying buy.Implementation
Followed the spec's "thin component" sketch — pill lives in its own file and mounts into the existing
app-footer__rowslot, keepingRootLayout.tsxmostly untouched.New helper
shouldShowPendingPill(pathname, code)inreferralStorage.ts— pure predicate so the gate logic is unit-testable without React rendering orwindow.locationmocks. Returnstrueonly when:pathname === "/referrals"exactNew component
frontend/src/components/ReferralsFooterPendingPill.tsx:getPendingReferralCode()so the same cross-store sync logic the rest of the app uses applies hereuseLocationdep) — picks up new?ref=XYZcaptures on same-tab navigationstorageevents scoped to theyieldomega.ref.v1key for cross-tab updatesnullwhen off/referralsor when no pending code — per spec acceptance: omit rather than show empty muted statefooter-link-pillclass for consistency with the Governance pill next to itdata-testid="referrals-footer-pending-pill"+aria-label+titlefor accessibility and testsMount point in
RootLayout.tsx: between<IndexerStatusBar />and the Governance anchor insideapp-footer__row. Reuses the existingshowFooterexclusion for/timecurveso the pill never leaks to the Simple view.Manual verification
Tested locally against MegaETH mainnet config:
/referrals?ref=testcode→ pill renders "Pending ref: testcode" in footer/→ pill disappears/referrals(no?ref=) → pill still shows "testcode" (cached in localStorage from earlier capture)/referrals?ref=newcode→ pill updates to "newcode" without page reloadTests
New
referralStorageShouldShowPendingPill.test.tscovers the pure gate:/referralswith valid codes/,/timecurve,/timecurve/arena,/referrals/,/referrals/something)Suite delta: 325/325 → 329/329 across 60 files (+4 tests). Zero regressions.
Out of scope (per spec)
yieldomega.myrefcode.v1.*cache (post-register, different surface)referrals-surface.spec.tscan extend withdata-testidin a follow-up if needed/referrals(no ?ref=) — pill shows "testcode" cached/referrals?ref=newcode— pill updated to "newcode"mentioned in commit
316930c44b