Northeastern-Electric-Racing / Northeastern-Electric-Racing/FinishLine

[Bug] - Error page shown when trying to view "all change requests" page

Open
#2,758 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:
image
image

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):
Screenshot 2024-08-22 at 12 03 37 PM

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.