Repository navigation
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
AaditTrivedi
left a comment
There was a problem hiding this comment.
Reviewed by Aadit Trivedi.
Reviewed the diff alongside backend HGNRest #2352. I could not test the modal end to end, since #2352 is not merged and staging does not have the new /dashboard/questionaire/checkModal/:userId route.
Verified
- Re-enables
<FeedbackModal />, which was commented out and is the cause of the modal not showing. - Removes four leftover
console.logstatements. - Adds the
QUESTIONNAIRE_CHECK_MODALendpoint matching the route in #2352.
Pointer, not blocking
- This depends on #2352, where I requested changes to its error handling. On a failed request the frontend currently receives a 200 response without
showModal, so the modal silently won't appear; worth handling that case once the backend returns proper error codes.
Approving.
vidiyala99
left a comment
There was a problem hiding this comment.
Tested 6bee6fe with backend OneCommunityGlobal/HGNRest#2352 (732ebe5) as Administrator and Volunteer, in light and dark mode. The only write was one feedback submission from my own Volunteer test account.
The wiring works: with both branches, GET /dashboard/questionaire/checkModal/:userId returns showModal, and the Help Request Feedback modal renders on the Dashboard (screenshots 1 and 2, light and dark).
Issues:
-
The modal would show to almost every user, on every Dashboard load. The new check returns
showModal: trueunless the user has clicked "Found help another way. Close Permanently". It doesn't look at whether the person ever asked for help or when. I called the endpoint for 300 active users spread across the dev database: 298 gotshowModal: true. My Volunteer test account, which has never made a help request, sees "Were we able to help you last week?" on every visit:- Closing with × and reloading: the modal is back.
- Submitting ("Yes" plus a comment,
POST /dashboard/questionaire/feedbackrequestreturned 200) and reloading: the modal is back (screenshot 3).
So the only way to stop it is "Close Permanently", which also records that the person found help elsewhere, which isn't true for most users.
-
There's already a gated version of this check. HGNRest
developmenthasGET /api/helprequest/check-modal/:userId(helpRequestController.checkIfModalShouldShow). It returnsshouldShow: trueonly when the user has a help request at least 7 days old withfeedbackSubmitted: false, and not after a permanent close. The frontend already calls it fromsrc/components/HGNHelpSkillsDashboard/FeedbackModal.jsx(ENDPOINTS.HELP_REQUEST_CHECK_MODAL). Please reuse that rule (or that component) instead of adding a second check that ignores help requests. At minimum, the new check needs to require an open help request and respectdaterequestedFeedback, so a submitted feedback stops the modal. -
The frontend can't tell an error from "don't show". OneCommunityGlobal/HGNRest#2352 returns HTTP 200 for failures: an invalid id gives
200 {"message":"Internal server error"}, and an unknown id gives200 {"message":"User not found"}.FeedbackModal.jsxtreats any response withoutshowModal: trueas "don't show", so real failures are silent. (Details in my OneCommunityGlobal/HGNRest#2352 review.) -
No tests were added for the new endpoint or for the Dashboard rendering the modal.
The removed console.log calls and the new QUESTIONNAIRE_CHECK_MODAL entry look fine.
Screenshot 1: Volunteer dashboard, modal (light)
Screenshot 2: same, dark mode
Screenshot 3: modal back after Submit + reload
|
AaditTrivedi
left a comment
There was a problem hiding this comment.
Re-reviewed by Aadit Trivedi.
The new commit replaces .find() with .some() for invalidActive and invalidInactive in FeedbackModal.jsx. These are used as true/false checks, and .some() returns a boolean directly, while .find() returns the matching item or undefined, so this is the correct method. Everything from my earlier approval still holds.
Approving.
vidiyala99
left a comment
There was a problem hiding this comment.
Re-tested at 6e5f37c with OneCommunityGlobal/HGNRest#2352 (732ebe5, no new commits since my 10/09 review) as Administrator and Volunteer, in light and dark mode. Submits were intercepted in the browser, so nothing was written to the dev database.
What the 3 new commits change:
6e5f37c.find()to.some(): works. A made-up name ("Notarealperson Xyz") is blocked with "Please select valid members from the dropdown only." (screenshot 4). A name picked from the dropdown passes validation and the modal closes on Submit. (Small note:isValidMemberNamereturns true when the name is not a valid user, so the name reads backwards. Renaming it toisInvalidMemberNamewould help the next reader.)c0fa9f0"avoid masking real check-modal errors": theif/elsebecamesetIsOpen(Boolean(response.data?.showModal)). It's cleaner, but it behaves the same as before. Errors are still silent:- The backend still answers failures with HTTP 200:
checkModal/not-an-idgives200 {"message":"Internal server error"}, and an unknown id gives200 {"message":"User not found"}. Both read as "don't show". - When I forced the check request to fail, the modal just doesn't appear, and the only trace is
console.error('Error checking help request')(screenshot 5).
- The backend still answers failures with HTTP 200:
1485b96addsnetlify.toml(MISE_PYTHON_GITHUB_ATTESTATIONS = "false"). This is a repo-wide deploy setting unrelated to the modal. It's better as its own PR so maintainers can decide on it.
Still open (re-confirmed today):
- The modal ignores feedback that was already submitted. My Volunteer test account submitted feedback on 10/06. Its profile shows
questionaireFeedback.daterequestedFeedback: 2026-10-06, yetcheckModalstill returnsshowModal: true, and the modal opens on every Dashboard load (screenshots 2 and 3). Closing with × and reloading brings it back. When I tested on 10/05, 298 of 300 active users gotshowModal: true. - An existing, properly gated check isn't being used. For the same user,
GET /api/helprequest/check-modal/:userIdreturnsshouldShow: false, because it requires a help request at least 7 days old withfeedbackSubmitted: false. The new check only looks atfoundHelpSomeWhereClosePermanently. - Errors are indistinguishable from "don't show" (see above).
- No tests for the endpoint or the Dashboard render.
Administrator (devadmin) correctly sees no modal (screenshot 1), but only because that account clicked "Close Permanently" earlier.
Requesting changes. The main fix belongs in OneCommunityGlobal/HGNRest#2352: show the modal only when there's an open help request, and stop showing it after a submit. Happy to re-test both PRs once that lands.
Screenshot 1: Administrator dashboard, no modal (dark)
Screenshot 2: Volunteer, modal still shows after feedback was submitted on 10/06 (dark)
Screenshot 3: same, light mode
Screenshot 4: made-up member name blocked by the .some() check
Screenshot 5: check request fails, modal silently missing, no message to the user



Fix: HGN Feedback Modal not showing due to missing render and endpoint (DONE Jaden)- #5549
Problem
The HGN Feedback Modal (
src/components/FeedbackModal/FeedbackModal.jsx) never appeared for users, showing no data.Root cause
Two stacked bugs:
<FeedbackModal />was commented out inDashboard.jsx, so it was never rendered.ENDPOINTS.QUESTIONNAIRE_CHECK_MODAL, which did not exist. The resulting error was silently caught and the modal was forced closed.Fix
<FeedbackModal />inDashboard.jsxQUESTIONNAIRE_CHECK_MODALtoENDPOINTSinURL.js, pointing at the new backend route added in HGNRest #2352console.logcalls inhandleSubmitHow to test
npm install, run both apps.questionaireFeedbackset (or has it set withfoundHelpSomeWhereClosePermanently: false).foundHelpSomeWhereClosePermanentlyis alreadytruedoes not see the modal.Related
Backend companion PR: OneCommunityGlobal/HGNRest#2352
vod.mov