Reduce undo toast auto-dismiss timeout from 30s to 10s #813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem(s) was I solving?
The undo toast notifications for archive/draft deletion operations were displaying for 30 seconds before auto-dismissing. This duration was unnecessarily long and could clutter the UI, especially when users perform multiple operations in succession. Users who are familiar with the Z hotkey for undo don't need the toast to persist for such an extended period.
What user-facing changes did I ship?
How I implemented it
Modified the
showUndoToastfunction inhumanlayer-wui/src/utils/undoToast.tsxto reduce the toast duration from 30000ms to 10000ms. This is a single-line change that affects all undo toasts consistently across the application.The change applies to:
How to verify it
Automated Testing
make check- All linting and type checking passesmake test- All unit and integration tests passManual Testing
To verify the toast timeout change:
Test scenarios to verify:
Description for the changelog
Reduced undo notification auto-dismiss timeout from 30 to 10 seconds for improved UI responsiveness