# zeta: Fix update required notification not showing \(\#25588\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e5b61949148cd87e08ae38e80949bce9b4ede9f7

Requested commit: e5b61949148cd87e08ae38e80949bce9b4ede9f7

Commit: e5b61949148cd87e08ae38e80949bce9b4ede9f7

Tree: f76b0bec9bf9281f633d1d8dbb7bfaf035f3bbc5

Author: Marshall Bowers

Committer: GitHub

## Message

````
zeta: Fix update required notification not showing (#25588)

This PR fixes an issue introduced in #25530 that broke the notifications
that inform the user that a Zed update is required to continue using
edit prediction.

The issue is that the `Workspace` stored on the `Editor` is set _after_
the point we initialize Zeta, so capturing the `Workspace` at
construction time leads to it being `None`.

@ConradIrwin suggested that we could obtain the `Workspace` from the
`Window`, which does indeed do the trick.

I tested it both with and without this change by mocking the error
response, like so:

```rs
let response: Result<PredictEditsResponse, anyhow::Error> =
    Err(anyhow!(ZedUpdateRequiredError {
        minimum_version: SemanticVersion::new(0, 1, 0),
    }));
```

Release Notes:

- N/A
````

## Parents

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

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