Skip to content

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

Open
akv-iu wants to merge 5 commits into
developmentfrom
Akshay_fix_skills_overview_data_mismatch
Open

akv-iu wants to merge 5 commits into
developmentfrom
Akshay_fix_skills_overview_data_mismatch

Conversation

@akv-iu

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

Copy link
Copy Markdown
Contributor

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):

This Frontend PR is related to the OneCommunityGlobal/HGNRest#2370 Backend PR.

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 f57bbf4
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6ab7d4f80b82790007857856
😎 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

@akv-iu
akv-iu marked this pull request as ready for review August 22, 2026 23:26
@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 Aug 27, 2026

@DeepighaJ DeepighaJ 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.

  • Tested the PR locally, all works well functionally
  • Redirection to /hgnform when no skills found working as expected.
Image

Issue:

  • The radial scale numbers are not visible in /hgn/profile/skills radar chart but its available in skills-overview. Is this intended behavior?
Image Image Image Radar Char Value: Image Values of radar chart matches the Skills Overview page radar chart Image Filter by Skill and Preferences works well. Image

Logged in as User who has not completed the skill survey and skill overview page displays the message as intended.

Image Image

@linlin-husky linlin-husky 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.

Hi, aky-iu:

I have tested this PR locally on the branch Akshay_fix_skills_overview_data_mismatch with the backend running on development.

PR Review & Verification Summary


Verified Points:

  • Radar Chart Data Fetching & Consistency:
    • Navigating to /hgnhelp/skills-overview correctly fetches the skills survey data on mount via ENDPOINTS.SKILLS_PROFILE.

    • The "Your Skills Radar" section renders properly, and all skill values match what is displayed on /hgn/profile/skills. * Direct Route Refresh:

    • Hard refreshed /hgnhelp/skills-overview directly without visiting /hgn/profile/skills beforehand; the chart continues to load and display cleanly without relying on cached in-memory Redux state.

Image Image Screenshot 2026-08-29 at 1 09 55 PM
  • Empty State Handling:
    • Tested with an account that has not completed the survey; the inline message "Complete the skills survey to view your radar chart" displays properly without triggering unwanted redirects.
Image
  • Verified that the radar chart and overall UI render cleanly in Dark Mode.

Areas for improvement

  • Note on Skill Filtering (Pre-existing):
    • The skill filtering seems incomplete/inconsistent: selecting specific skill tags returns member cards where "Top Skills" do not include the selected filters.
Image
  • Note on Radar Chart Label Overlap (Pre-existing UI issue):
    • Observed that some skill labels at the top of the radar chart (e.g., Markdown & Graphs, Leadership Experience, Leadership Skills) overlap and are difficult to read due to the high density of dimensions.
Image

@iAbhi001
iAbhi001 self-requested a review August 29, 2026 22:11

@iAbhi001 iAbhi001 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.

Hi @akv-iu,

I have tested this PR locally on the branch Akshay_fix_skills_overview_data_mismatch with the backend running on development.

PR Review & Verification Summary

Verified Points:

  • Radar Chart Data Fetching & Consistency: Navigating to /hgnhelp/skills-overview correctly fetches the skills survey data on mount via ENDPOINTS.SKILLS_PROFILE. The "Your Skills Radar" section renders as expected, and the skill values match what is displayed on /hgn/profile/skills.
  • Direct Route Refresh: Hard refreshed /hgnhelp/skills-overview directly without visiting /hgn/profile/skills beforehand; the chart loads and renders reliably without depending on cached in-memory Redux state.
  • Empty State Handling: Tested with an account that has not completed the survey. The inline message "Complete the skills survey to view your radar chart" displays cleanly without triggering unwanted redirects away from the page.
  • Dark Mode: Verified that the radar chart, labels, and overall page layout render cleanly in Dark Mode.

Non-Blocking Observations / Pre-existing Issues:

  • Skill Filtering Consistency: Selecting specific skill tags sometimes returns member cards where the "Top Skills" list does not clearly reflect the active filter selection.
  • Radar Chart Label Overlap: Some category labels near the top of the radar chart (e.g., Markdown & Graphs, Leadership Experience, Leadership Skills) overlap slightly due to high dimension density.

Note: Both items above appear to be pre-existing and outside the scope of this bug fix, but are noted here for future tracking.

Overall, the core data fetching bug and empty-state behavior are resolved cleanly. Great work!

Image Image

@akv-iu

akv-iu commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@DeepighaJ thanks for testing this and catching that — good question.

That's pre-existing behavior, not something this PR changes. Both pages render the same shared RadarChart component, and radial tick-number visibility is controlled by its compact prop:

// RadarChart.jsx — default is compact=true, which hides the ticks
function RadarChart({ profileData, compact = true, onSkillsDataReady }) {
  ...
  ticks: {
    stepSize: 2,
    display: compact ? false : true,   // <-- this line
    color: darkMode ? '#dcdcdc' : '#666',
    ...
  }
// RightSection.jsx  (/hgn/profile/skills) — no compact override → defaults to true → ticks hidden
<RadarChart profileData={profileData} onSkillsDataReady={setSkillsData} />
// SkillsOverviewPage.jsx  (/hgnhelp/skills-overview) — already passed compact={false} before this PR
<RadarChart profileData={profileData} compact={false} />   // ticks shown

I diffed this PR against development to confirm: that compact={false} line is untouched by this change — it was already there before my fix, just unreachable because the old code was reading from the wrong Redux slice. So this is a pre-existing inconsistency between two call sites of a shared component, not a regression, and fixing it would mean touching /hgn/profile/skills, which is outside this PR's stated scope.


@linlin-husky @iAbhi001 — thanks for the thorough testing. Both of you already flagged your findings (skill-filter/"Top Skills" mismatch, radar label overlap) as pre-existing and non-blocking yourselves, and confirmed the actual data-fetch fix, refresh case, empty state, and dark mode all work. Given that, would you mind flipping your reviews to Approve so this can merge? I'm happy to open follow-up issues for the filter mismatch, label overlap, and the tick-visibility difference above so none of it gets lost — just don't want to fix them in this PR since none of them are in its scope.

DeepighaJ
DeepighaJ previously approved these changes Sep 20, 2026

@DeepighaJ DeepighaJ 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.

@akv-iu Thanks for the confirmation.

  • Tested the PR locally and verified the following:
  • Confirmed that the Your Skills Radar chart appears on /hgnhelp/skills-overview.
  • Verified that the radar chart values match those displayed on /hgn/profile/skills for users who completed the skills survey.
  • Confirmed that the chart renders correctly when /hgnhelp/skills-overview is refreshed directly.
  • Verified that users who have not completed the survey see the appropriate message and are not redirected.
  • Confirmed that the Find Community Members search, skill filters, and preference filters continue to work as expected.
Image Image Image Image Image Image

Both /hgn/profile/skills and /hgnhelp/skills-overview render the
shared RadarChart with 28 skill dimensions, so the wrap-around
labels at the top (Markdown & Graphs / Leadership Experience /
Leadership Skills) sit within a ~26deg arc and collide regardless
of chart size. Always use the abbreviated label instead of gating
it behind `compact`, add the two labels missing an abbreviation,
and enable Chart.js centerPointLabels to ease crowding at the seam.

Also stop gating radial scale tick-number visibility behind
`compact`: /hgn/profile/skills defaults compact=true and hid them
while skills-overview (compact=false) showed them, for no reason
tied to available space. Ticks are now always shown on both pages.
@sonarqubecloud

Copy link
Copy Markdown

@akv-iu

akv-iu commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

@DeepighaJ @linlin-husky @iAbhi001 thanks again for the thorough testing on this one.

Jae has brought the non-blocking items you flagged into scope for this PR, so rather than deferring them to follow-up issues, I've fixed them today. The work now spans a frontend PR (this one) and a new backend PR, and I'd really appreciate a re-review and review of both.

Frontend (this PR), all in the shared RadarChart.jsx:

  1. Radar label overlap: with 28 skill dimensions, the labels near the top (Markdown & Graphs / Leadership Experience / Leadership Skills) sat too close together and collided. The chart now always uses the abbreviated labels (previously only when compact was set). I also added abbreviations for the two labels that had none and turned on Chart.js centerPointLabels.
  2. Radial scale numbers hidden on /hgn/profile/skills (@DeepighaJ's question): the tick numbers only showed when compact was false, so they were hidden on the profile page and shown on skills-overview. They now show on both pages.

Backend: OneCommunityGlobal/HGNRest#2370
3. "Top Skills" not reflecting the active filter: topSkills took the top 4 scores from a guessed section instead of the skills that actually matched the filter, so a matched but lower-scoring skill (e.g. EnvironmentSetup) could be replaced by an unrelated one. Matched skills are now listed first, and any remaining slots are filled with the user's other top skills.

All three have tests, including a backend regression test that fails on the old code and passes with the fix. I also merged the latest development into this branch to pick up the Netlify build fix, so the deploy preview is working again: https://deploy-preview-5440--highestgoodnetwork-dev.netlify.app

To test: check out this branch together with HGNRest#2370, then follow the "How to test" steps in each PR. The skill filter check needs the backend branch running. Please check dark mode as well.

Thanks!

@AaditTrivedi AaditTrivedi 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.

Reviewed by Aadit Trivedi.

How I verified
Checked out the PR, ran the new RadarChart tests, and reviewed the change to SkillsOverviewPage.jsx. I could not confirm the fix on screen: none of my test accounts have completed the HGN skills survey, so both pages show the empty state for them. Backend #2370 was reviewed separately and approved.

Verified

  • Tests: npx vitest run .../RadarChart.test.jsx passes 3/3.
  • SkillsOverviewPage.jsx no longer reads state.userProfile?.skillInfo, which is never populated. It now fetches the survey from ENDPOINTS.SKILLS_PROFILE(userId) for the logged-in user, treats isPlaceholder as no survey, and shows a loading state while the request runs. This matches the root cause described.

Pointers, not blocking

  1. On a failed request, .catch(() => setProfileData(null)) falls through to "Complete the skills survey to view your radar chart," which is misleading for users who have completed it. Consider a separate error message.
  2. The description identifies state.userSkills as the correct slice, but the page fetches directly instead, decoding the user ID from the token in localStorage and calling httpService.setjwt(token), which sets the token globally from inside a page component. Using the existing userSkills action, or the logged-in user from the auth state, would be more consistent with the rest of the app.
  3. The new tests cover RadarChart, not the SkillsOverviewPage fix; a test for the loaded, placeholder, and error states would protect the main change.

Approving.

@Niket07pathak Niket07pathak 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.

Reviewed by Niket Pathak

How I verified

Checked out Akshay_fix_skills_overview_data_mismatch and tested /hgnhelp/skills-overview locally using the required frontend/backend setup. Tested the Skills Radar chart with both a user who had completed the HGN Skills Survey and a user who had not completed it. Compared radar chart values against /hgn/profile/skills, tested direct navigation and hard refresh behavior, inspected API requests in Chrome DevTools, and verified radar tooltips, community member search, skill filtering, and light and dark mode rendering.

Verified working

  • The Skills Radar chart renders correctly for users who have completed the HGN Skills Survey.
  • The radar chart values match those displayed on /hgn/profile/skills.
  • The radar chart remains visible after a hard refresh (Ctrl + Shift + R) without requiring the user to visit the Skills Profile page first.
  • Direct navigation to /hgnhelp/skills-overview correctly loads the radar chart.
  • For users who have not completed the skills survey, the message "Complete the skills survey" appears correctly.
  • Users without completed survey data are redirected to the skills survey form at /hgnform.
  • Radar chart tooltips display skill names and corresponding scores correctly.
  • Chrome DevTools confirms that SkillsOverviewPage.jsx initiates an API request when the page loads.
  • The Find Community Members search displays matching community members.
  • Skill filters update the displayed results correctly, including the Advanced MongoDB filter.
  • Community member cards display skill scores and top skills correctly.
  • The Skills Overview page renders correctly in both light and dark modes, with readable chart labels, tooltips, and other UI elements.

Issues found

No issues were observed during testing.

Evidence

Attached screenshots:

Image Image Image Image Image

Approved. The Skills Radar data mismatch appears resolved, and the tested functionality is working as expected.

@sai-velagala-swe sai-velagala-swe 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.

Reviewed by Sai Manojna Velagala
How I verified
Checked out Akshay_fix_skills_overview_data_mismatch and tested /hgnhelp/skills-overview locally with backend PR #2370 running. I tested the no-survey state, completed-survey radar rendering, comparison with /hgn/profile/skills, hard refresh behavior, member filters, tooltips, and dark mode.
Verified working

  • No-survey state works correctly.

    Before completing the survey, /hgnhelp/skills-overview stayed on the page and displayed the message Complete the skills survey to view your radar chart.

Image
  • Survey submission completed successfully.

I completed the HGN skills questionnaire successfully before testing the populated radar state.

  • Profile Skills radar renders after survey completion.
    /hgn/profile/skills displayed
Image

the completed skills radar with readable labels, scale values, and skill scores.

  • Skills Overview radar renders correctly.
    /hgnhelp/skills-overview displayed the radar after survey completion, including tooltips with skill name and score.
Image
  • Direct refresh behavior works.

The radar continued to load after refreshing /hgnhelp/skills-overview directly, without needing to visit the profile page first.

  • Skill and preference filter UI continues to work.
    The Find Community Members section displayed skill and preference filters and returned member cards when filters were applied.
Image
  • Dark mode renders correctly.
    The radar, labels, scale values, tooltip, filters, and member cards remained readable in dark mode.
Image Image

Observation
Some returned member cards do not display a member name, and some very low-score users appear in filtered results. These appear related to backend filtering/data handling in PR #2370 rather than the frontend data-loading fix.
Conclusion
The original Skills Overview data-loading issue is resolved. The radar now loads correctly for completed-survey users, the empty state works for users without survey data, and the page continues to function in dark mode.

@vidiyala99 vidiyala99 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.

Tested f57bbf4 as Administrator on /hgnhelp/skills-overview against HGNRest development and the dev data (read-only), in light and dark mode.

What works:

  • The radar now shows for a user who completed the survey. GET /api/skills/profile/:id for the Dev Admin account returns a real skillInfo (frontend, backend, general, ...), and the page draws "Your Skills Radar" with all 28 dimensions (screenshots 1 and 2), instead of "Complete the skills survey to view your radar chart." Fetching on mount and reading the user id from the token fixes the root cause in the description: the page no longer depends on having visited /hgn/profile/skills first.
  • Labels: with the short labels, the crowded pair at the top ("Markdown/Graphs" / "Documentation", "Leadership Exp" / "Leadership Skl") sits on separate lines and no longer overlaps; it's tight but readable at this size.
  • Shared component: /hgn/profile/skills still renders its radar with the RadarChart change.
  • Dark mode: the card, grid and labels are readable.

Suggestions, not blocking:

  1. A failed request shows the survey prompt. On any error, .catch(() => setProfileData(null)) falls through to "Complete the skills survey to view your radar chart.", which tells a user who did complete it to do it again. A separate "Couldn't load your skills" message for the error case would avoid that.
  2. Labels now always use shortLabel, so the compact prop no longer changes the labels; worth a note in the prop docs or removing that branch.
  3. The value labels ("10") are drawn on top of the point markers, so at full scores each point shows a blurred "10". Hiding point labels in this non-compact view (the tooltip already shows the value) would clean that up.

Approving.

Screenshot 1: Your Skills Radar for Dev Admin (dark)

Image

Screenshot 2: same, light mode

Image

@aaryashah22 aaryashah22 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.

Tested locally on f57bbf42 with HGNRest #2370 (3622734c) as the backend (Chrome, 10 Oct), after clearing site data: Administrator in light and dark mode, plus Volunteer.

Works

  • My Admin test account had no survey, so the survey was filled once with test values (step 4). /hgn/profile/skills then showed the radar (all 5s) with the scale numbers and the short labels.
  • /hgnhelp/skills-overview: "Your Skills Radar" shows the same values (all 5s, so not a skill-by-skill comparison) (picture 1), and it still shows after a hard reload (Cmd+Shift+R) of that page.
  • Volunteer: "Complete the skills survey to view your radar chart." and I stayed on the page, no redirect (picture 2).
  • Find Community Members: the search ("Tom" found Tom Test) and the skill and preference filters return results.
  • Dark mode: the radar, the filter buttons and the cards are readable (radar and filters in picture 3).

Not tested: Owner/Manager, dark mode on /hgn/profile/skills, the reload and the search, a before/after on development, the unit tests.

Approving - thanks!

Image Image Image

@DeepighaJ DeepighaJ 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.

  • Re-reviewed the PR locally and verified that the Skills Overview radar chart renders correctly, including on direct page refresh.
  • The radar values and radial scale numbers match the profile page, label overlaps are resolved, and the survey completion message displays correctly for users who have not completed the survey.
  • The skill and preference filters continue to work as expected, and the changes are working correctly in dark mode.
  • The previously reported issues have been resolved.
Image Image Image Image Image

This branch has not been deployed

No deployments
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.

10 participants