Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#402 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@Rohit270406 がすでに取り組んでいます。

2026年10月23日 から。

  • #406 @Rohit270406 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, react

調査の方向性

src/pages/OverviewPage.jsx で、Language Distribution のパーセンテージを表示するために langMap、上位7件のリスト、langTotal がどのように使われているかを調べてください。まずそのコンポーネントを読み、リポジトリのデータ構造を確認してください。issue には f5_language_pct.mjs に決定論的な再現手順が含まれています。表示されるパーセンテージの分母に組織全体のリポジトリ数が使われ、報告された例と一致すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
JavaScript
スター
45
フォーク
148
平均マージ
5日 20時間
マージ済み PR(30日)
27

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AOSSIE-Org/OrgExplorer のほかの issue

AOSSIE-Org/OrgExplorer の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。