zed/crates/editor/src
Anthony Eid 7f4a99aa95
Fix task modal fallback when LSP tasks are empty (#58090)
References
[FR-28](https://linear.app/zed-industries/issue/FR-28/task-modal-does-not-show-runnable-rust-test).

The bug this PR aims to fix is

> I can click the play button beside a rust test function, but it does
not show up in the task modal.

I wasn't able to reproduce it, but I suspect this was caused by the task
system preferring LSP code actions by default. It checked that an LSP
was queried for a task instead of checking if the queried LSP actually
returned any tasks. So the fix was just adding the below if statement as
a check.

```rust
if !new_lsp_tasks.is_empty() {
    lsp_tasks
        .entry(source_kind)
        .or_insert_with(Vec::new)
        .append(&mut new_lsp_tasks);
}
```

I also added a regression test for this

Self-Review Checklist:

- [x] I have reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the UI/UX checklist
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- Fixed task modal failing to show language tasks in some cases
2026-05-29 17:49:11 +00:00
..
display_map Rust 1.95 (#55104) 2026-04-29 10:27:47 +00:00
editor_tests gpui: Add property_test macro (#50935) 2026-03-06 14:03:45 +00:00
element editor: Extract header and mouse out of element.rs (#57472) 2026-05-29 11:51:17 +00:00
git Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
inlays Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
scroll editor: Add preserve scroll strategy for go to definition (#55036) 2026-04-29 07:29:15 +00:00
test Remove smol as a dependency from a bunch of crates (#53603) 2026-04-24 10:29:51 +00:00
actions.rs diagnostics: Prefer activating diagnostic under cursor (#52957) 2026-05-28 17:30:36 +00:00
blink_manager.rs Revert "Revert scheduler update (#46659)" (#46671) 2026-01-14 07:19:13 +00:00
bookmarks.rs editor: Introduce Bookmarks (#54174) 2026-04-17 13:54:43 +02:00
bracket_colorization.rs Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
clangd_ext.rs Merge gpui::Task and scheduler::Task (#53674) 2026-05-05 22:41:13 +00:00
clipboard.rs editor: Extract edit_prediction and clipboard out of editor.rs (#56927) 2026-05-16 19:19:36 +00:00
code_actions.rs editor: Extract completions and code_actions out of editor.rs (#56030) 2026-05-07 13:02:11 +00:00
code_completion_tests.rs agent_ui: Render skills as creases (#56689) 2026-05-14 22:20:34 +00:00
code_context_menus.rs markdown: Add ability to wrap/unwrap codeblock content (#57312) 2026-05-20 20:51:56 +00:00
code_lens.rs Fall back to default text when no command is available for the resolved lens (#57790) 2026-05-27 09:19:04 +00:00
completions.rs agent_ui: Render skills as creases (#56689) 2026-05-14 22:20:34 +00:00
config.rs editor: Extract rewrap and config out of editor.rs (#55855) 2026-05-06 11:57:36 +00:00
diagnostics.rs diagnostics: Prefer activating diagnostic under cursor (#52957) 2026-05-28 17:30:36 +00:00
display_map.rs editor: Extend underlines into inlay hints (#56407) 2026-05-13 06:52:46 +00:00
document_colors.rs Rust 1.95 (#55104) 2026-04-29 10:27:47 +00:00
document_links.rs Support LSP document links (#56011) 2026-05-26 07:09:47 +00:00
document_symbols.rs Support LSP document links (#56011) 2026-05-26 07:09:47 +00:00
edit_prediction.rs gpui: Add support for inset shadow (#57685) 2026-05-26 14:32:45 +00:00
edit_prediction_tests.rs ep: Fix edit prediction diff popover being occluded by right docs and sidebar (#57519) 2026-05-22 18:21:54 +00:00
editor.rs ep: Fix agent edits triggering edit predictions due to diagnostic refresh (#57832) 2026-05-28 13:27:55 +00:00
editor_block_comment_tests.rs editor: Add action to toggle block comments (#48752) 2026-04-08 22:29:16 +03:00
editor_settings.rs Support LSP document links (#56011) 2026-05-26 07:09:47 +00:00
editor_tests.rs diagnostics: Prefer activating diagnostic under cursor (#52957) 2026-05-28 17:30:36 +00:00
element.rs editor: Extract header and mouse out of element.rs (#57472) 2026-05-29 11:51:17 +00:00
fold.rs editor: Extract fold and selection out of editor.rs (#56070) 2026-05-07 16:14:47 +00:00
folding_ranges.rs git: Fix diff hunks not being removed on restore in remote projects (#54823) 2026-05-07 17:40:28 +00:00
git.rs editor: Add action to toggle all diff hunks (#56421) 2026-05-18 18:02:51 +00:00
highlight_matching_bracket.rs editor: Fix bracket highlight flickering when editing (#49797) 2026-02-21 11:19:56 +00:00
hover_links.rs Support LSP document links (#56011) 2026-05-26 07:09:47 +00:00
hover_popover.rs Auto-scroll hover popup while selecting text (#57518) 2026-05-28 09:55:14 +00:00
indent_guides.rs Add vim/emacs modeline support (#49267) 2026-03-25 03:15:51 +00:00
inlays.rs Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
input.rs vim: Fix dot repeat after macro replay not capturing insertion text (#57684) 2026-05-27 14:36:41 +00:00
items.rs Make project panel to auto reveal multi buffer excerpts with latest selection (#57236) 2026-05-25 11:53:12 +00:00
jsx_tag_auto_close.rs Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
linked_editing_ranges.rs Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
lsp_ext.rs Fix task modal fallback when LSP tasks are empty (#58090) 2026-05-29 17:49:11 +00:00
mouse_context_menu.rs Gate Format Selections on whether the active formatter can actually format ranges (#53178) 2026-04-16 09:11:22 +03:00
movement.rs editor: Fix forward word movement over inline folds in agent panel (#53979) 2026-04-16 11:25:08 +01:00
navigation.rs Support LSP document links (#56011) 2026-05-26 07:09:47 +00:00
persistence.rs Fix shared database test isolation (#51809) 2026-03-18 12:05:57 -07:00
rewrap.rs editor: Extract rewrap and config out of editor.rs (#55855) 2026-05-06 11:57:36 +00:00
runnables.rs Fix "Run Debugger" failing silently when project does not compile (#52439) 2026-05-04 06:50:38 +00:00
rust_analyzer_ext.rs Merge gpui::Task and scheduler::Task (#53674) 2026-05-05 22:41:13 +00:00
scroll.rs editor: Un-pub ScrollManager (#55767) 2026-05-05 13:01:02 +00:00
selection.rs editor: Extract navigation out of editor.rs (#56634) 2026-05-14 07:20:51 +00:00
selections_collection.rs Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
semantic_tokens.rs git: Fix diff hunks not being removed on restore in remote projects (#54823) 2026-05-07 17:40:28 +00:00
signature_help.rs markdown: Add ability to wrap/unwrap codeblock content (#57312) 2026-05-20 20:51:56 +00:00
split.rs Make project panel to auto reveal multi buffer excerpts with latest selection (#57236) 2026-05-25 11:53:12 +00:00
split_editor_view.rs Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
tasks.rs Require multibuffer excerpts to be ordered and nonoverlapping (#52364) 2026-04-01 17:25:32 +00:00
test.rs Bump ctor (#57728) 2026-05-27 10:31:53 +00:00