Repository navigation
Tokens page: gift tokens count on every leaderboard - #301
Merged
Merged
Conversation
The hourly gift's description said it never counts toward a leaderboard, and the comment above it said gift tokens reach the all-time balance only. Neither has been true since langx/langx#1758: the gift is no longer a grant kind, so its tokens are credited to the weekly, monthly, yearly and all-time tables like any other reward. Both now say so, in the words token.langx.io uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What was false
The /tokens page told readers the hourly gift "never counts toward a leaderboard", and the comment on
tokenGiftinsrc/lib/data/token.tssaid gift tokens count toward the all-time balance only, never the weekly, monthly or yearly tables.That stopped being true when langx/langx#1758 merged on 8 Oct 2026. Gift tokens are credited to every period, the same as any other reward.
What changed
tokenGift.description, shown on /tokens, now reads: "Gift tokens count like any others: they go to your balance and to every leaderboard — weekly, monthly, yearly and all-time." That matches token.langx.io's wording.Nothing else changed. In line with the token messaging brief, the copy states the fact and does not present the gift as a way to climb a board.
Facts (langx/langx at
4c22db2fb)packages/shared/src/token.ts, thegiftkind: "It counts in every period like any other reward".TOKEN_GRANT_KINDSlists onlylegacyTokenConversion,welcomeBackandsignupBonus.giftis not one of them.apps/api/src/modules/tokens/ledger.ts:credited = isGrantKind(kind) ? ['all'] : Object.keys(keys), so anything that is not a grant kind lands in every period.apps/api/src/routes/leaderboard.test.ts: "credits every period — a gift is a reward, and the ranked tables show what was received".docs/decisions.md→ The leaderboard counts every reward (Count every reward on the week, month and year leaderboards langx#1758).Same fix elsewhere
docs/token-messaging-brief.md.Checks
npm ci, thennpm run check(0 errors, 0 warnings),npx vitest run(passed),npx vite build(the prerenderedtokens.htmlhas the new sentence and no longer has the old one). I also ran prettier and eslint on the changed file.🤖 Generated with Claude Code