zed/crates/copilot_ui
hiro / THETIME 59c021d8dc
copilot_ui: Fix Copilot sign-in window focus on Hyprland (#59933)
# Objective

The Copilot sign-in dialog was created without an `app_id` or window
title, resulting in an empty WM class/title on Linux. Tiling window
managers with class-based no-focus rules (like Hyprland's default
configuration in Omarchy) treat such windows as anonymous popups and
refuse to focus them, making the dialog impossible to interact with.

## Solution

Set both `app_id` and window title on the Copilot code verification
window, following the established pattern used in other UI components
like `agent_ui` and `settings_ui`.

Added `release_channel` as a dependency to
`crates/copilot_ui/Cargo.toml` and called
`app_id(ReleaseChannel::app_id(cx))` and `window_title("Use GitHub
Copilot in Zed")` in `open_copilot_code_verification_window`.

## Testing

Verified on Hyprland (Omarchy) by inspecting window properties with
`hyprctl clients`:

**Before (empty class/title):**

```
Window 5606ee1dd280 -> :
    class: 
    title: 
    acceptsInput: 0
```

**After (with proper class/title):**

```
Window 5606ee22b660 -> Use GitHub Copilot in Zed:
    class: dev.zed.Zed-Dev
    title: Use GitHub Copilot in Zed
    acceptsInput: 1
```

The dialog now receives keyboard focus and mouse input correctly on
Hyprland. I tested on Linux only; this fix lives in the window creation
call so it is a no-op on macOS and Windows where `app_id` is ignored.

## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed Copilot sign-in window not being focusable on Hyprland and
similar tiling window managers

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-07-07 10:27:57 +00:00
..
src copilot_ui: Fix Copilot sign-in window focus on Hyprland (#59933) 2026-07-07 10:27:57 +00:00
Cargo.toml copilot_ui: Fix Copilot sign-in window focus on Hyprland (#59933) 2026-07-07 10:27:57 +00:00
LICENSE-GPL copilot: Un-globalify copilot + handle it more directly with EditPredictionStore (#46618) 2026-01-14 14:44:13 +00:00