# workspace: Move panel telemetry to workspace level \(\#46809\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5e5951a43efb15b01d11ab4ffbf12ac968e26120

Requested commit: 5e5951a43efb15b01d11ab4ffbf12ac968e26120

Commit: 5e5951a43efb15b01d11ab4ffbf12ac968e26120

Tree: 41c99a15ee86404eda5caf53b768659f50878f62

Author: Katie Geer

Committer: GitHub

## Message

```
workspace: Move panel telemetry to workspace level (#46809)

This refactors the "Panel Button Clicked" telemetry event to fire from
`workspace.rs` instead of `dock.rs`.

Previously, the event was emitted in the `PanelButtons` render method's
click handler. Now it fires at the workspace level in two places:
- `toggle_dock()` - captures panel toggles via dock buttons
- `focus_panel<T>()` - captures panel focus via keyboard shortcuts

This ensures the telemetry fires once per user action regardless of
input method, and retrieves the panel name dynamically via
`persistent_name()` rather than relying on a pre-computed local
variable.

Release Notes:

- N/A
```

## Parents

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

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