Skip to content

agent_ui: Fix delete icon event in history panel#43796

Merged
danilo-leal merged 1 commit intozed-industries:mainfrom
aeroxy:fix/history-delete-icon
Nov 29, 2025
Merged

agent_ui: Fix delete icon event in history panel#43796
danilo-leal merged 1 commit intozed-industries:mainfrom
aeroxy:fix/history-delete-icon

Conversation

@aeroxy
Copy link
Contributor

@aeroxy aeroxy commented Nov 29, 2025

Summary

Fixed the thread deletion issue by:

  1. Click handler conflict between the trash icon and the main ListItem
  2. Added cx.stop_propagation() to prevent the click event from bubbling up to the parent ListItem's click handler
  3. Followed the established cx.stop_propagation() pattern used throughout the codebase

Now when you click the trash icon to delete a thread:

  • ✅ The thread deletion happens immediately on the first click
  • ✅ No race condition between deletion and activation
  • ✅ No double-clicking required

The fix is minimal, follows established patterns, and addresses the exact root cause of the issue.

  • Stop event propagation in thread removal handler

Release Notes:

  • agent: Improved delete thread action in the history view by preventing it from also triggering the thread activation.

- Stop event propagation in thread removal handler
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 29, 2025
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Nov 29, 2025
Copy link
Member

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Thank you!

@danilo-leal danilo-leal enabled auto-merge (squash) November 29, 2025 14:14
@danilo-leal danilo-leal merged commit 8abf1d3 into zed-industries:main Nov 29, 2025
44 of 46 checks passed
@aeroxy
Copy link
Contributor Author

aeroxy commented Nov 29, 2025 via email

11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
Summary

Fixed the thread deletion issue by:

1. Click handler conflict between the trash icon and the main ListItem
2. Added `cx.stop_propagation()` to prevent the click event from
bubbling up to the parent ListItem's click handler
3. Followed the established `cx.stop_propagation()` pattern used
throughout the codebase

Now when you click the trash icon to delete a thread:
- ✅ The thread deletion happens immediately on the first click
- ✅ No race condition between deletion and activation
- ✅ No double-clicking required

The fix is minimal, follows established patterns, and addresses the
exact root cause of the issue.

- Stop event propagation in thread removal handler

Release Notes:

- agent: Improved delete thread action in the history view by preventing
it from also triggering the thread activation.
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
Summary

Fixed the thread deletion issue by:

1. Click handler conflict between the trash icon and the main ListItem
2. Added `cx.stop_propagation()` to prevent the click event from
bubbling up to the parent ListItem's click handler
3. Followed the established `cx.stop_propagation()` pattern used
throughout the codebase

Now when you click the trash icon to delete a thread:
- ✅ The thread deletion happens immediately on the first click
- ✅ No race condition between deletion and activation
- ✅ No double-clicking required

The fix is minimal, follows established patterns, and addresses the
exact root cause of the issue.

- Stop event propagation in thread removal handler

Release Notes:

- agent: Improved delete thread action in the history view by preventing
it from also triggering the thread activation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants