-
Notifications
You must be signed in to change notification settings - Fork 621
Dashboard: Reset last-used-* cookies on login page #7005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard: Reset last-used-* cookies on login page #7005
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7005 +/- ##
=======================================
Coverage 54.60% 54.60%
=======================================
Files 903 903
Lines 57936 57936
Branches 3973 3971 -2
=======================================
+ Hits 31637 31638 +1
+ Misses 26198 26197 -1
Partials 101 101
🚀 New features to boost your workflow:
|
size-limit report 📦
|
Merge activity
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces a new function to delete cookies and integrates it into the `LoginPage` to reset specific cookies upon loading the page.
### Detailed summary
- Added `deleteCookie` function in `lib/cookie.ts` to remove a cookie by setting its expiration date to the past.
- Introduced `ResetLastUsedCookies` component in `LoginPage.tsx` to call `deleteCookie` for `LAST_USED_PROJECT_ID`, `LAST_USED_TEAM_ID`, and `LAST_VISITED_TEAM_PAGE_PATH` on component mount.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
64b7f4f to
6c41a5a
Compare
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on adding a `deleteCookie` function to manage cookies and incorporates a new component, `ResetLastUsedCookies`, in the `LoginPage` to clear specific cookies upon rendering.
### Detailed summary
- Added `deleteCookie` function in `cookie.ts` to delete cookies by name.
- Imported constants `LAST_USED_PROJECT_ID`, `LAST_USED_TEAM_ID`, and `LAST_VISITED_TEAM_PAGE_PATH` in `LoginPage.tsx`.
- Implemented `ResetLastUsedCookies` component to delete specific cookies on mount.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
6c41a5a to
7de273c
Compare

PR-Codex overview
This PR introduces a new function to delete cookies and integrates it into the
LoginPagecomponent to reset specific cookies upon mounting.Detailed summary
deleteCookiefunction incookie.tsto remove cookies by setting their expiration date to the past.LAST_USED_PROJECT_ID,LAST_USED_TEAM_ID,LAST_VISITED_TEAM_PAGE_PATH) inLoginPage.tsx.ResetLastUsedCookiescomponent to delete specified cookies on component mount.