# git_ui: Re-render Git Panel when language model registry updates \(\#59299\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c0945a82018c11f09bae41bbc7035f4b07568a8f

Requested commit: c0945a82018c11f09bae41bbc7035f4b07568a8f

Commit: c0945a82018c11f09bae41bbc7035f4b07568a8f

Tree: 042732b587838bdcbf004fce930ccd7950f00647

Author: Charley Wu

Committer: GitHub

## Message

```
git_ui: Re-render Git Panel when language model registry updates (#59299)

Fixes the "Generate git commit message" wand button being permanently
disabled on startup. Subscribes the Git Panel to language model registry
events so that it automatically re-renders once the asynchronous model
fetches complete.

Closes #55451.

## Suggested .rules additions

### GPUI Views and Global State Registries

* If a view (like `GitPanel`) reads from a global state registry (like
`LanguageModelRegistry`) during rendering, it must subscribe/observe
that registry's events and call `cx.notify()` to re-render when the
state updates (such as when models finish loading asynchronously).

Release Notes:

- Fixed the git commit message generation button showing as permanently
disabled when models load after startup.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
```

## Parents

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

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