Skip to content

Adithya hotfix popularity url fix#4644

Merged
one-community merged 1 commit intodevelopmentfrom
adithya_hotflix_popularity_url_fix
Jan 4, 2026
Merged

Adithya hotfix popularity url fix#4644
one-community merged 1 commit intodevelopmentfrom
adithya_hotflix_popularity_url_fix

Conversation

@adithya-6101
Copy link
Copy Markdown
Contributor

Description

Hotfix: Resolves a critical issue in the recently merged Enhanced Popularity Analytics dashboard (PR #4416) where hardcoded localhost URLs prevented the chart from fetching data in Development and Production environments.

This PR replaces the hardcoded fetch URLs in EnhancedPopularityTimelineChart.jsx with the dynamic ENDPOINTS utility to ensure the application correctly uses the environment-specific API URL (e.g., https://api-staging.highestgood.com). It also corrects a path formatting issue in src/utils/URL.js that was causing double /api/api/ segments in requests.

Screenshot 2025-11-17 181919

Related PRS


Main changes explained:

  • src/components/.../EnhancedPopularityTimelineChart.jsx: Removed hardcoded http://localhost:4500 strings. Implemented ENDPOINTS import to fetch data dynamically based on the environment configuration.
  • src/utils/URL.js: Fixed ENHANCED_POPULARITY, ENHANCED_POPULARITY_ROLES, and ENHANCED_POPULARITY_PAIRS URL strings to remove redundant /api segments, preventing 404 errors caused by "double API" paths.

How to test:

  1. Checkout the current branch.
  2. Run backend server (ensure you have the latest development backend code) and npm start on frontend.
  3. Clear site cache.
  4. Log in as admin.
  5. Navigate to http://localhost:5173/popularity-enhanced.
  6. Verify:
    • The chart loads data successfully without "Connection Refused" or "404" errors.
    • Change filters (Date Range/Roles) to ensure dynamic URLs are still constructing correctly.

Screenshots or videos of changes:

(UI remains identical to the original feature implementation; this is a logic fix only.)

Enhanced.Popularity.Timeline.mp4

Note:

Please mute the audio of this recording. Timer sounds have been recorded.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 28, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit d3c9019
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6950da2d95f70700089bac3a
😎 Deploy Preview https://deploy-preview-4644--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Dec 29, 2025
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Adithya,

I have reviewed your PR and thanks for updating the url.
Screenshot 2026-01-02 at 12 34 29 AM
Screenshot 2026-01-02 at 12 34 41 AM
Screenshot 2026-01-02 at 12 34 49 AM

Copy link
Copy Markdown

@rohanrastogi311 rohanrastogi311 left a comment

Choose a reason for hiding this comment

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

Hi Adithya,

Well done with this implementation. Good job.

PR 4644 Screenshot PR 4644 Screenshot 2

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit a11d4b2 into development Jan 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants