Bosu- fix: display HGN forms with names and descriptions - #5463
Bosu- fix: display HGN forms with names and descriptions#5463BosuBose132 wants to merge 1 commit into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
iAbhi001
left a comment
There was a problem hiding this comment.
Code Review & Local Testing Passed 🚀
Thank you for the detailed PR description and instructions. I pulled both this branch and the Bosu-HGN-Questionnaire-Followup-Fixes-Backend branch to test locally.
Here is what I verified:
- Form Catalog View: Navigating to
/hgnformsuccessfully displays the new forms catalog instead of directly forcing the questionnaire flow. - Form Data Display: The built-in HGN Development Team Questionnaire card appears correctly. Generic forms retrieved from
/api/formrender theirformNameanddescriptionas expected. - Fallback Behavior: Forms missing descriptions properly render
"No description available."without crashing or throwing console errors. - Navigation & Existing Flow: Clicking the HGN Development Team Questionnaire routes properly to
/hgnform/page1. The 6-page flow, permissions, and progress saving remain intact. - UI & Edge Cases: The catalog handles direct page refreshes gracefully, wraps correctly at mobile breakpoints, and the styling looks good in both light and dark modes.
Build and unit tests passed locally on Apple Silicon (after resolving standard npm optional dependency quirks).
Approved and ready to merge!
linlin-husky
left a comment
There was a problem hiding this comment.
Hi, BosuBose132,
I tested the PR locally using the frontend branch Bosu-HGN-Questionnaire-Followup-Fixes with backend branch Bosu-HGN-Questionnaire-Followup-Fixes-Backend.
Verified points:
- Form Catalog: Logged in as Admin,
/api/formreturns200and displays the forms list (Mern Stack Developer,UI/UX Designer,StudentForms1) alongside theHGN Development Team Questionnaire. - Fallbacks: Forms without stored descriptions correctly display
"No description available.".
Area for improvement
- Questionnaire Flow Stuck in Infinite Loading (
/hgnform/page1):- Clicking the
HGN Development Team Questionnairecard navigates to/hgnform/page1, but the page gets stuck indefinitely on the spinner. Questions and Next / Back navigation buttons never render. - Console / Network Cause: The component makes a request to
GET /api/userProfile/basicInfo, which fails with a 400 Bad Request (userManagement.js:291). The unhandled rejection prevents the questionnaire form from rendering.
- Clicking the








Description
Fixes the HGN Questionnaire Dashboard follow-up issue where
/hgnformopened the existing questionnaire directly instead of displaying the available forms with their form names and descriptions.This PR updates
/hgnformto act as an HGN forms catalog. It displays the built-in HGN Development Team Questionnaire together with generic forms returned by the existing/api/formendpoint. Each generic form displays itsformNameanddescriptionwhen available, while forms without a stored description are handled safely.The existing six-page HGN questionnaire flow, permission behavior, survey-completion checks, and HGN Skills Dashboard access logic are preserved.
Fixes # PR #3775 follow-up fixes
Related PRS (if any):
Bosu-HGN-Questionnaire-Followup-Fixes-BackendMain changes explained:
HGNFormListPage.jsxfor displaying the available HGN forms on/hgnform.HGNFormListPage.module.cssfor responsive, light-mode, and dark-mode styling.routes.jsxso/hgnformdisplays the form catalog and/hgnform/page1opens the existing HGN Development Team Questionnaire.URL.jswith the existing generic forms API endpoint used by the catalog.FollowupQuestions.jsxnavigation so the existing questionnaire flow continues to use/hgnform/page1.formNameanddescription.No description available.when an existing generic form does not contain a description.How to test:
Bosu-HGN-Questionnaire-Followup-FixesBosu-HGN-Questionnaire-Followup-Fixes-Backendnpm installif dependencies need to be installed.npm run buildnpm startnpm run start:local/hgnform./api/formalso appear.No description available.without errors./hgnform/page1./hgnformand/hgnform/page1.Screenshots or videos of changes:
Note:
git diff --checkpassed.webpackdependency lint issue inconfig-overrides.js. That file and its related package files are not modified by this PR.