Skip to content

Use Ubuntu template fallback when devcontainer is missing#32

Merged
PabloZaiden merged 2 commits into
mainfrom
usar-template-ubuntu-como-fallback-si-no-1cd1042
Jul 8, 2026
Merged

Use Ubuntu template fallback when devcontainer is missing#32
PabloZaiden merged 2 commits into
mainfrom
usar-template-ubuntu-como-fallback-si-no-1cd1042

Conversation

@PabloZaiden

Copy link
Copy Markdown
Owner

Summary

  • Default devbox creation to the Ubuntu template when no devcontainer definition is detected
  • Wire the fallback through the CLI/core creation flow
  • Update README guidance and test coverage for missing-devcontainer scenarios

Tests

  • Added and updated core and examples tests covering the Ubuntu fallback behavior

Copilot AI review requested due to automatic review settings July 8, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 templateSelection metadata to ResolvedWorkspaceConfig to 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.

Comment thread src/core.ts Outdated
@PabloZaiden
PabloZaiden enabled auto-merge (squash) July 8, 2026 14:42
@PabloZaiden
PabloZaiden merged commit 0dce3d2 into main Jul 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants