debugger: Add actions and keybindings for opening the thread and session menus (#31135)

Makes it possible to open and navigate these menus from the keyboard.

I also removed the eager previewing behavior for the thread picker,
which was buggy and came with a jarring layout shift.

Release Notes:

- Debugger Beta: Added the `debugger: open thread picker` and `debugger:
open session picker` actions.
This commit is contained in:
Cole Miller 2025-05-21 20:56:39 -04:00 committed by GitHub
parent eb35d25a7d
commit b2a92097ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 76 additions and 68 deletions

View file

@ -132,7 +132,8 @@ impl DebugPanel {
this
}),
)
.style(DropdownStyle::Ghost),
.style(DropdownStyle::Ghost)
.handle(self.session_picker_menu_handle.clone()),
)
} else {
None
@ -163,7 +164,7 @@ impl DebugPanel {
DropdownMenu::new_with_element(
("thread-list", session_id.0),
trigger,
ContextMenu::build_eager(window, cx, move |mut this, _, _| {
ContextMenu::build(window, cx, move |mut this, _, _| {
for (thread, _) in threads {
let running_state = running_state.clone();
let thread_id = thread.id;
@ -177,7 +178,8 @@ impl DebugPanel {
}),
)
.disabled(session_terminated)
.style(DropdownStyle::Ghost),
.style(DropdownStyle::Ghost)
.handle(self.thread_picker_menu_handle.clone()),
)
} else {
None