-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix: restore checkpoint visibility in UI #7787
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
Conversation
- Changed suppressMessage flag from true to false when creating checkpoints for user messages - This ensures checkpoints are visible in the UI so users can restore their code when needed - Fixes issue where checkpoint list was not appearing below API requests Fixes #7786
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing my own code is like debugging in a mirror - everything looks backwards but the bug is still mine.
| // Create a checkpoint whenever the user sends a message. | ||
| // Use allowEmpty=true to ensure a checkpoint is recorded even if there are no file changes. | ||
| // Suppress the checkpoint_saved chat row for this particular checkpoint to keep the timeline clean. | ||
| // Do not suppress the checkpoint_saved chat row so users can see and restore checkpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on updating the comment to match the new behavior. This makes the intent clear for future maintainers.
| // Do not suppress the checkpoint_saved chat row so users can see and restore checkpoints. | ||
| if (askResponse === "messageResponse") { | ||
| void this.checkpointSave(false, true) | ||
| void this.checkpointSave(false, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the correct fix. Changing from true to false ensures checkpoint messages are visible in the UI, which directly addresses the issue reported in #7786.
However, would it be worth adding a test case specifically for this behavior? Something that verifies checkpointSave is called with suppressMessage=false when handling messageResponse. This would help prevent regression in the future.
|
Closing for now, issue needs more info #7786 (comment) |
Description
This PR fixes the issue where checkpoints were not appearing in the UI, preventing users from restoring their code when needed.
Problem
Solution
Changed the
suppressMessageflag fromtruetofalsewhen creating checkpoints for user messages. This ensures checkpoints are visible in the UI while maintaining all checkpoint functionality.Changes
src/core/task/Task.tsline 897 to not suppress checkpoint messagesTesting
checkpoint.test.ts)CheckpointRestoreDialog.spec.tsx)Related Issue
Fixes #7786
Screenshots
The checkpoint list will now be visible below API requests as expected.
Review Notes
This is a minimal change that only affects the visibility of checkpoint messages in the UI. The underlying checkpoint functionality remains unchanged.
Important
Fixes checkpoint visibility in UI by setting
suppressMessagetofalseinTask.ts, allowing users to see and restore checkpoints.suppressMessagetofalseinhandleWebviewAskResponse()inTask.ts.checkpoint.test.ts).CheckpointRestoreDialog.spec.tsx).This description was created by
for e642f9b. You can customize this summary. It will automatically update as commits are pushed.