Skip to content

feat(rewards): surface achievement token rewards and fix rewards page display#4424

Open
YellowSnnowmann wants to merge 3 commits into
tinyhumansai:mainfrom
YellowSnnowmann:feat/achievement-token-rewards-ui
Open

feat(rewards): surface achievement token rewards and fix rewards page display#4424
YellowSnnowmann wants to merge 3 commits into
tinyhumansai:mainfrom
YellowSnnowmann:feat/achievement-token-rewards-ui

Conversation

@YellowSnnowmann

Copy link
Copy Markdown
Contributor

Summary

Rewards page: fix achievement display issues and surface the per-achievement token
reward now granted by the backend.

Changes

Display fixes:

  • Render one progress badge per achievement (was hard-capped at 8, silently hiding
    3 of the 11 achievements).
  • Split the single stats block into two cards — Discord status vs. product activity —
    so Discord and platform metrics are no longer conflated.
  • Clarify the streak: "Activity streak", "{n} days" unit, an explanatory hint, and a
    Longest streak row.
  • Surface the backend per-achievement progress label ("3 / 7 active days", etc.),
    which was computed but never rendered.
  • "Roles assigned" now counts assignable achievements (unlocked + role-configured)
    instead of all unlocked, so the ratio can't misreport (e.g. "3 of 4" for a role
    that can never be granted).

Token rewards:

  • Show the reward per achievement as a pill (+500K tokens, +5M tokens/mo for
    subscriber tiers), with compact formatting.
  • Add rewardTokens / rewardRecurring to the RewardsAchievement type + API
    normalizer.

i18n:

  • New keys added to en.ts and all 13 locale files (parity kept); brand key allowlisted
    in the English-drift check.

Testing

  • Vitest rewards suite green (component, page, api, slice). typecheck / eslint /
    prettier / i18n parity clean.

Notes

  • Backend counterpart: token rewards credited as USD promo (tinyhumansai/backend).
  • Could be split into two PRs (display fixes vs. token-reward surfacing) if preferred —
    they share the same files.

…hievement badge rendering, and separate Discord status from activity metrics. Update translations for new features and improve test coverage for progress badges and role assignments.
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd6e4eec-ec25-4442-bc53-1b0721d60100

📥 Commits

Reviewing files that changed from the base of the PR and between 6e17240 and 1f45f4b.

📒 Files selected for processing (24)
  • app/src/components/rewards/RewardsCommunityTab.tsx
  • app/src/components/rewards/__tests__/RewardsCommunityTab.test.tsx
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/pages/__tests__/Rewards.test.tsx
  • app/src/services/api/__tests__/rewardsApi.test.ts
  • app/src/services/api/rewardsApi.ts
  • app/src/store/__tests__/rewardsSlice.test.ts
  • app/src/types/rewards.ts
  • app/test/e2e/specs/rewards-progression-persistence.spec.ts
  • app/test/playwright/specs/rewards-progression-persistence.spec.ts
  • scripts/i18n-find-english.ts

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

@YellowSnnowmann YellowSnnowmann marked this pull request as ready for review July 2, 2026 14:43
@YellowSnnowmann YellowSnnowmann requested a review from a team July 2, 2026 14:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a221bdaec9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread app/src/lib/i18n/en.ts
The streak metrics row was renamed 'Current streak' -> 'Activity streak' and its
value now renders '{n} days'. Update the Playwright + WDIO progression specs to
locate the row by the new label and assert '14 days' (chatgpt-codex-connector).
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.

1 participant