fix up with template#23
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request improves template-backed workspace support by standardizing where template-generated devcontainer configs are written, while preserving backward compatibility for legacy saved state/config paths. It also expands fixture coverage and adds tests validating the new/legacy path behavior.
Changes:
- Added explicit helpers for current vs. legacy template generated config paths and normalized path handling during state migration and workspace config resolution.
- Updated example-workspace test fixtures to automatically detect source config paths and added/expanded template-backed workspace tests (simulated + live).
- Added a new
examples/template-workspacefixture for template-only scenarios.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/core.ts |
Introduces new template generated-config path helpers and normalizes legacy paths during resolution/migration. |
tests/core.test.ts |
Adds coverage ensuring legacy template generated-config paths from saved state are normalized correctly. |
tests/examples.test.ts |
Updates simulated example tests/fixture setup to support template-backed workspaces without special flags. |
tests/examples.live.test.ts |
Adds a live test that validates starting a template workspace without a repo devcontainer. |
examples/template-workspace/sample-file.txt |
Adds a template-only example fixture file used by tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request improves support for template-backed workspaces, especially around the handling of generated configuration paths for templates. It introduces new helpers to distinguish between current and legacy template config paths, normalizes state when migrating or resolving workspace config, and adds comprehensive tests for these behaviors. Additionally, it updates and expands test coverage to ensure template-based workspaces function correctly, including new example fixtures.
Template config path handling:
getTemplateGeneratedConfigPathandgetLegacyTemplateGeneratedConfigPathhelpers to distinguish between current (.devcontainer.json) and legacy (template.devcontainer.json) generated config paths for template-backed workspaces. Also introducedresolveTemplateGeneratedConfigPathto normalize and resolve these paths as needed.resolveWorkspaceConfigandmigrateWorkspaceStateto use these helpers for consistent and correct path resolution, ensuring backward compatibility with legacy state files. [1] [2] [3] [4]Testing and fixtures:
template-workspace) and corresponding sample file for template-based scenarios.withoutDevcontainerflag. [1] [2] [3]Test updates and assertions:
Test imports and minor fixes: