Skip to content
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

feat: improvements to save state #1135

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Conversation

KevinWu098
Copy link
Member

Summary

  1. Prevents "undo" if it would return the user to an empty state. This prevents autosave from wiping the user's schedule since we can never return to an empty state
  2. Clears "states" when loading in a new username. This prevents undoing to another user's schedule and having that autosaved.

Test Plan

  1. Load a schedule. Try and undo (ctrl + z). Nothing should happen.
  2. Undoing should still work, but not on the very first action you take
  3. Load a schedule. Load a different schedule. Undo should do nothing.

Issues

Closes #1133

Copy link
Member

@MinhxNguyen7 MinhxNguyen7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MinhxNguyen7 MinhxNguyen7 merged commit 2bf9f9b into main Feb 5, 2025
4 checks passed
@MinhxNguyen7 MinhxNguyen7 deleted the kwu/undo-autosave-bug branch February 5, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undo with Autosave can wipe schedules unexpectedly
2 participants