Skip to content

devcontainer: Support .devcontainer.json in project root#48814

Merged
KyleBarton merged 3 commits intozed-industries:mainfrom
oliverbarnes:root-level-devcontainer-config
Feb 10, 2026
Merged

devcontainer: Support .devcontainer.json in project root#48814
KyleBarton merged 3 commits intozed-industries:mainfrom
oliverbarnes:root-level-devcontainer-config

Conversation

@oliverbarnes
Copy link
Contributor

@oliverbarnes oliverbarnes commented Feb 9, 2026

Closes #48683

Per the devcontainer spec, .devcontainer.json in the project root is
a valid config location. It is only used when no configurations are
found inside .devcontainer/.

Extract find_configs_in_snapshot for testability and add tests.

Release Notes:

  • Added support for .devcontainer.json in project root

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 9, 2026
Per the devcontainer spec, `.devcontainer.json` in the project root is
a valid config location. It is only used when no configurations are
found inside `.devcontainer/`.

Extract `find_configs_in_snapshot` for testability and add tests.
@oliverbarnes oliverbarnes force-pushed the root-level-devcontainer-config branch from a317f2a to 065f363 Compare February 9, 2026 20:04
@oliverbarnes oliverbarnes changed the title WIP devcontainer: Support .devcontainer.json in project root Feb 9, 2026
@KyleBarton KyleBarton self-assigned this Feb 9, 2026
@KyleBarton
Copy link
Collaborator

@oliverbarnes thanks for this! Just to check - is this ready for review? I see you changed the title, but the PR is still in draft.

@oliverbarnes
Copy link
Contributor Author

@oliverbarnes thanks for this! Just to check - is this ready for review? I see you changed the title, but the PR is still in draft.

@KyleBarton you're welcome! This is working and I've pushed it to signal it's in the works and almost ready, but I just wanted to give it another pass tomorrow with fresh eyes before opening for review. Will update first thing tomorrow (I'm in WET time)

@KyleBarton
Copy link
Collaborator

Awesome, take your time, just wanted to make sure you weren't waiting on us. Thanks again!

@oliverbarnes
Copy link
Contributor Author

Oh, ok :) Appreciated. I was worried you guys might also be working on it.

Giving it a fresh pass now, and indeed the order of precedence between the root and subfolder configs was swapped. I'm fixing it and consolidating changes a bit

Also, reuse `find_configs_in_snapshot` in the suggestion module
@oliverbarnes
Copy link
Contributor Author

Ok, fixed the precedence and included the root config in the picker. Ready for review!

@oliverbarnes oliverbarnes marked this pull request as ready for review February 10, 2026 12:57
Copy link
Collaborator

@KyleBarton KyleBarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Had a couple of nits on the comments, if you don't mind taking a quick look. Otherwise, thanks for a very clean and well-tested change!

@KyleBarton KyleBarton merged commit 094122a into zed-industries:main Feb 10, 2026
27 checks passed
@oliverbarnes oliverbarnes deleted the root-level-devcontainer-config branch February 10, 2026 21:18
morgankrey added a commit that referenced this pull request Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have
generated for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey added a commit that referenced this pull request Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have
generated for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey added a commit that referenced this pull request Feb 14, 2026
This is an experiment showing what the docs-suggest workflow would have
generated for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey added a commit that referenced this pull request Feb 14, 2026
Example output showing what the docs-suggest automation would generate
for the v0.224 preview release.

PRs analyzed:
- #48118: Forward ZED_ env vars to flatpak (no docs needed)
- #48467: Move update button to title bar (docs needed)
- #48553: Tool permissions refactor (docs exist, wrong format)
- #48592: vim :bdelete command (docs needed)
- #48814: Devcontainer root support (docs needed)
- #48912: Split diff default (docs needed)

5 of 6 PRs generated actionable suggestions.

Files:
- docs/.suggestions/v0.224-suggestions.md: Raw suggestion output
- docs/src/update.md: Update notification UI documentation
- docs/src/vim.md: Added :bdelete command
- docs/src/dev-containers.md: Root config file location support

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zed does not recognize .devcontainer.json file in the root of the project

2 participants