feat(home): add Top Active Repositories rotating panel on the landing page#1158
Open
plind-junior wants to merge 3 commits into
Open
feat(home): add Top Active Repositories rotating panel on the landing page#1158plind-junior wants to merge 3 commits into
plind-junior wants to merge 3 commits into
Conversation
Contributor
Author
|
I've updated the the term "coding agent" to "miner" in this PR |
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.
Summary
The homepage's hero column rotates between two panels every 5 seconds —
LiveProofPanel(latest PR activity) andTopMinersPanel(top contributors). This PR adds a third panel — Top Active Repositories — surfacing the 5 most active repositories by lines changed, powered by the/dash/repos/commitsendpoint that until now was unused in the UI.After this PR the same hero slot cycles
feed → miners → repos → feed, giving the page a third "live proof" lens onto the data without enlarging the page or competing with the existing surfaces.Why
/dash/repos/commitsis a swagger-documentedapi.gittensor.ioendpoint that wasn't wired in any UI hook. It returns one row per active repo withcommits,additions,deletions,linesChanged,weight, andinactiveAt. The data is dense and hard for visitors to derive client-side (it would need every PR via/prsaggregated). Surfacing the top movers gives newcomers an immediate sense of which repos drive the most code on the subnet.Sample top-5 by lines changed from the live endpoint at PR time:
autoppia/autoppia_webs_demo 165 commits +115k −7.7k 122,999 net entrius/gittensor-ui 764 commits +60k −31k 91,998 langgenius/dify 968 commits +29k −39k 69,225 we-promise/sure 521 commits +45k −2.2k 48,112 infiniflow/ragflow 533 commits +24k −3.5k 27,820 Changes
src/api/DashboardApi.tsRepoChangesmodel.useRepoCommits()hook →useApiQuery<RepoChanges[]>('useRepoCommits', '/repos/commits').src/pages/HomePage.tsxLandingTopRepoRowtype.buildTopActiveRepoRows(repos)helper: filters inactive repos, parses numeric strings, sorts bylinesChangeddesc, slices the top 5 (TOP_REPO_ROW_LIMIT).TopActiveReposPanelcomponent matching the visual treatment ofLiveProofPanel/TopMinersPanel:surface.subtlebackground,border.mediumborder, blur glow,slideInanimation).owner/repo+ commits count ++adds/−delsin green/red · right-aligned compact lines-changed total.TopMinersPanel)./repositories/details?repo=<full_name>with{ backLabel: 'Back to Home' }.activePaneltype from'feed' | 'miners'→'feed' | 'miners' | 'repos'.setIntervalnow cycles through the three panels via aPANEL_CYCLEarray.PANEL_CYCLE(now 3 dots instead of 2) — clicking jumps directly to that panel.Test plan
/). Wait through the rotation:feed → miners → repos → feed. The "Most active repositories" card displays with 5 rows./repositories/details?repo=<owner/repo>; back button reads "Back to Home".GET /dash/repos/commits(cached by React Query thereafter).display: { xs: 'none', sm: 'block' }) so commits + adds/dels stay readable.npm run type-checkandnpm run lintpass.Notes
LiveProofPanelcolor scheme but usesprimary.mainfor its background glow (vs.status.mergedfor the feed panel) to differentiate at a glance.inactiveAt != null) are filtered out of the ranking so the panel always shows currently-active repos.linesChanged(net activity). Could alternately rank bycommitscount if reviewers prefer; happy to swap.Out of scope
/repositories?sort=activeview linked from the panel — could be a follow-up.weight,inactiveAt) into the row layout — currently only used for filtering / sorting, not for display. Easy to add if maintainers want a "weight badge" next to each row.