zed icon indicating copy to clipboard operation
zed copied to clipboard

Search project files no longer works after "Open recent project"

Open KidkArolis opened this issue 1 month ago • 3 comments

Summary

Search project files (cmd + p) does not work after Open recent (cmd + opt + o).

Description

I typically open a recent project by clicking top left on the recent projects button and clicking some project. I then expect to be able to Cmd + P to jump to some file. This used to work well in the past as far as I can remember. But now, the focus is not in the right place for this to work. I have to first click in the center of the blank editor window and only then Cmd + P works.

Steps to reproduce:

  1. Open new window
  2. Cmd + option + O
  3. Pick a recent project
  4. Cmd + P

Expected Behavior: The "Search project files" opens. Actual Behavior: The "Search project files" does not open.

Zed Version and System Specs

Zed: v0.211.6 (Zed) OS: macOS 15.7.1 Memory: 24 GiB Architecture: aarch64

If applicable, attach your Zed.log file to this issue.

Zed.log

KidkArolis avatar Nov 09 '25 21:11 KidkArolis

Would like to a take a look at this.

Muktarsadiq avatar Nov 10 '25 12:11 Muktarsadiq

This seem to work for me:

https://github.com/user-attachments/assets/a48fce03-1874-4b80-a42e-bc24d438af2a

I wonder if you have any custom keybindings (maybe, even the system ones) that prevent this?

Can you please send the keymap you have, and press the bindings again with dev: open key context view open? What does that show?

SomeoneToIgnore avatar Nov 10 '25 12:11 SomeoneToIgnore

This is still an issue for me in latest Zed: v0.213.3 (Zed).

I didn't provide very good instructions on how to reproduce, here are more detailed steps:

  1. Open a new Zed window.
  2. Click the "Recent projects" button top left of the window.
  3. Pick a recent project to open
  4. Once open - check this project has no files open, no agent panel, only file tree and blank editor surface. If this project has a file open or agent panel open - this is not an issue. So close all of those if it's open, click into a different recent project, then go back into the previous recent project, etc. such that no extra bits are open.
  5. Now if you press Cmd + P - it does not bring up the command panel.
  6. Only if you click into the editor surface does it bring it up.

Here's a loom video with some comments inline - you can see that when I switch into a new project, Cmd + P does not work until I click on the editor surface: https://www.loom.com/share/ae1a52f1cedf47cf8b65a3f90286b84c.

Not sure my custom keymap.json is relevant, but here:

[
  {
    "bindings": {
      "shift-cmd-r": "pane::RevealInProjectPanel"
    }
  },
  {
    "context": "ContextEditor > Editor",
    "use_key_equivalents": true,
    "bindings": {
      "cmd-shift->": "agent::AddSelectionToThread",
      "cmd-shift-<": "assistant::InsertIntoEditor"
    }
  },
  {
    "context": "Editor && mode == full",
    "bindings": {
      "cmd-alt-y": [
        "buffer_search::Deploy",
        { "selection_search_enabled": false }
      ],
      "cmd-shift-enter": "assistant::InlineAssist"
    }
  }
]

KidkArolis avatar Nov 23 '25 20:11 KidkArolis

This seems to match what I just ran across opening a project from the command line.

"Recent Projects" is likely a red herring since I did not go through that path, but the part about no files or other panels open seems important.

Minimal steps to reproduce:

mkdir new_project_not_used_in_zed_before
zed new_project_not_used_in_zed_before

In this state Project Search (ctrl-shift-f) does not work. Neither does Search project files... (ctrl-p) or Execute a command... (ctrl-shift-p).

It works for non-empty directories too but a completely pristine directory for which Zed has no hidden state is likely the more stable path to reproduce.

My setup:

Debian 13 Zed 0.212.5 6f8b00ca21f8917f99c81518280b9f1b61ad83a1

abxy avatar Nov 25 '25 20:11 abxy

Sounds like cmd+shift+p and cmd+p are context/focus dependent. But the expectation I have I suppose is that I can always rely on being able to open them. That's how I action/navigate regardless of where my current focus might be or what panels are open.

KidkArolis avatar Nov 26 '25 10:11 KidkArolis