zed-industries / zed-industries/zed

agent::Toggle does not toggle Agent panel visibility on first invocation

Open
#63,243 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.contrib/good first issue area:ai reach:some users severity:S3
Dominant language
Rust
Stars
90.6k
Forks
10.7k
Avg merge
1d 12h
Merged PRs (30d)
417

Description

Reproduction steps
  1. Open Zed with the Agent panel available.
  2. Ensure the Agent panel is visible but not focused.
  3. Invoke agent::Toggle.
  4. Observe that the Agent panel is focused, but remains visible.
  5. Invoke agent::Toggle again.
  6. Observe that the Agent panel is now hidden.
  7. For comparison, invoke outline_panel::Toggle when the Outline panel is visible but not focused. It immediately hides the panel on the first invocation.
Current vs. Expected behavior

Current behavior

agent::Toggle behaves like a combination of agent::ToggleFocus and a toggle:
• The first invocation focuses the Agent panel without hiding it.
• The second invocation hides the Agent panel.

This differs from other panel toggle actions such as outline_panel::Toggle, which immediately hide/show their respective panel on a single invocation.

Expected behavior

agent::Toggle should consistently toggle the visibility of the Agent panel:

• If the Agent panel is visible, the first invocation should hide it.
• If the Agent panel is hidden, the first invocation should show it.
• It should not focus the panel as an intermediate step.

Since agent::ToggleFocus already exists specifically for focusing the Agent panel, agent::Toggle should behave like the other Toggle actions and only control panel visibility.

Zed version and system specs

Zed: v1.16.3+stable.347.03e2e21e3094909e6f9cad7d92e6580b13d6f05f (Zed)
OS: macOS 15.7.7
Memory: 16 GiB
Architecture: aarch64

Attach Zed log file
Zed.log

Relevant Zed settings
settings.json

Relevant Keymap
keymap.json

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the agent::Toggle action and compare its behavior with outline_panel::Toggle and the existing agent::ToggleFocus action. Reproduce the visible-but-unfocused Agent panel case, then verify that one invocation hides it, one invocation shows it again, and focusing remains the responsibility of agent::ToggleFocus.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.