Skip to content

Akshay fix Skills Overview data mismatch on HGN Questionnaire Dashboard - #5440

Draft
akv-iu wants to merge 2 commits into
developmentfrom
Akshay_fix_skills_overview_data_mismatch
Draft

Akshay fix Skills Overview data mismatch on HGN Questionnaire Dashboard#5440
akv-iu wants to merge 2 commits into
developmentfrom
Akshay_fix_skills_overview_data_mismatch

Conversation

@akv-iu

@akv-iu akv-iu commented Aug 13, 2026

Copy link
Copy Markdown

Original Task

image ---

Description

The Skills Overview page (/hgnhelp/skills-overview) never displays the logged-in user's HGN skills survey responses. The "Your Skills Radar" section always falls back to the empty-state message "Complete the skills survey to view your radar chart", even for users who have fully completed the survey. The same user's data renders correctly on /hgn/profile/skills, which makes the dashboard look inconsistent and untrustworthy.

Root cause is in src/components/HGNHelpSkillsDashboard/SkillsOverviewPage.jsx. The component reads the survey data from the wrong Redux slice, and nothing on this route ever requests it:

  1. It selects state.userProfile, which is the HGN account profile slice (userProfileByIdReducer). Survey data lives in a different slice, state.userSkills (userSkillsReducer). The key skillInfo is never written to userProfile anywhere in the codebase, so the guard userProfile?.skillInfo is always falsy and the page always renders the empty state.
  2. The endpoint that returns this data, ENDPOINTS.SKILLS_PROFILE (/skills/profile/:userId), is called from exactly one place in the app — UserSkillsProfile.jsx, which is the /hgn/profile/skills page. That is precisely why the data only ever appears there.

Because of point 2, simply pointing the selector at the correct slice is not a real fix: Redux state is in-memory, so it would only work if the user happened to visit /hgn/profile/skills first in the same session, and would break on refresh or direct navigation. This PR therefore has the Skills Overview page fetch its own data on mount, the same way the working page does.

Related PRS (if any):

No backend PR is required for this fix. The backend is unaffected — /skills/profile/:userId already returns correct data and is consumed unchanged.

For context only, the Skills Overview route being fixed here was introduced by frontend PR #3360 in this repository.

Main changes explained:

  • Update src/components/HGNHelpSkillsDashboard/SkillsOverviewPage.jsx to fetch the logged-in user's skills profile on mount via ENDPOINTS.SKILLS_PROFILE, and render the radar chart from that response instead of from a Redux slice that never holds it.

How to test:

  1. Check into current branch Akshay_fix_skills_overview_data_mismatch
  2. Run npm install to install dependencies, then run the app locally (npm run start:local for frontend, backend on port 4500)
  3. Clear site data/cache
  4. Log in as a user who has completed the HGN skills survey. (If not completed Go To ' /hgnform ' and fill the form, make sure your name and slack are exactly same and then complete the form)
  5. Go to /hgn/profile/skills and note the radar chart values
  6. Go to /hgnhelp/skills-overview and verify the "Your Skills Radar" section now renders the radar chart, and that the values match what you saw in step 5
  7. Refresh /hgnhelp/skills-overview directly (without visiting /hgn/profile/skills first) and verify the chart still renders — this is the case that was previously broken
  8. Log in as a user who has not completed the survey, go to /hgnhelp/skills-overview, and verify the "Complete the skills survey to view your radar chart" message still shows, and that you are not redirected away from the page
  9. Verify the "Find Community Members" search, skill filters and preference filters below the radar are unchanged and still return results
  10. Verify all of the above in dark mode

Screenshots or videos of changes:

image image

Note:

Scope is deliberately limited to a single file. No shared reducer, action, route, endpoint or styling is touched, and /hgn/profile/skills is not modified, so no other page changes behaviour.

One intentional difference from /hgn/profile/skills: that page redirects the user to /hgnform with a toast when no survey data exists. This PR does not copy that redirect. On Skills Overview a user without survey data simply sees the existing inline empty-state message, since redirecting away from the overview page would be a behaviour change beyond the scope of this bug.

@netlify

netlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 19ef09c
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a7d4d3bdbf8de0008ef8275
😎 Deploy Preview https://deploy-preview-5440--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

The radar chart on /hgnhelp/skills-overview read state.userProfile, which
holds the HGN account profile and never contains skillInfo. The survey data
lives in the userSkills slice and was only ever fetched by the
/hgn/profile/skills page, so the overview always fell back to the
'Complete the skills survey' empty state.

Fetch the profile from ENDPOINTS.SKILLS_PROFILE on mount instead, so the
page works on direct navigation and refresh. Users without survey data
(isPlaceholder) keep the existing inline message and are not redirected.
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant