Add templates API and launch wizard UI#3605
Merged
peterschmidt85 merged 13 commits intomasterfrom Feb 25, 2026
Merged
Conversation
Add POST /api/project/{project_name}/templates/list endpoint that serves
UI templates from an external git repo configured via DSTACK_SERVER_TEMPLATES_REPO.
Templates are YAML files under .dstack/templates/ in the repo, parsed into
typed pydantic models with a discriminated union for parameter types.
Results are cached with a 3-minute TTL using cachetools.TTLCache.
Currently returns only server-wide templates; project-specific templates
will be added in a future iteration.
Co-authored-by: Cursor <cursoragent@cursor.com>
Match codebase pattern for version-dependent HTTPBearer status codes. Co-authored-by: Cursor <cursoragent@cursor.com>
Added default project Template Choice as cards Default spot-policy filter for offers Fix small defects
Align backend and frontend with the updated template format: type "template" (was "ui-template"), name (was id), description (new), configuration (was template). Improve the launch wizard with proper env parameter handling ($random-password detection, copy-before-proceed validation, password input, info panel), clickable template cards with description and type sections, and renamed routes/labels. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace inline description with a short label, description text, and an Info link that opens a help panel with Cloudscape-styled external links to dev environments, tasks, and services concept pages. Co-authored-by: Cursor <cursoragent@cursor.com>
Resources step: GPU toggle (off by default) inside OfferList header with disabled prop to skip API/hide content when off. Generates resources.gpu:0 when disabled, passes backends only from user filter. Env params: respect $random-password, password input with copy-before- proceed validation, info panel, dynamic env variable name in YAML. Also: fix useFilters permanentFilters dep, add onChangeBackendFilter callback, FormToggle errorText support, configuration info panel with concept links. Co-authored-by: Cursor <cursoragent@cursor.com>
Rename directory, component, localStorage key, translation keys, and all references from the old dev-environment-specific naming to the generalized Launch naming. Co-authored-by: Cursor <cursoragent@cursor.com>
Show service readiness status with waiting states and the endpoint URL once the service is up and probes (if configured) have passed. Replaces the inline service URL in the General section. Co-authored-by: Cursor <cursoragent@cursor.com>
- Disable line wrapping in jsYaml.dump to preserve multi-line command formatting from templates - Handle numeric and object resource values (e.g. gpu: 0) in addition to string shorthand - Show empty placeholder for disabled offer cards Co-authored-by: Cursor <cursoragent@cursor.com>
olgenn
approved these changes
Feb 25, 2026
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
POST /api/project/{name}/templates/list) that loads UI templates from a configurable Git repo (DSTACK_SERVER_TEMPLATES_REPO) and serves them to the frontend.CreateDevEnvironmentpage with a new Launch wizard that supports all run types (dev environments, tasks, services) driven by templates. The wizard has four steps: template selection, resource/GPU pick, settings (name, IDE, env, image, repo), and YAML configuration review.Resourcesoptional.Example templates repo: https://github.com/peterschmidt85/dstack-templates
TODO
gateway: trueis configured but no gateway exists, show a banner (similar to "No fleets") with a link to the gateway documentation.Warning
Templates is an experimental feature.