PR_26179_CHARLIE_030-sprites-undo-redo#266
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f85c454b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function resetGridToDefault() { | ||
| setGridSize(DEFAULT_GRID_SIZE); | ||
| clearCanvas(); | ||
| pushUndoSnapshot(); |
There was a problem hiding this comment.
When the draft is already an empty 16x16 canvas, such as immediately after undoing a paint from the initial grid, clicking Reset to 16x16 makes no visible state change but this unconditional history push clears the redo stack via pushUndoSnapshot(). That disables Redo and loses the user's ability to restore the undone edit, so the reset should only record history when the grid size or painted pixels would actually change.
Useful? React with 👍 / 👎.
Summary
Validation
Artifact