ScottyLabs / cmucourses

CMU Courses
https://cmucourses.com
7 stars 26 forks source link

[Critical Bug] When searching for a second time, the results are from first search #165

Open w3ichen opened 1 day ago

w3ichen commented 1 day ago

Expected Behavior

When clicking enter to search again, the page should refresh with the results for the new search

Steps to Reproduce

  1. Search for one class, and hit enter
  2. Search for another click and hit enter
  3. Results are still from first search

Device Information

Desktop/Mobile: Desktop OS: macOS Monterey 12.3.1 Browser Version: Safari 15.4

Xavilien commented 1 day ago

Could you provide a screen recording

w3ichen commented 1 day ago

Actually, never mind I can't seem to reproduce it anymore. The other day I had to refresh the page for it to show the new results. Maybe I was being too impatient for it to load. Anyways, closing the issue - thanks1

w3ichen commented 19 hours ago

I take that back, the issue definitely does exist, but hard to reproduce. My guess is the bug occurs either if you have the tab open for a while and go to work on other tabs or maybe multiple tabs open.

In the video, you can see it shows the old results even when i hit enter on the search bar! I think you might be storing cookies on the browser and it's picking up on the old saved search query?

https://github.com/user-attachments/assets/a05110c6-0125-4e2e-a97d-a9c49413af82

https://github.com/user-attachments/assets/0a74da63-3eb4-4025-a4f3-b79ee1323567

w3ichen commented 19 hours ago

@Xavilien