debugger_ui: Preview thread state when using the dropdown (#28778)

This PR changes the thread list dropdown menu in the debugger UI to
eagerly preview the state of a thread when selecting it, instead of
waiting until confirming the selection.

Release Notes:

- N/A
This commit is contained in:
Cole Miller 2025-04-15 12:10:32 -04:00 committed by GitHub
parent 90dec1d451
commit 42c3f4e7cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 104 additions and 47 deletions

View file

@ -768,7 +768,7 @@ impl RunningState {
DropdownMenu::new(
("thread-list", self.session_id.0),
selected_thread_name,
ContextMenu::build(window, cx, move |mut this, _, _| {
ContextMenu::build_eager(window, cx, move |mut this, _, _| {
for (thread, _) in threads {
let state = state.clone();
let thread_id = thread.id;