fix(cli): make blank template a full HTML document

The blank template was a bare `<div>` fragment without `<!DOCTYPE>`,
`<head>`, or `<body>`. This caused:
- Blank preview (bundler/runtime can't initialize from a fragment)
- "Failed to run lint" (parsing errors on the malformed document)

All other templates (swiss-grid, vignelli, warm-grain, play-mode) are
proper HTML documents — blank was the only outlier.

Also improves lint error reporting to show the actual error message
instead of the generic "Failed to run lint."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Ángel
2026-03-27 02:50:53 -04:00
co-authored by Claude Opus 4.6
parent 2915b68633
commit d52ea88df5
2 changed files with 70 additions and 44 deletions
+3 -2
View File
@@ -388,8 +388,9 @@ export function StudioApp() {
}
setLintModal(findings);
} catch {
setLintModal([{ severity: "error", message: "Failed to run lint." }]);
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
setLintModal([{ severity: "error", message: `Failed to run lint: ${msg}` }]);
} finally {
setLinting(false);
}