feat: add user contributions summary#9
Open
Jampaa wants to merge 1 commit into
Open
Conversation
tenkus47
approved these changes
May 14, 2026
Member
tenkus47
left a comment
There was a problem hiding this comment.
Looks good to me:
Dont use too much States, try using params for things like date and filters. so they dont get reset on page refresh
Collaborator
Author
|
Okay Cho Cho
…On Thu, May 14, 2026 at 12:14 PM Tenzin Kunsang ***@***.***> wrote:
***@***.**** approved this pull request.
Looks good to me:
Dont use too much States, try using params for things like date and
filters. so they dont get reset on page refresh
—
Reply to this email directly, view it on GitHub
<#9 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZI2NFY5MIYG5ACJCPWLNPD42VTOLAVCNFSM6AAAAACY5RCWASVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DEOBXHA3DGMRUHA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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.
User Contributions Feature – Summary
Implemented a new User Contributions page that displays group-level annotator and reviewer totals using:
GET /contributions/{group_id}/summary
The page shows:
Overall totals (all-time)
Filtered totals (within a selected date range)
in the format:
overall (filtered)
Example: 40 (17).
Key Logic
Default filter uses a rolling 30-day inclusive range.
end = today
start = end - 29 days
Both dates are inclusive, so the range always contains exactly 30 days.
Data Fetching
Overall and filtered summaries are fetched in parallel using Promise.all().
Results are cached with TanStack Query using groupId + date range as the cache key.
User Experience
Non-admin users automatically see their group’s contributions for the last 30 days.
Admins can view all groups and apply custom date filters per group.
Additional Updates
Added route: /admin/user-contributions
Added sidebar navigation item
Added English and Tibetan translations
non admin view

admin view (video demo)
neww.mov