---
title: "Undo a reversible action from its toast"
description: "Verify a toast Undo action reverses the exact preceding change and that the saved record state agrees with the restored visible list."
canonical_url: "https://vostride.com/agent-library/notifications/toast-action-undo.md"
md_url: "https://vostride.com/agent-library/notifications/toast-action-undo.md"
content_kind: "recipe"
topic: "notifications"
---

# Undo a reversible action from its toast

Verify a toast Undo action reverses the exact preceding change and that the saved record state agrees with the restored visible list.

## Risk

Toast actions may capture the wrong record when lists reorder, or disappear before they can be used. Use one reversible fixture change and the documented action availability window.

## Fixtures

- A test task list contains Archive probe and an unrelated Control task with recorded stable keys.
- Archiving Archive probe is reversible through an Undo toast for the contract-defined interval.
- An approved read-only fixture check reports each task archived state independently of the list rendering.

## Steps

1. Open the list and verify both fixture tasks are active before making a change.
2. Archive Archive probe and verify it disappears from the active list while a toast names the action and offers Undo.
3. Activate that toast Undo within its supported interval and verify Archive probe returns to the active list.
4. Reload and verify both original task keys remain active with their original titles.
5. Run the prepared state check and verify Archive probe is not archived and the Control task state never changed.

## Expected results

- The undo restores the exact archived fixture identifier rather than a similarly positioned row.
- The visible restoration persists after reload and agrees with the independent saved-state check.
- The unrelated control task remains untouched throughout the archive and undo transitions.

## False-pass traps

- A toast announcing Undo complete can hide a server failure; inspect persistent task state.
- Undoing through a separate archive page does not exercise the toast action binding.

## Cleanup

- Restore any changed fixture state and delete the two test tasks if disposable.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Notification QA recipes](/agent-library/notifications.md)
- [Software factory QA library](/agent-library.md)
