Sayali - Fix: HGN Feedback Modal Service Worker Registration Failure#4835
Sayali - Fix: HGN Feedback Modal Service Worker Registration Failure#4835sayali-2308 wants to merge 3 commits intodevelopmentfrom
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Anusha-Gali
left a comment
There was a problem hiding this comment.
Hi Sayali,
I have reviewed your PR locally and find below my observations:
- The window state thing does not work in test case 1
- I was able to select the same person multiple times in test case 3
- Also the suggestion link "/suggestions" does not exist i.e throws page not found
- The comments does not have any limit.
- In test case 5, after selecting the close permanently button, i am still able to see the form. Please confirm if this is a valid scenario?
- The names in dropdown are not visible in dark mode
- The stars are also not visible in dark mode
- One main query - right now all users are visible in both members feedback question and inactive members feedback question. Would it be possible to differentiate users displayed in the dropdown based on the question.
|
Hi @sayali-2308 , I have reviewed your PR. Everything works fine except the things that I mentioned below,
|
|
Hi @Anusha-Gali, Thank you for the thorough review! I've addressed all the issues you identified: Fixes ImplementedIssue 2 - Duplicate Selection: Added validation to prevent adding the same person multiple times. A toast warning now appears when attempting to select a duplicate member. Issue 4 - Character Limit: Added 1000-character limit on the comments textarea with a live character counter showing "X/1000 characters". Issue 5 - Close Permanently Not Working: Fixed the backend Issue 8 - Active/Inactive Member Filtering: Implemented complete filtering logic:
Note: Currently all users in the test database have Out of Scope IssuesIssue 1 - Redux State: The Redux integration is working correctly ( Issue 3 - Suggestions Link: This link is not part of the original requirements (Issue #15). Can be addressed in a separate PR if needed. Issue 6 & 7 - Dark Mode Visibility: Dark mode support was not mentioned in the original requirements for this PR. TestingAll fixes have been tested end-to-end and are working correctly. The PR description has been updated with detailed test cases for each fix. Please re-review when you have a chance. Thank you! |
How many hours would you need to fix these additional out of scope issues? I'll add the hours and wait for them and then request re-review |
|
PR #4835 (HGN Feedback Modal) is now complete and ready for re-review! Please let me know if you need any clarifications or additional changes! |
|
























Description
Fixes #15 (PRIORITY URGENT) from HGN Phase I Bugs and Needed Functionalities doc - HGN Feedback Modal: Service Worker Registration Failure (Modal Not Displaying - Service Worker Error)
The Feedback Modal was showing only a placeholder component, preventing users from submitting feedback. This PR replaces the placeholder with a fully functional modal and creates a help request tracking system to auto-trigger the modal 1 week after help requests are made.
Related PRs
Backend changes are now in development branch - checkout
developmentfor testing.Main Changes
Original Implementation
FeedbackModal.jsxplaceholder with complete functional modal componentFeedbackModal.module.cssfor styling with dark mode supportauthUser.userid) to get logged-in user ID/api/helprequest/check-modal/:userId/api/feedback/submit/api/feedback/close-permanently/api/feedback/delete-close-permanently(test endpoint)/api/hgnform/ranked)alert()withtoast()from react-toastifyAdditional Fixes (Based on Code Review)
/suggestionspage. Note: Destination page returns 404 as page implementation is outside scope of Issue reducers refactor #15.closedPermanentlyflag. Modal correctly stays closed after user clicks "Found help another way. Close Permanently"getFilteredMembersfunction acceptsisActiveparameter/api/hgnform/rankedendpoint includesisActivefield from UserProfileisActive: trueisActive: falseHow to Test
Setup
Sayali_HGN_Feedback_Modal_Fixdevelopment(PR XiaoW_Hotfix of adding a temporary fix to the task check for displaying timeentry correctly #2045 merged)npm installin both reposnpm run start(port 4500)npm run start:local(port 5173)69779f8d889b15074b785a02(use Dev Admin or any user)Test Case 1: Modal Does NOT Appear (New Help Request)
Postman:
Browser:
http://localhost:5173/hgnhelp/feedbackExpected: Modal does NOT appear (request is brand new, not 1 week old yet)
Test Case 2: Modal SHOULD Appear (1-Week-Old Request)
Postman:
_idof the help request you just createdBrowser:
http://localhost:5173/hgnhelp/feedback(or refresh)** Expected:** Modal appears automatically with all form fields
Test Case 3: Submit Feedback Works
Expected:
Postman Verification:
Shows
feedbackSubmitted: truefor your help requestTest Case 4: Close Permanently Button
Expected:
To Reset for Further Testing:
Test Case 5: Duplicate Member Validation (Issue 2 Fix)
** Expected:**
Test Case 6: Character Limit (Issue 4 Fix)
Expected:
Test Case 7: Active/Inactive Filtering (Issue 8 Fix)
Postman Verification:
Expected: Each user object includes
"isActive": trueorfalseBrowser:
isActive: trueappear in dropdownisActive: falseappearNote: If all users have
isActive: true(common in test environments), the "Inactive Members" dropdown will show no results, which is correct behavior.Test Case 8: Dark Mode Support (Issues 6 & 7 Fix)
/hgnhelp/feedbackExpected:
Test Functionality in Dark Mode:
Screenshots
Modal Display
Autocomplete and Star Ratings
Success Toast
Close Permanently Toast
###Dark Mode

Note
updateRequestDate,getAllHelpRequests,delete-close-permanently) are included FOR TESTING ONLY to allow reviewers to test the 1-week trigger logic and reset states without waiting an actual week.69779f8d889b15074b785a02is provided for easy testing - any logged-in user can be used.