Skip to content

Fix issues #514, #516, #517, #518 - #608

Closed
rohitkumarnaidu wants to merge 6 commits into
PRODHOSH:mainfrom
rohitkumarnaidu:fix/ossfolio-issues
Closed

Fix issues #514, #516, #517, #518#608
rohitkumarnaidu wants to merge 6 commits into
PRODHOSH:mainfrom
rohitkumarnaidu:fix/ossfolio-issues

Conversation

@rohitkumarnaidu

@rohitkumarnaidu rohitkumarnaidu commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #514, #516, #517, #518.

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability and consistency when loading GitHub profiles, repositories, organization details, activity, and comparison data.
    • Corrected contributor and organization leaderboard links, names, avatars, statistics, and score-change indicators.
    • Improved handling of pinned repositories and profile badges to prevent invalid or incomplete data from being displayed.
  • Refactor
    • Standardized GitHub data requests across profile pages, synchronization, digests, and organization views.
    • Removed an unused element from exported activity heatmap graphics.

- PRODHOSH#514: Fix prefer-const lint warning in profile-export.ts
- PRODHOSH#516: Replace any types with strict interfaces in [username]/page.tsx
- PRODHOSH#517: Replace any casts with explicit checks in explore/page.tsx
- PRODHOSH#518: Extract hardcoded GitHub API URL into GITHUB_API_URL constant
Copilot AI review requested due to automatic review settings July 25, 2026 21:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to OSSfolio, @rohitkumarnaidu! 🎉

Thank you for opening this pull request and contributing to the open-source community! 🚀

To ensure a smooth review process, please make sure you have:

  • Checked that your changes work locally and compile cleanly.
  • Followed the guidelines outlined in CONTRIBUTING.md.
  • Linked your PR to an open issue (e.g. Closes #ISSUE_NUMBER).

We will review your PR as soon as possible. Happy coding! 💻✨

@github-actions github-actions Bot added frontend Related to UI / Next.js backend API / Database / Server labels Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Too many files!

This PR contains 172 files, which is 72 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ea9a17aa-663d-4725-8a1a-cc79a54e6c7b

📥 Commits

Reviewing files that changed from the base of the PR and between 40591dc and dd6e5c9.

📒 Files selected for processing (172)
  • .all-contributorsrc
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/documentation.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/ISSUE_TEMPLATE/good_first_issue.md
  • .github/labeler.yml
  • .github/labels.yml
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/e2e.yml
  • .github/workflows/prettier.yml
  • .github/workflows/seed-actions-issues.yml
  • .github/workflows/stale.yml
  • .prettierrc
  • ARCHITECTURE.md
  • CODE_OF_CONDUCT.md
  • e2e/critical-paths.spec.ts
  • e2e/error-handling.spec.ts
  • e2e/mock-supabase.mjs
  • eslint.config.mjs
  • lint-staged.config.mjs
  • next.config.ts
  • open-next.config.ts
  • playwright-output.txt
  • playwright.config.ts
  • postcss.config.mjs
  • public/sw.js
  • src/app/[username]/error.tsx
  • src/app/[username]/loading.tsx
  • src/app/[username]/not-found.tsx
  • src/app/[username]/opengraph-image.tsx
  • src/app/[username]/page.tsx
  • src/app/[username]/rss.xml/route.ts
  • src/app/[username]/twitter-image.tsx
  • src/app/api/[...not_found]/route.ts
  • src/app/api/[username]/contributions/route.ts
  • src/app/api/[username]/digest/feed/route.ts
  • src/app/api/[username]/digest/route.ts
  • src/app/api/[username]/refresh/route.ts
  • src/app/api/analytics/[username]/route.ts
  • src/app/api/auth/[...nextauth]/route.ts
  • src/app/api/badge/[username]/route.ts
  • src/app/api/discover/route.ts
  • src/app/api/export/[username]/route.ts
  • src/app/api/org/[organization]/claim/route.ts
  • src/app/api/org/[organization]/refresh/route.ts
  • src/app/api/profile/sync/route.ts
  • src/app/api/settings/route.ts
  • src/app/api/sponsors/[username]/route.ts
  • src/app/api/v1/users/[username]/route.ts
  • src/app/api/webhooks/github/route.ts
  • src/app/auth/callback/page.tsx
  • src/app/compare/error.tsx
  • src/app/compare/page.tsx
  • src/app/digest/[username]/page.tsx
  • src/app/discover/content.tsx
  • src/app/discover/loading.tsx
  • src/app/discover/page.tsx
  • src/app/embed/[username]/page.tsx
  • src/app/embed/docs/page.tsx
  • src/app/error.tsx
  • src/app/explore/error.tsx
  • src/app/explore/loading.tsx
  • src/app/explore/page.tsx
  • src/app/layout.tsx
  • src/app/not-found.tsx
  • src/app/offline/page.tsx
  • src/app/org/[organization]/page.tsx
  • src/app/page.tsx
  • src/app/privacy/page.tsx
  • src/app/robots.ts
  • src/app/score-explained/page.tsx
  • src/app/settings/client.tsx
  • src/app/settings/page.tsx
  • src/app/sitemap.ts
  • src/app/terms/page.tsx
  • src/components/EmptyMergedPRs.tsx
  • src/components/auth/AuthModal.tsx
  • src/components/digest/ContributionDigest.tsx
  • src/components/discover/DiscoverPagination.tsx
  • src/components/discover/ProfileCard.tsx
  • src/components/discover/SearchAccessibilityAnnouncer.tsx
  • src/components/discover/SearchFilters.tsx
  • src/components/home/CTABanner.tsx
  • src/components/home/Features.tsx
  • src/components/home/Hero.tsx
  • src/components/home/HowItWorks.tsx
  • src/components/home/Testimonials.tsx
  • src/components/layout/LanguageSwitcher.tsx
  • src/components/layout/Navbar.tsx
  • src/components/layout/SkipToContent.tsx
  • src/components/layout/TemporaryUnavailableFallback.tsx
  • src/components/profile/AchievementsGrid.tsx
  • src/components/profile/CompareCharts.tsx
  • src/components/profile/CompareForm.tsx
  • src/components/profile/CompareLoading.tsx
  • src/components/profile/ContributionHeatmap.tsx
  • src/components/profile/ContributionTimeline.tsx
  • src/components/profile/EmbedModal.tsx
  • src/components/profile/ExportMenu.tsx
  • src/components/profile/HeatmapWithYearNav.tsx
  • src/components/profile/ImpactNetwork.tsx
  • src/components/profile/ImpactNetworkSkeleton.tsx
  • src/components/profile/LatestMergedPRs.tsx
  • src/components/profile/OrgDashboard.tsx
  • src/components/profile/OrganizationSection.tsx
  • src/components/profile/ProfileActions.tsx
  • src/components/profile/ProfileAnalyticsModal.tsx
  • src/components/profile/ProfileBadgeModal.tsx
  • src/components/profile/ProfileReposSection.tsx
  • src/components/profile/ProfileSyncing.tsx
  • src/components/profile/ProfileView.tsx
  • src/components/profile/ScoreCalculator.tsx
  • src/components/profile/ScoreSimulator.tsx
  • src/components/profile/SponsorshipSection.tsx
  • src/components/ui/EnvValidationBanner.tsx
  • src/components/ui/PwaInitializer.tsx
  • src/components/ui/badge.tsx
  • src/components/ui/card.tsx
  • src/components/ui/error-boundary.tsx
  • src/components/ui/json-ld.tsx
  • src/components/ui/skeleton-card.tsx
  • src/context/ThemeContext.tsx
  • src/hooks/useBroadcastChannel.ts
  • src/hooks/useDebounce.ts
  • src/hooks/useKeyboardShortcuts.ts
  • src/hooks/useMounted.ts
  • src/hooks/usePrefersDark.ts
  • src/hooks/useVisibility.ts
  • src/i18n/config.ts
  • src/i18n/locale.ts
  • src/i18n/request.ts
  • src/lib/__tests__/analytics-tracker.test.ts
  • src/lib/__tests__/digest.test.ts
  • src/lib/__tests__/impact-network.test.ts
  • src/lib/__tests__/org-data.test.ts
  • src/lib/__tests__/profile-export.test.ts
  • src/lib/__tests__/sponsors.test.ts
  • src/lib/achievements.ts
  • src/lib/analytics-tracker.ts
  • src/lib/anomaly.ts
  • src/lib/db.ts
  • src/lib/digest.ts
  • src/lib/env.ts
  • src/lib/errors.ts
  • src/lib/fetch-with-timeout.ts
  • src/lib/github.ts
  • src/lib/impact-network.ts
  • src/lib/languages.ts
  • src/lib/mock.ts
  • src/lib/org-data.ts
  • src/lib/profile-data.ts
  • src/lib/profile-export.ts
  • src/lib/profile-snapshot.ts
  • src/lib/pwa.ts
  • src/lib/rate-limit.ts
  • src/lib/redis.ts
  • src/lib/refresh-profile.ts
  • src/lib/sanitizer.ts
  • src/lib/score.ts
  • src/lib/sectionEyebrowStyle.ts
  • src/lib/sponsors.ts
  • src/lib/supabase.ts
  • src/lib/utils.test.ts
  • src/lib/utils.ts
  • src/lib/validators/api.ts
  • src/middleware.ts
  • src/types/index.ts
  • supabase/functions/refresh-profile/index.ts
  • supabase/functions/scheduled-refresh/index.ts
  • vitest.config.ts
  • vitest.setup.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
📝 Walkthrough

Walkthrough

The changes centralize GitHub API URL construction across REST and GraphQL integrations, tighten profile and badge typing, improve organization/contributor leaderboard row handling, and remove an unused heatmap variable.

Changes

GitHub endpoint centralization

Layer / File(s) Summary
Shared GitHub endpoint contract
src/lib/github.ts
Exports GITHUB_API_URL and derives the GraphQL endpoint from it.
REST request migration
src/app/[username]/opengraph-image.tsx, src/app/api/profile/sync/route.ts, src/app/compare/page.tsx, src/lib/{digest,org-data,profile-data}.ts
GitHub REST requests use the shared API base while preserving existing request behavior.
Profile data typing and normalization
src/app/[username]/page.tsx
Pinned repositories, profile rows, and badges use explicit shapes, generated ids, and numeric badge-year normalization.
Leaderboard row rendering
src/app/explore/page.tsx
Organization and contributor rows provide typed links, statistics, avatars, and score-delta rendering.
Heatmap SVG cleanup
src/lib/profile-export.ts
Removes an unused local variable from heatmap generation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: completed, beginner

Suggested reviewers: copilot, aditya8369

Poem

A bunny hops where API paths align,
One shared GitHub URL, neat and fine.
Typed badges bloom, pinned repos gleam,
Leaderboard rows follow a clearer dream.
The heatmap sheds one unused thread—
“Hop, hop!” says the rabbit, “ship it ahead!”

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes several unrelated refactors and GitHub API URL/type-safety changes beyond the linked lint fix. Split the type-safety and GITHUB_API_URL refactors into separate PRs, or link the additional issues they are meant to resolve.
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is short and correctly indicates that the PR fixes issue-related problems.
Linked Issues check ✅ Passed The changes address the linked CI/lint failure by fixing the prefer-const warning in profile-export.ts.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added documentation Additions to docs UI Visual / design changes labels Jul 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/app/`[username]/page.tsx:
- Around line 187-188: Replace the random ID generation in the pinned repository
mapping within ProfileView with the repository’s stable GraphQL ID. Select that
ID in the GraphQL query, include it in the mapped node type and output shape,
and keep the same field shape aligned with the API/settings contract and
persisted pinned_repos data.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4820597f-9c0a-4bd9-82e8-59f0b1fafe85

📥 Commits

Reviewing files that changed from the base of the PR and between 6ea7590 and 40591dc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • src/app/[username]/opengraph-image.tsx
  • src/app/[username]/page.tsx
  • src/app/api/profile/sync/route.ts
  • src/app/compare/page.tsx
  • src/app/explore/page.tsx
  • src/lib/digest.ts
  • src/lib/github.ts
  • src/lib/org-data.ts
  • src/lib/profile-data.ts
  • src/lib/profile-export.ts
💤 Files with no reviewable changes (1)
  • src/lib/profile-export.ts

Comment thread src/app/[username]/page.tsx Outdated
- Update mock-supabase.mjs to return PGRST116 code for 406 empty responses
- Add catch-all /api route for 404 JSON responses
- Fix strict mode and hidden element locator violations in critical-paths.spec.ts
- Refactor pinned items ID to use databaseId from GraphQL (CodeRabbit feedback)
@PRODHOSH

Copy link
Copy Markdown
Owner

@rohitkumarnaidu what is this?

u changed 172 files?
and that consists of u changing " " to ' '

@PRODHOSH PRODHOSH closed this Jul 26, 2026
@PRODHOSH PRODHOSH added spam and removed documentation Additions to docs frontend Related to UI / Next.js backend API / Database / Server UI Visual / design changes labels Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] CI Build & Lint failing on main branch

3 participants