Use Ubuntu template fallback when devcontainer is missing#32
Merged
PabloZaiden merged 2 commits intoJul 8, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes devbox’s workspace config resolution so that when no repo devcontainer is detected (and no prior template state exists), devbox automatically falls back to the built-in ubuntu template, and surfaces that decision to users via CLI output and documentation.
Changes:
- Add
templateSelectionmetadata toResolvedWorkspaceConfigto distinguish explicit/state/fallback template selection. - Implement Ubuntu fallback behavior in
resolveWorkspaceConfig, and print a CLI message when the fallback path is used. - Update README and expand test coverage for missing-devcontainer and rebuild-without-state scenarios.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/examples.test.ts | Updates example flow tests to validate automatic Ubuntu fallback messaging and state reuse behavior. |
| tests/examples.live.test.ts | Updates live example test to assert the fallback behavior/message without --template ubuntu. |
| tests/core.test.ts | Adds/updates unit tests for templateSelection and Ubuntu fallback when no devcontainer/state exists. |
| src/core.ts | Introduces templateSelection on ResolvedWorkspaceConfig and implements the Ubuntu fallback path in resolveWorkspaceConfig. |
| src/cli.ts | Prints a user-facing message when resolveWorkspaceConfig indicates the fallback template was used. |
| README.md | Documents the new automatic Ubuntu fallback behavior for up and rebuild <port>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PabloZaiden
enabled auto-merge (squash)
July 8, 2026 14:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests