Northeastern-Electric-Racing / Northeastern-Electric-Racing/FinishLine
[Bug] - Error page shown when trying to view "all change requests" page
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 9
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 11
Description
Observed Behavior
When trying to view the "all change requests" page, the following error page was given with an error in the console:
After clearing cookies, this error didn't show up anymore. The reason that this error occurred may have been because the user who reported this error hadn't visited that page in a couple weeks, and there might have been a new update which failed to migrate cookies?
Expected Behavior
The user should have been directed to the "all change requests" page (screenshot below):
Steps to Fix
As seen on the console screenshot, the error is coming from the persistent filters (const filterValues) in ChangeRequestsTable.tsx
Fix that error by ensuring that the JSON.parse() doesn't return undefined
Additionally, add a button on the error page that prompts the user to reset their cookies, to prevent confusion over similar errors in the future.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ChangeRequestsTable.tsx at the persistent filterValues handling and reproduce the error on the all change requests page with existing cookies. Check that JSON.parse() cannot produce an undefined filter state, then verify the page loads and that the error page provides a button prompting users to reset their cookies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100