Skip to content

"Revert message" should not modify code #36465

Description

@iAvoe

Description

In a conversation, the "revert message" is actually reverting code, which is not said clearly or prompted with a warning. This is still okay since the user can revert the revert feature, until I accidentally clicked revert on an old conversation, which somehow broke my Git, resulting several files missing despite executing Git hard reset.

Currently I just learned to never use revert anymore to prevent damages like this, which is also not ideal.

There are several fixes may be applied:

  • Prompt user with warning that revert conversation actually reverts code
  • Separate "revert message" with "revert changes" (user can choose only revert conversation without reverting code)
  • Remove "revert changes" entirely, since some changes are still good and can be carried to another conversation session

Plugins

None were used

OpenCode version

1.16.2

Steps to reproduce

  1. Go to a project that has multiple git commits with many session conversations
  2. Go to a rather old conversation
  3. In the old conversation, scroll up to an early dialog with file changes
  4. Click "Revert message", which messes your project up even with Git commits, mostly are deleted files

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions