Skip to content

solve the statistics count of active project and contributors#596

Open
SWADHIN300 wants to merge 1 commit intoAOSSIE-Org:mainfrom
SWADHIN300:bug/statistics
Open

solve the statistics count of active project and contributors#596
SWADHIN300 wants to merge 1 commit intoAOSSIE-Org:mainfrom
SWADHIN300:bug/statistics

Conversation

@SWADHIN300
Copy link

@SWADHIN300 SWADHIN300 commented Feb 24, 2026

Addressed Issues:
Centralize and synchronize organization stats
Fixes #575

previous -
Screenshot 2026-02-25 041247

After chnage-
Screenshot 2026-02-25 040752
align with
Screenshot 2026-02-25 041154

Checklist

  • [ x] My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • [ x] My code follows the project's code style and conventions
  • [ x] My changes generate no new warnings or errors
  • [x ] I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • [x ] I have read the Contribution Guidelines
  • [x ] Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.

AI Usage Disclosure

Check one of the checkboxes below:

  • [ x] This PR does not contain AI-generated code at all.

Summary by CodeRabbit

  • Refactor
    • Organization metrics (active projects, contributors, community count) are now sourced from a centralized configuration file and dynamically displayed across home and about pages.

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

📝 Walkthrough

Walkthrough

This change centralizes organization statistics by introducing a new configuration file (src/config/orgStats.ts) containing shared metrics and updates two pages (home and about) to consume these values instead of hardcoded numbers, ensuring consistent values across the site.

Changes

Cohort / File(s) Summary
Configuration Creation
src/config/orgStats.ts
New file exporting a static orgStats object with three numeric properties: activeProjects, totalContributors, and communityCount.
Page Updates
src/pages/about.jsx, src/pages/index.jsx
Both pages now import orgStats and replace hardcoded stat values with references to the configuration object, with Community Count aligning to 3800 across both pages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A config file hops into place,
Statistics no longer scattered with haste,
One source of truth, oh what a grace,
Numbers align—no more messy case!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main objective of centralizing organization statistics, clearly summarizing the primary change in the changeset.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #575: creates orgStats config with the three required metrics, updates home page and about page to consume it, and ensures consistent values across pages.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the objectives from issue #575; no unrelated modifications are present in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/config/orgStats.ts (1)

1-5: Consider freezing orgStats to prevent accidental mutation.

This keeps the shared config as a true source of truth and avoids runtime edits from other modules.

♻️ Proposed change
-export const orgStats = {
-  activeProjects: 34,
-  totalContributors: 500,
-  communityCount: 3800,
-};
+export const orgStats = Object.freeze({
+  activeProjects: 34,
+  totalContributors: 500,
+  communityCount: 3800,
+} as const);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/config/orgStats.ts` around lines 1 - 5, The orgStats exported object is
mutable; freeze it to prevent accidental runtime changes by wrapping or
replacing the export with a frozen object (use Object.freeze(orgStats) or export
const orgStats = Object.freeze({...}) ), and if you expect nested mutable values
add a simple deepFreeze helper and apply it to orgStats; update references to
the orgStats symbol accordingly so consumers get an immutable config.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/config/orgStats.ts`:
- Around line 1-5: The orgStats exported object is mutable; freeze it to prevent
accidental runtime changes by wrapping or replacing the export with a frozen
object (use Object.freeze(orgStats) or export const orgStats =
Object.freeze({...}) ), and if you expect nested mutable values add a simple
deepFreeze helper and apply it to orgStats; update references to the orgStats
symbol accordingly so consumers get an immutable config.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f344f8 and 15038e8.

📒 Files selected for processing (3)
  • src/config/orgStats.ts
  • src/pages/about.jsx
  • src/pages/index.jsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PROPOSAL] Centralize and synchronize organization stats

1 participant