这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@K-Mistele
Copy link
Contributor

@K-Mistele K-Mistele commented Oct 24, 2025

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?

  • Reduced auto-dismiss timeout: Undo toasts for the following operations now auto-dismiss after 10 seconds instead of 30 seconds:
    • Session archiving/unarchiving (single and bulk operations)
    • Draft deletion/discarding (single and bulk operations)
  • The Z hotkey functionality remains unchanged - users can still press Z to undo operations while the toast is visible
  • The visual appearance and positioning of the toasts remain the same

How I implemented it

Modified the showUndoToast function in humanlayer-wui/src/utils/undoToast.tsx to 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:

  • Single session archive/unarchive operations
  • Bulk session archive/unarchive operations
  • Single draft discard operations
  • Bulk draft discard operations

How to verify it

Automated Testing

  • make check - All linting and type checking passes
  • make test - All unit and integration tests pass

Manual Testing

To verify the toast timeout change:

  1. Launch the application
  2. Create or navigate to a session
  3. Archive a session (or discard a draft)
  4. Observe that the undo toast appears with the "Z" hotkey indicator
  5. Wait and confirm the toast auto-dismisses after 10 seconds (previously 30 seconds)
  6. Test that pressing Z within the 10-second window still successfully undoes the operation

Test scenarios to verify:

  • Single session archive - toast dismisses after 10 seconds
  • Bulk session archive - toast dismisses after 10 seconds
  • Single draft discard - toast dismisses after 10 seconds
  • Bulk draft discard - toast dismisses after 10 seconds
  • Z hotkey still works to undo within the 10-second window

Description for the changelog

Reduced undo notification auto-dismiss timeout from 30 to 10 seconds for improved UI responsiveness

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 4fd0ef8 in 28 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. humanlayer-wui/src/utils/undoToast.tsx:30
  • Draft comment:
    The auto-dismiss duration is now a magic number (10000 ms). Consider extracting it as a named constant or config value for easier future adjustments.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_QaPT76dNdwjw0TjE

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@K-Mistele K-Mistele merged commit dc4cf3c into main Oct 24, 2025
6 checks passed
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.

2 participants