[BUG]: Overview "Language Distribution" percentages are relative to the top-7 languages, not all repos

Open Beginner friendly
#402 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Rohit270406 is already working on this.

Since Oct 23, 2026.

  • #406 by @Rohit270406 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react

Research direction

In src/pages/OverviewPage.jsx, inspect how langMap, the top-seven list, and langTotal are used to render Language Distribution percentages. Start by reading that component and checking its repo data shape; the issue includes a deterministic reproduction in f5_language_pct.mjs. Done means the displayed percentages use the organization-wide repo count as their denominator and match the reported example.

Written by the indexing model from the issue text.

Description

bug
Bug Description

On the Overview page, the Language Distribution bar/legend shows each language's percentage,
but the denominator is the sum of only the top-7 languages — not the total repo count — so
every percentage is overstated.

src/pages/OverviewPage.jsx:

const langs = Object.entries(langMap).sort((a,b)=>b[1]-a[1]).slice(0, 7)   // top 7 only
const langTotal = langs.reduce((s,[,c])=>s+c, 0)                           // sum of top-7 ONLY
...
{Math.round(count / langTotal * 100)}%

Languages ranked 8th and beyond, and repos with no detected language, are excluded from
langTotal, so the shown percentages sum to 100% but represent share among the top 7, not
share of the organization.

Live example (AOSSIE-Org, 87 repos, 15 distinct languages + 14 repos with no language):
language UI shows true share (of 87)
JavaScript 30% 22%
TypeScript 24% 17%
Dart 17% 13%
Python 11% 8%
The top-7 denominator is 63, but it should be 87.

Steps to Reproduce
  1. Explore an org with more than 7 languages (e.g. AOSSIE-Org).
  2. Open Overview → Language Distribution.
  3. The percentages sum to 100% and overstate each language (JavaScript shows 30% vs a true 22%).

Deterministic check (replicates OverviewPage.jsx:59-62 on live data):
node f5_language_pct.mjs

Logs and Screenshots — drag in f5_evidence.png
=== F5 Overview Language Distribution — AOSSIE-Org ===
total repos : 87
distinct languages : 15 (repos with NO language: 14)
UI denominator (top-7 sum): 63 <-- should be 87 (all repos)

language UI shows true share
JavaScript 30% 22%
TypeScript 24% 17%
Dart 17% 13%
Python 11% 8%

Logs and Screenshots

=== F5 Overview Language Distribution — AOSSIE-Org ===
total repos : 87
distinct languages : 15 (repos with NO language: 14)
UI denominator (top-7 sum): 63 <-- should be 87 (all repos)

language UI shows true share
JavaScript 30% 22%
TypeScript 24% 17%
Dart 17% 13%
Python 11% 8%

Image
Environment Details
  • OS: macOS - Browser: Chrome - Repo: main @ d91d2b8
  • File: src/pages/OverviewPage.jsx (lines 59-62 and ~249)
  • Suggested fix: compute percentages against the total repo count (or the sum of ALL language
    counts incl. a "no language" bucket), not the top-7 sum — or label the chart as
    "share among top languages" so it isn't read as org-wide share.
Impact

Low - Minor inconvenience

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Dominant language
JavaScript
Stars
53
Forks
187
Avg merge
18m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/OrgExplorer

All issues in AOSSIE-Org/OrgExplorer

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.