Skip to content

feat: add community activity score badges and filters#2008

Open
shravanithouta108 wants to merge 47 commits into
S3DFX-CYBER:mainfrom
shravanithouta108:feature/community-activity-score-v2
Open

feat: add community activity score badges and filters#2008
shravanithouta108 wants to merge 47 commits into
S3DFX-CYBER:mainfrom
shravanithouta108:feature/community-activity-score-v2

Conversation

@shravanithouta108

@shravanithouta108 shravanithouta108 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

📝 Description

This PR re-submits the Community Activity Score feature (originally #1861, which closed
#138) with all issues flagged by the TENET Agent, cubic, and greptile reviews fixed:

  1. CRITICAL — safeHTML/rawHTML ReferenceError: Root cause was a duplicate
    let communityActivity declaration across index.html's inline script and
    src/js/app.js. Since both are loaded as classic (non-module) <script> tags
    sharing one global scope, the duplicate let triggered a SyntaxError that aborted
    parsing of app.js entirely — which is why safeHTML/rawHTML (defined inside
    app.js) were never available at runtime.
  2. CRITICAL — duplicate communityActivity load / race condition: Removed the
    redundant fetch + declaration from index.html. app.js's loadCommunityActivity()
    is now the single source of truth, mirrored onto window.communityActivity so
    index.html's badge/filter/sort code can read it safely without refetching or racing.
  3. HIGH — bare GitHub owner values hitting invalid API endpoints: Restored the
    repo.includes('/') check in compute-activity-scores.js, so org-only values like
    c2siorg, ML4SCI, UNICEFInnovation are skipped (with a console warning) instead of
    silently producing misleading fallback-based activity scores.

Branch has also been synced with upstream/main to resolve the merge conflicts that were
blocking the previous PR.

🔗 Related Issue

Closes #138

🚀 Program Classification

  • GSSoC26
  • NSoC26
  • General Contribution

🔄 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔍 SEO improvement
  • 🎨 Style / UI improvement
  • ♿ Accessibility improvement
  • 📝 Documentation
  • ⚙️ CI / configuration
  • 🧹 Refactor / cleanup

🧪 How to Test

  1. Open index.html in a browser (or run the dev server if configured)
  2. Confirm no ReferenceError: safeHTML is not defined (or similar) appears in the
    browser console
  3. Confirm no SyntaxError: Identifier 'communityActivity' has already been declared
    appears in the console
  4. Use the sort dropdown → Most Active and confirm orgs sort by activity score
  5. Use the Active Communities filter chip and confirm it filters correctly
  6. Open an org's detail modal and confirm the Community Activity panel (tier badge +
    score breakdown) renders
  7. Run node agent/scripts/compute-activity-scores.js (with a GITHUB_TOKEN set) and
    confirm bare-owner entries (e.g. c2siorg, ML4SCI) are skipped with a warning
    instead of producing a score

📸 Screenshots (if applicable)

See prior screenshots on #1861 showing tier badges, Most Active sort, Active
Communities filter, and the modal activity panel — UI is unchanged in this PR, only the
runtime bugs above were fixed.

✅ Checklist

  • My code follows the project's existing style
  • I have tested my changes in a browser
  • I have linked the related issue above
  • My PR title follows Conventional Commits format (e.g. feat: add scroll button)
  • I have not introduced any new dependencies or build tools

Review in cubic

Closes S3DFX-CYBER#138

Signed-off-by: shravanithouta108 <shravanithouta108@gmail.com>
Signed-off-by: shravanithouta108 <shravanithouta108@gmail.com>
Signed-off-by: shravanithouta108 <shravanithouta108@gmail.com>
Signed-off-by: shravanithouta108 <shravanithouta108@gmail.com>
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@shravanithouta108 is attempting to deploy a commit to the s3dfx-cyber's projects Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions

Copy link
Copy Markdown
Contributor

💬 Faster Reviews & Assignments

Hi @shravanithouta108, for faster coordination and smoother communication, consider joining our Discord community:

👉 https://discord.gg/MmZGG2ee

Useful Channels

  • #issue-links-for-assignment → Share issue links for assignment help
  • #pr-links-for-review → Share PR links for mentor/maintainer review

Please avoid spamming channels or repeatedly pinging mentors/maintainers.

@github-actions github-actions Bot added type:devops gssoc26 GirlScript Summer of Code 2026 dco-missing labels Jul 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for opening a PR, @shravanithouta108!

Your PR has entered the 🚦 PR Review Pipeline.

🟢 GSSOC PR detected — your PR will be routed through the GSSOC mentor review pipeline.

⚠️ Dual-label notice: Both GSSOC and NSOC signals were detected in your PR. GSSoC takes priority and your PR has been classified as a GSSoC PR only. If this is incorrect, please remove the unintended program keyword from your PR description and push a new commit.


🔄 Review Flow

Stage Reviewer Purpose
Stage 1 🤖 Automation Validation · Duplicate Detection · AI/Slop Checks · Formatting · PR Analysis
Stage 2 🧑‍🏫 GSSOC Mentor Code Review · Scope Validation · Quality Check
Stage 3 🔑 Project Admin / Maintainer Final Approval & Merge Decision

The automated PR analysis system will verify issue linkage, PR relevance, and contribution quality.

A pipeline status comment may appear automatically as your PR progresses.


✅ Contributor Checklist

  • Sign commits using git commit -s
  • Link a valid issue (Closes #123)
  • Keep changes focused and relevant
  • Do not include unrelated modifications
  • Ensure workflows/build/tests are passing
  • Read the appropriate contributor guide:

⚠️ Important Notes

  • Low-quality, spammy, or AI-generated PRs may be closed
  • PRs without linked issues may fail automated checks
  • Large unrelated PRs are likely to be rejected
  • Review times may vary depending on mentor/reviewer availability

Happy contributing 🚀

This message is posted automatically and only once.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

✅ DCO Sign-off Verified

Hi @shravanithouta108 👋

All commits in this PR contain valid Signed-off-by lines.

Thank you for following the DCO requirements 🚀

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Dual Program Label Detected

Hi @shravanithouta108,

Your PR description mentions both GSSOC and NSOC.

Detected Labels Resolution
gssoc, nsoc GSSoC priority applied — classified as a GSSoC PR

ℹ️ Only one program label may be active at a time. GSSoC takes priority when both are present.

If this is incorrect, please:

  1. Remove the unintended program keyword from your PR description
  2. Push a new commit or re-open the PR to re-trigger classification

📖 See our Contributing Guide for labeling details.

@github-actions

Copy link
Copy Markdown
Contributor

📏 Large PR Detected

This PR has 1300 lines changed (687+ / 613-).

Large PRs are harder to review and more likely to introduce issues. Consider splitting into smaller, focused PRs when possible.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Validation Issues

Hi @shravanithouta108, your PR requires fixes before review.

Warnings

  • ⚠️ PR touches many unrelated file types (6) and may be too broad.

Please push fixes after updating the PR.

@github-actions github-actions Bot added gssoc-review enhancement New feature or request good first issue Good for newcomers labels Jul 11, 2026
@github-project-automation github-project-automation Bot moved this to Todo in GSSOC 26 Jul 11, 2026
@github-actions github-actions Bot added level3 Hard and Complex issues for intermediate contributors (10 pts) level:advanced 55 pts needs-human-review suspected-ai-slop labels Jul 11, 2026
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ Suspicious Generated Code Detected

This PR contains patterns commonly associated with low-quality AI-generated submissions.

Detected Signals

  • Excessive comments in README.md
  • Generated-style separators detected
  • Large insertion in agent/scripts/compute-activity-scores.js (+159)
  • Excessive comments in agent/scripts/compute-activity-scores.js
  • Multiple helper functions added in agent/scripts/compute-activity-scores.js
  • Large insertion in data/community_activity.json (+1406)
  • Large insertion in index.html (+327)
  • Large insertion in src/js/app.js (+233)
  • Excessive comments in src/js/app.js
  • Multiple helper functions added in src/js/app.js
  • Excessive comments in src/styles.css

A maintainer or mentor should manually review this PR before merge.

This is not an automatic rejection.

@github-actions github-actions Bot added gssoc26 GirlScript Summer of Code 2026 and removed gssoc26 GirlScript Summer of Code 2026 labels Jul 11, 2026

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • The PR merge rate is computed from a creation-ordered 100-item cap instead of filtering to the 90-day window at compute-activity-scores.js:91, which biases high-traffic repositories to artificially high scores.
  • API calls for commits, issues, and PRs lack pagination at compute-activity-scores.js:71, so repositories with more than 100 items in the 90-day window are silently truncated, severely undercounting activity for the most active organizations.
  • The star signal at compute-activity-scores.js:103 uses cumulative total stars rather than the period delta, so dormant repositories with large historical star counts remain artificially high-ranked.
  • The getCommunityBadge function at src/js/app.js:3770 inserts d.score unescaped into a title attribute template literal later wrapped in rawHTML(), creating an XSS surface if community_activity.json ever contains a crafted value.
  • No before/after screenshots or screen recording are provided in the PR to confirm badge rendering, alignment in both light and dark themes, and mobile layout, despite issue #138 explicitly showing card mockups.
  • A duplicate assignment to globalThis.matchAllLanguages exists at app.js:3779 and should be removed.
  • Changes to privacy.html and src/js/landing.js are unrelated to issue #138 and should be reverted or submitted as a separate PR.

Address the statistical biases in activity scoring, add pagination to API calls, provide visual evidence, and revert the out-of-scope changes before resubmission.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • index.html:5632 has an unclosed arrow function in the event listener block that crashes the entire inline script at parse time.
  • If orgs.js loads after the inline script, the ORGS variable is undefined when filteredOrgs initializes, causing zero cards to render on load.
  • The Active Communities filter logic exists only in index.html's inline script while app.js defines its own applyFilters, violating CONTRIBUTING.md's synchronization requirement.
  • renderMentorFinder() was removed entirely, breaking an existing Mentor Finder feature that's outside the scope of issue #138.
  • The "Most Active" sort option was added to applySecondarySort() at app.js:836 but the sort control UI is missing from the diff.
  • Screenshots are required by CONTRIBUTING.md for UI changes. this PR adds badges to 180+ cards, a new modal section, and new filter/sort controls but provides no screenshots.

Fix the parse error at index.html:5632 first and verify the inline script loads, then post a screenshot of the new badges, modal, filter chip, and sort option working together.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • The script at compute-activity-scores.js:71–95 calls GitHub endpoints with per_page=100 and never follows Link headers, silently undercounting high-traffic repos (those with >100 commits in 90 days) and biasing results against the organizations this feature is meant to highlight.
  • The stars metric calculation at compute-activity-scores.js:103 uses total stargazers_count / 1000 instead of growth over the last 6 months as issue #138 specifies, so a 50k-star legacy repo scores the same as one gaining 1k stars monthly.
  • Commit history includes roughly 30 upstream-sync commits (MariaDB, OpenWISP, privacy navbar, landing page updates, mentor leaderboards) that belong in separate PRs, making the feature code nearly unreadable and preventing proper audit of the activity logic.
  • Index.html duplicates filter block IDs (chip-veteran, selectedLangsStrip, orgCount, categoryFilter) at lines 1344–1395 and again at 1399–1525, so getElementById() and querySelector() calls will unpredictably bind to the first occurrence and break filter behavior.
  • The fetchJSON function at compute-activity-scores.js:38–42 lacks a timeout and the workflow job has no timeout-minutes configured, so a hung GitHub API call stalls all scoring indefinitely and wastes CI minutes.
  • PR description references screenshots from PR #1861 instead of including before-and-after captures of the badge, modal panels, filter chips, and sort behavior, making it impossible for reviewers to verify the implementation matches the issue requirements.

Rebase out the upstream-sync commits and fix the pagination, stars metric, timeouts, DOM duplication, and screenshot gaps before resubmitting.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • index.html:1344-1395 introduces duplicate filter IDs (chip-veteran, selectedLangsStrip, orgCount, categoryFilter) that override the canonical desktop/mobile filter blocks, causing JavaScript to bind to wrong elements, and an unclosed <select> tag leaves malformed HTML.
  • compute-activity-scores.js fetches with per_page=100 but never follows Link headers, truncating high-traffic orgs (LLVM, NixOS, Python, Jenkins) at 100 items and causing their scores to be systematically undercounted.
  • compute-activity-scores.js:116 and the GitHub Actions workflow have no timeout bounds, so a single hung API call can stall the entire daily job indefinitely without alerting you.
  • app.js:502 injects the activity score into an HTML title attribute with no escaping, and the community modal (app.js:1567-1594) uses raw template literals for cd.score and tierMap[cd.tier] while the rest of the codebase uses safeHTML, creating an XSS vector if community_activity.json is compromised.
  • The README states tier thresholds as 75/50/25/0 but getTier() in compute-activity-scores.js:137-141 implements 80/60/40/0, and the commit message claims to fix this misalignment but doesn't.
  • The starsGrowth metric computes repoData.stargazers_count / 1000 (total historical stars), not the 6-month growth specified in issue #138, and the variable name misleads future maintainers about what it actually measures.

Fix the duplicate filter IDs, implement pagination, add timeouts, escape the XSS vectors, align README with code, and verify starsGrowth measures period growth before resubmitting.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Screenshots are required by CONTRIBUTING.md for UI changes to index.html, app.js, and styles.css. add them to the PR description.
  • This PR bundles multiple UI changes unrelated to the activity score feature: the mobile filter dropdown was removed entirely, the "Remove" button was deleted from renderWatchlist() at app.js:3868, the search and guide nav buttons were removed, nav breakpoints were changed from lg to md, and privacy.html was modified. Each of these should be in a separate focused PR.
  • The README documents tier thresholds as 75/50/25 but compute-activity-scores.js uses 80/60/40. update the README to match the actual code thresholds.
  • Deleting the "Remove" button from the watchlist panel is a behavior regression. users can no longer remove orgs from their watchlist without navigating away and the functionality needs to be restored.
  • The data-org-count attribute is hardcoded to "184" at index.html:1989 and index.html:2025 instead of being dynamic. it will become incorrect when the organization count changes.
  • Unrelated changes like privacy.html modifications and checkAPI() minification should not be in this PR. revert them.

Separate the activity score feature into its own PR without the mobile/nav refactoring, add screenshots, fix the README thresholds, restore the Remove button, and make the org count dynamic.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Duplicate filter markup in index.html around lines 1344-1395 introduces duplicate IDs (chip-veteran, selectedLangsStrip, orgCount, categoryFilter) that cause the "Active Communities" chip to bind to the wrong control in at least one viewport, breaking the filter.

  • README documents tier thresholds as Very Active 75-100, Active 50-74, Moderate 25-49, Low 0-24, but getTier() in compute-activity-scores.js:138 implements ≥80, ≥60, ≥40 instead, creating a documentation-code mismatch that misleads users trying to understand how orgs are scored.

  • starsGrowth at compute-activity-scores.js:180 computes cumulative total stars divided by 1000, not a 6-month growth delta as promised in the issue and README, causing old inactive repos with high star counts to receive perpetually high scores.

  • GitHub API calls in compute-activity-scores.js:148-169 use per_page=100 with no pagination follow-through, silently truncating data for repos with >100 commits/issues/PRs in the 90-day window and systematically underestimating scores for the most active orgs the feature is meant to surface.

  • mCommunity.innerHTML at app.js around line 1567 assigns a raw template literal with unescaped cd.score and tier values while every other dynamic value in the same modal uses safeHTML, violating the established escaping pattern.

  • No screenshots are included in this PR despite UI changes across index.html, styles.css, and app.js, and referencing closed PR #1861 for visual evidence is not a substitute since reviewers cannot access it.

  • fetchJSON() in compute-activity-scores.js:115-119 has no AbortController timeout and the workflow job has no timeout-minutes, allowing a single hung GitHub API request to stall the entire Actions run indefinitely.

Fix the duplicate filter IDs and threshold documentation, implement API pagination with proper escaping, correct the starsGrowth metric, and add screenshots before resubmitting.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • GitHub API calls lack pagination in compute-activity-scores.js line ~71, silently truncating results at 100 items and producing systematically low scores for high-traffic repositories.
  • PR merge rate calculation uses a partial, creation-ordered result set instead of filtering the stated 90-day window, causing scores to be incorrect for repositories with heavy activity.
  • Stars metric sums cumulative repository stars instead of measuring period-over-period growth, so an inactive repository with historical stars scores identically to one gaining active users.
  • No screenshot, GIF, or video demonstrates that the new community badges, filter chips, and sort dropdown function correctly on both desktop and mobile as required by acceptance criterion 9.
  • Unrelated changes appear in styles.css (removing 118 lines of premium-footer CSS) and privacy.html (altering Tailwind breakpoints) that have no stated connection to issue #138 and should be reverted or explicitly explained.
  • The PR body incorrectly claims all issues from prior reviews have been fixed when cubic's review on this PR identified 5 new unfixed issues, including an unescaped score XSS surface in the HTML.
  • The CONTRIBUTING.md requirement to run npm test and confirm index.html and app.js remain in sync was not satisfied before submission.

Fix the three data accuracy issues in compute-activity-scores.js, add visual evidence for the UI changes, explain the CSS modifications, and correct the PR body before resubmitting.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Screenshots are required for UI changes per CONTRIBUTING but this PR provides none; referencing a different closed PR #1861 does not meet the requirement.

  • compute-activity-scores.js:71 fetches with per_page=100 without handling GitHub API pagination, so events beyond the first 100 are silently dropped, systematically undercounting scores for high-traffic repos.

  • The star signal at compute-activity-scores.js:103 sums cumulative stargazer count instead of 90-day growth as specified in issue #138, causing stale high-star repos to score incorrectly.

  • Acceptance criteria state "orgs with multiple repos use the primary GSoC repo" but compute-activity-scores.js doesn't implement this; it processes whatever is in the github field without selection logic.

  • Org/repo pairs at compute-activity-scores.js:22-36 are extracted via regex assuming a fixed field order; parsing silently breaks if the order changes or an entry spans multiple lines.

  • The index.html duplicate filter section at lines 1344-1395 reuses IDs that exist in the canonical block (chip-veteran, selectedLangsStrip, orgCount, categoryFilter), creating invalid DOM that breaks event binding.

Attach screenshots, fix the data-collection bugs (pagination, star metric, multi-repo handling), resolve the fragile regex and duplicate DOM IDs, then resubmit.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • The "Active Communities" filter threshold doesn't match the feature spec: the issue requires 60+ score but your code filters on tier !== 'low' which is ≥40.
  • The stars metric is wrong: the issue specifies "growth in last 6 months" but compute-activity-scores.js:180 uses cumulative stargazers_count / 1000, which measures total stars instead.
  • index.html loads the inline script that calls getActivityBadge() before src/js/app.js is loaded, so window.communityActivity is undefined on first render.
  • Duplicate filter DOM IDs appear around index.html:1344–1395 (chip-veteran, selectedLangsStrip, orgCount, categoryFilter), which breaks HTML validity and causes JS to silently bind to the first copy.
  • GitHub API calls in compute-activity-scores.js:116–118 fetch per_page=100 with no pagination, so high-traffic repos like NixOS/nixpkgs get truncated scores and won't surface correctly.
  • README tier ranges don't match the code implementation: README defines Very Active 75–100 / Active 50–74 / Moderate 25–49 / Low 0–24, but getTier() uses ≥80 / ≥60 / ≥40 / <40.
  • Your PR description claims "all issues flagged by cubic and TENET are fixed" but cubic's latest review still flags the XSS at src/js/app.js:502 and missing pagination, and TENET flags the script loading order.

Fix the spec mismatches (threshold, signal), script loading order, duplicate IDs, and pagination before merge.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • index.html:1344–1395 contains duplicate filter markup with an unclosed <select> tag and duplicate element IDs, creating invalid DOM where the new "Active Communities" filter silently fails because event listeners bind to the first matching element.

  • No visual evidence is included in this PR; the description references a closed PR (#1861) for screenshots, leaving reviewers unable to assess the rendered badges, filter chips, and detail panel.

  • src/js/app.js:502 in getCommunityBadge() inserts cd.score unescaped into a title attribute while the rest of the file consistently uses safeHTML() for dynamic content, creating an inconsistency and potential XSS vector.

  • src/js/app.js:1567–1594 assigns mCommunity.innerHTML via raw template literal with unescaped cd.score and tier text, inconsistent with the mMetrics.innerHTML pattern two lines above which correctly uses safeHTML().

  • agent/scripts/compute-activity-scores.js:71–91 fetches GitHub API data with per_page=100 but never follows pagination, systematically undercounting activity in high-volume repos and directly undermining the score's ability to differentiate active projects.

  • agent/scripts/compute-activity-scores.js:38–42 has no timeout or AbortController on network requests, allowing a hung GitHub API call to stall the entire daily workflow indefinitely.

Fix the DOM duplication, add visual evidence to this PR instead of referencing a closed issue, and apply safeHTML() consistently across all dynamic content assignments before resubmitting.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • compute-activity-scores.js:180 implements starsGrowth as repoData.stargazers_count / 1000, which measures total stars, not growth over the last 6 months as described in issue #138 and the README.

  • The PR removes extensive functionality unrelated to issue #138: mobile filter dropdowns, bookmark remove buttons, hero search submit button, animations, mentor card hover effects, copy link buttons, and the entire renderMentorFinder and renderMentorContactSection functions.

  • CONTRIBUTING.md (line ~38) requires core frontend changes to be kept in sync between app.js and index.html with npm test validation, but renderMentorFinder and renderMentorContactSection were deleted from app.js while remaining declared as /*global*/ in the inline script, breaking this invariant.

  • README documentation lists tier thresholds as 75–100 / 50–74 / 25–49 / 0–24, but the actual code in compute-activity-scores.js:138–142 uses ≥80 / ≥60 / ≥40.

  • No screenshots or video evidence were provided to verify the visual changes to badges, filter chips, mobile navigation, and removed UI elements.

  • checkAPI function body in app.js was reformatted to remove whitespace, inconsistent with surrounding code style and unrelated to this feature.

Split the unrelated changes into separate PRs, fix the starsGrowth metric to compute actual growth data, update the documentation thresholds to match the code, and add screenshots of the badge and filter UI before resubmitting.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@deepak0x deepak0x left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • The PR adds tier badges, a filter chip, and a modal panel without providing screenshots or videos to demonstrate they work, which is required for UI feature review.
  • index.html:1344-1395 introduces duplicate DOM IDs including chip-veteran, selectedLangsStrip, orgCount, and categoryFilter, which causes the active-communities filter to bind to the wrong control.
  • The stars contribution formula uses total stargazers count (repoData.stargazers_count / 1000) instead of 6-month growth rate as specified in issue #138, which systematically undervalues mature repositories with stable but older stars.
  • Ideas freshness uses repoData.pushed_at (the repository's last commit) rather than the GSoC ideas page last-updated date from issue #138, so the signal measures repository churn rather than actual idea generation.
  • API calls in compute-activity-scores.js:148-151 fetch with per_page=100 but do not parse Link headers, which means any repository with over 100 commits or issues in the 90-day window gets silently undercounted.
  • The PR checklist claims "I have tested my changes in a browser" but provides no screenshots, videos, or console output to verify the badges, filter, and modal actually render and work.
  • The regex at compute-activity-scores.js:22-36 is fragile and will silently skip organizations if the field order changes or the object formatting shifts in org.js.

Add a screenshot to verify the UI, fix the duplicate DOM IDs, and address the API pagination scope and specification deviations from issue #138.

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

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

feat: Community Activity Score : Show How Active Each Org's Community Is