Skip to content

Show runnable task results in gutter - #61095

Merged
ChristopherBiscardi merged 2 commits into
zed-industries:mainfrom
pixel365:tests
Jul 21, 2026
Merged

Show runnable task results in gutter#61095
ChristopherBiscardi merged 2 commits into
zed-industries:mainfrom
pixel365:tests

Conversation

@pixel365

Copy link
Copy Markdown
Contributor

Objective

  • Make runnable task results visible directly in the editor gutter after running a test or task.
  • This makes it easier to see whether the last run passed or failed without looking at the terminal output.

Solution

  • Track the completion result for scheduled runnable tasks.
  • Show the last runnable result in the gutter:
    • running task: accent play icon
    • successful task: success check icon
    • failed/cancelled task: error icon
  • Apply the same status update path when running from the gutter play button and from inline code lens actions such as Run Test.

Testing

  • Ran cargo check -p editor -p workspace.
  • Ran cargo test -p workspace test_schedule_resolved_task_with_completion_reports_success.
  • Manually tested running a GPUI test from the gutter play button.
  • Manually tested running a GPUI test from the inline Run Test code lens.
  • Verified the gutter icon updates after completion in both cases.

Self-Review Checklist:

Showcase

Before:
before

After:
after


Release Notes:

  • Improved runnable tasks by showing the last run result in the editor gutter.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 16, 2026
@SomeoneToIgnore SomeoneToIgnore self-assigned this Jul 16, 2026
@SomeoneToIgnore SomeoneToIgnore added the area:tasks Feedback for Zed's task support label Jul 16, 2026
@pixel365
pixel365 force-pushed the tests branch 9 times, most recently from 8872b5f to 94638cb Compare July 20, 2026 13:20

@ChristopherBiscardi ChristopherBiscardi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

neat idea, and any file change seems to clear the status. It would be cool to have a followup where you can right-click to clear the status as well.

@ChristopherBiscardi
ChristopherBiscardi added this pull request to the merge queue Jul 21, 2026
Merged via the queue into zed-industries:main with commit 6b594a4 Jul 21, 2026
34 checks passed
@pixel365
pixel365 deleted the tests branch July 21, 2026 05:41
@pixel365

Copy link
Copy Markdown
Contributor Author

Thanks! I opened #61375 for this.

pixel365 added a commit to pixel365/zed that referenced this pull request Jul 22, 2026
# Objective

Add a way to manually clear completed run statuses from the gutter.

Folow-up to zed-industries#61095 

This follows up on feedback from the previous gutter run status PR.
Currently, editing a file clears run statuses automatically, but there
was no direct way to clear a completed status without changing the file.

## Solution

- Added a `Clear Run Status` entry to the gutter context menu.
- Show the entry only when the row has a completed run status.
- Clear the stored run status for that runnable when selected.
- Keep running statuses unchanged, so this does not behave like task
cancellation.

## Testing

- Ran `cargo check -p editor`.
- Manually ran a test from the gutter and waited for a completed status.
- Verified right-clicking the gutter icon shows `Clear Run Status`.
- Verified selecting `Clear Run Status` clears the status icon.
- Verified the action is not shown for rows without a completed run
status.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


[after.webm](https://github.com/user-attachments/assets/1ae284e1-03b1-4842-a63e-9d66c290b325)

---

Release Notes:

- Improved gutter run statuses by allowing completed statuses to be
cleared from the gutter context menu.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tasks Feedback for Zed's task support 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