Possibly the problem is that when the toggle button is turned off, the cookie socratiq is deleted instead of being turned to false, then when the URL is used there is no cookie to update. This theory doesn't work for why the url doesn't shut off socratiq but at least it is a start.
Originally created by @hpssjellis on GitHub (Nov 28, 2024).
Originally assigned to: @kai4avaya on GitHub.
The button to turn SocratiQ on or off works fine, but for me on Chrome and Edge the URL
```
To activate: https://mlsysbook.ai/?socratiq=true
To deactivate: https://mlsysbook.ai/?socratiq=false
```
Does not change the button from on to off etc or change the state of socratiQ on the page. I tried the following without any improvement
```
https://mlsysbook.ai/?socratiQ=true
```

In the code the part that responds to the cookie is here
https://github.com/harvard-edge/cs249r_book/blob/9799fab0619b7ff2b372ebd50e5da0988803bd01/contents/ai/socratiq.qmd#L62-L71
Possibly the problem is that when the toggle button is turned off, the cookie socratiq is deleted instead of being turned to false, then when the URL is used there is no cookie to update. This theory doesn't work for why the url doesn't shut off socratiq but at least it is a start.

Hi @hpssjellis Great catch! This should be fixed in the next update. The code is tracking this url parameter: widget_access but not socratiq
@kai4avaya commented on GitHub (Dec 14, 2024):
Hi @hpssjellis Great catch! This should be fixed in the next update. The code is tracking this url parameter: `widget_access` but not `socratiq`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @hpssjellis on GitHub (Nov 28, 2024).
Originally assigned to: @kai4avaya on GitHub.
The button to turn SocratiQ on or off works fine, but for me on Chrome and Edge the URL
Does not change the button from on to off etc or change the state of socratiQ on the page. I tried the following without any improvement
In the code the part that responds to the cookie is here
https://github.com/harvard-edge/cs249r_book/blob/9799fab0619b7ff2b372ebd50e5da0988803bd01/contents/ai/socratiq.qmd#L62-L71
Possibly the problem is that when the toggle button is turned off, the cookie socratiq is deleted instead of being turned to false, then when the URL is used there is no cookie to update. This theory doesn't work for why the url doesn't shut off socratiq but at least it is a start.
@profvjreddi commented on GitHub (Nov 30, 2024):
Thanks for filing these issues @hpssjellis, I've tagged @kai4avaya on these to take a look.
@kai4avaya commented on GitHub (Dec 14, 2024):
Hi @hpssjellis Great catch! This should be fixed in the next update. The code is tracking this url parameter:
widget_accessbut notsocratiq