Skip to content

Say before an undo whether it can work - #189

Merged
markusressel merged 1 commit into
masterfrom
feature/revert-check
Nov 14, 2026
Merged

markusressel merged 1 commit into
masterfrom
feature/revert-check

Conversation

@markusressel

Copy link
Copy Markdown
Member

Markus found that "Undo this change" could be tapped and confirmed, and only then said the change was gone. Backend #104 adds GET /document/{id}/history/{revision}/revert/ (feature revert-check), which checks without changing anything.

  • When an entry opens, the app asks the check, each time, because others may have edited since. It doesn't ask for the oldest entry or on servers without revert-check.
  • nothing-to-revert: "Can't undo: this change was undone already or edited away." is shown instead of the button.
  • revert-conflict: "Can't undo: later changes in Install are in the way." is shown instead of the button.
  • While the check runs, the button is disabled. A failed check leaves the button, and the undo itself still reports its 409s.
  • After an undo or restore, the open entry is checked again.

Tests: the REST model with real answers of backend 6d54b9b, ViewModel and Robolectric tests, and on the emulator against that backend: an already undone change showed the text, a possible one the button.

🤖 Generated with Claude Code

On servers with revert-check, an opened history entry asks whether its
change can be undone. If it was undone already or edited away, or later
changes are in the way, the entry says so instead of offering the undo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@markusressel
markusressel merged commit 12e02e5 into master Nov 14, 2026
3 checks passed
@markusressel
markusressel deleted the feature/revert-check branch November 14, 2026 11:17
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.

1 participant