# project_panel: Allow New File from an empty hidden-root project \(\#53947\) · gitcafe/zed

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

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

Visibility: public

Requested revision: eee6b4c56ce1b048daeebe5b503d3ad023d21c17

Requested commit: eee6b4c56ce1b048daeebe5b503d3ad023d21c17

Commit: eee6b4c56ce1b048daeebe5b503d3ad023d21c17

Tree: e61e221f460b04f8c3db4329f893dc6e971096ae

Author: Hamza Paracha

Committer: GitHub

## Message

```
project_panel: Allow New File from an empty hidden-root project (#53947)

This fixes #53869.

Creating a new file from the project panel background menu failed when a
single local project was empty and its root was hidden. In that state
there are no visible entries to seed `expanded_dir_ids`, so the action
returned early before opening the filename editor.

This initializes that state lazily from the root entry when creating a
new item, and adds a regression test for the empty hidden-root path.

Release Notes:

- Fixed creating a new file from the project panel context menu in empty
local projects
```

## Parents

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

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