# Fix flicker when agent plan updates \(\#35739\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9358690337421b580248d3f594ceba47e3c88f32)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9358690337421b580248d3f594ceba47e3c88f32

Requested commit: 9358690337421b580248d3f594ceba47e3c88f32

Commit: 9358690337421b580248d3f594ceba47e3c88f32

Tree: 6e5a664d7285f6de149cc5abfb3b3bef683d8026

Author: Cole Miller

Committer: GitHub

## Message

```
Fix flicker when agent plan updates (#35739)

Currently, when the agent updates its plan, there are a few frames where
the text after `Current:` in the plan summary is blank, causing a
flicker. This is because we treat that field as markdown, and the
`MarkdownElement` renders as blank until the raw text has finished
parsing in the background.

This PR fixes the flicker by changing `Markdown::new_text` to
optimistically render the source as a single `MarkdownEvent::Text` span
until background parsing has finished.

Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
```

## Parents

- [3ea90e397b84fbeabd01443c37f69319002a9dfd](https://git.cafe/gitcafe/zed/commit/3ea90e397b84fbeabd01443c37f69319002a9dfd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9358690337421b580248d3f594ceba47e3c88f32?format=markdown)
