You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] restore destroys user changes if done in a chain #20781
When users restored earlier messages while later messages in the same chain remained reverted, file changes from the restored messages could still stay missing on disk. This happened because the server updated the revert point without first restoring the saved pre-revert snapshot, so the repo state could fall out of sync with the revert stack
Plugins
No response
OpenCode version
No response
Steps to reproduce
Start a session in a repo with three files, for example a.txt, b.txt, and c.txt.
Create three messages where each message changes a different file:
message a changes a.txt
message b changes b.txt
message c changes c.txt
Revert from message a, so all three messages are reverted.
Restore message a, then restore message b, while leaving message c reverted.
Check the files on disk with cat
Expected
a.txt and b.txt should be restored
c.txt should still be reverted
Actual
file changes from the restored messages could still remain missing on disk
the repo state could be out of sync with what the UI showed as restored vs. still reverted
Activity