# agent_ui: Create terminal title editors lazily \(\#56233\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 26cf1759301d231413a725f8a893521a137f8823

Requested commit: 26cf1759301d231413a725f8a893521a137f8823

Commit: 26cf1759301d231413a725f8a893521a137f8823

Tree: 31f8cfc042f6765c3a36c3e95e35461b477eeb29

Author: Ben Brandt

Committer: GitHub

## Message

```
agent_ui: Create terminal title editors lazily (#56233)

Keep terminal titles as labels until clicked, then create and focus the
editor. Drop the editor and subscription when editing ends.

Fixes a memory leak from too many title updates.

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 is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
```

## Parents

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

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