feat: start on a blank container — spawn with empty:true and no repo (skip clone, default worker image); Spawn UI enables blank spawn without repo selection

This commit is contained in:
2026-09-02 09:24:54 +00:00
parent c8cde3ff89
commit 0f245c9ee2
6 changed files with 105 additions and 28 deletions
+7 -1
View File
@@ -373,7 +373,13 @@ func (s *Server) handleSpawn(w http.ResponseWriter, r *http.Request) {
if !decodeBody(w, r, &body) {
return
}
if !validRepoPath(body.Repo) {
// Blank-container spawns carry no repo; everything else must look like
// group/project.
if body.Repo == "" && !body.Empty {
writeError(w, http.StatusBadRequest, "repo required (or set empty for a blank container)")
return
}
if body.Repo != "" && !validRepoPath(body.Repo) {
writeError(w, http.StatusBadRequest, "repo must look like group/project")
return
}