Skip to content

fix(frontend): improve Earn page readability#2264

Merged
im-adithya merged 2 commits into
masterfrom
fix/earn-page-readability
Apr 28, 2026
Merged

fix(frontend): improve Earn page readability#2264
im-adithya merged 2 commits into
masterfrom
fix/earn-page-readability

Conversation

@reneaaron
Copy link
Copy Markdown
Member

@reneaaron reneaaron commented Apr 24, 2026

Summary

  • Replace text-primary on body-text links (unreadable yellow on white in the Alby theme) with theme-safe underline styling
  • Bolder reward amounts and trophy/heart icons for non-sat rewards

Test plan

  • Open Earn page in Alby theme — links are readable
  • Toggle between themes (default, Alby, bitcoin, etc.) — links remain readable
  • Click each platform link — opens in new tab / external browser as expected

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added reward icons to earn opportunities (trophy for Alby Referral Program, heart for Alby)
    • Redesigned reward display with improved formatting
  • UI/Style

    • Improved opportunity list layout with enhanced spacing and visual separators
    • Refined platform text and link styling for better clarity

Use theme-safe link styling instead of text-primary (unreadable yellow
on white in the Alby theme), bolder reward amounts, and trophy/heart
icons for non-sat rewards.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@im-adithya has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 24 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eaf3511b-3e6b-49da-bdee-53ca7a263d98

📥 Commits

Reviewing files that changed from the base of the PR and between 892dec4 and 0691473.

📒 Files selected for processing (1)
  • frontend/src/screens/alby/AlbyEarn.tsx
📝 Walkthrough

Walkthrough

Updated the AlbyEarn component with a new rewardIcon field on EarnOpportunity and introduced a dedicated Reward component to render rewards conditionally. Modified the opportunity row layout from border-based separators to divide-y styling and refined platform text and link presentation.

Changes

Cohort / File(s) Summary
AlbyEarn Component
frontend/src/screens/alby/AlbyEarn.tsx
Added rewardIcon field to opportunities ("trophy" for Alby Referral, "heart" for Alby), introduced new internal Reward component with conditional logic for numeric vs. text-based rewards, transitioned layout from border separators to divide-y spacing, improved platform text flex wrapping and link styling, and replaced inline reward rendering with the new <Reward> component.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • im-adithya

Poem

🐰 A trophy gleams and hearts now shine,
Where opportunities align!
Rewards are split—numeric or text,
With icons placed just right, what's next?
Layout flows with divide-y grace,
A polished, tidy earning space.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes in the pull request, which focus on improving the readability of the Alby Earn page through styling updates, icon additions, and layout improvements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/earn-page-readability

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
frontend/src/screens/alby/AlbyEarn.tsx (1)

83-104: Mark decorative icons as aria-hidden for cleaner SR output.

HeartIcon/TrophyIcon here are purely decorative — the adjacent rewardText already conveys meaning. lucide-react doesn't set aria-hidden by default, so screen readers may announce them as generic images/SVGs. Same applies to the bullet and ExternalLinkIcon in the platforms list.

♻️ Suggested tweak
-        <Icon className="size-4" />
+        <Icon className="size-4" aria-hidden="true" />
-                            {index > 0 && <span className="mr-2">•</span>}
+                            {index > 0 && (
+                              <span className="mr-2" aria-hidden="true">•</span>
+                            )}
...
-                              <ExternalLinkIcon className="size-3 ml-1" />
+                              <ExternalLinkIcon className="size-3 ml-1" aria-hidden="true" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/screens/alby/AlbyEarn.tsx` around lines 83 - 104, The HeartIcon
and TrophyIcon used in the Reward component (function Reward) are decorative and
should be hidden from assistive tech; update their usage to include
aria-hidden="true" (and focusable={false} if applicable for the SVG component)
so screen readers don't announce them, and similarly mark the bullet character
(•) and any ExternalLinkIcon in the platforms list as aria-hidden to avoid
redundant announcements; search for Reward, HeartIcon, TrophyIcon and
ExternalLinkIcon to locate all occurrences and add the aria-hidden/focusable
attributes where these decorative icons/characters are rendered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/src/screens/alby/AlbyEarn.tsx`:
- Around line 83-104: The HeartIcon and TrophyIcon used in the Reward component
(function Reward) are decorative and should be hidden from assistive tech;
update their usage to include aria-hidden="true" (and focusable={false} if
applicable for the SVG component) so screen readers don't announce them, and
similarly mark the bullet character (•) and any ExternalLinkIcon in the
platforms list as aria-hidden to avoid redundant announcements; search for
Reward, HeartIcon, TrophyIcon and ExternalLinkIcon to locate all occurrences and
add the aria-hidden/focusable attributes where these decorative icons/characters
are rendered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d1a6adf3-e733-4b70-90e8-97f852005fb5

📥 Commits

Reviewing files that changed from the base of the PR and between 3b1dae2 and 892dec4.

📒 Files selected for processing (1)
  • frontend/src/screens/alby/AlbyEarn.tsx

Copy link
Copy Markdown
Member

@im-adithya im-adithya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK, looks great now 🙌

@im-adithya im-adithya merged commit 51ec695 into master Apr 28, 2026
12 checks passed
@im-adithya im-adithya deleted the fix/earn-page-readability branch April 28, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants