From d52ea88df541084421d5b9ccfc67d5ca9c05a99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Fri, 27 Mar 2026 02:47:53 -0400 Subject: [PATCH] fix(cli): make blank template a full HTML document MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The blank template was a bare `
` fragment without ``, ``, or ``. 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) --- packages/cli/src/templates/blank/index.html | 109 ++++++++++++-------- packages/studio/src/App.tsx | 5 +- 2 files changed, 70 insertions(+), 44 deletions(-) diff --git a/packages/cli/src/templates/blank/index.html b/packages/cli/src/templates/blank/index.html index d4f2bef91..2523ca026 100644 --- a/packages/cli/src/templates/blank/index.html +++ b/packages/cli/src/templates/blank/index.html @@ -1,44 +1,69 @@ -
- - + + + + + + + + + +
+ + -
+
+
- - -
+ + + diff --git a/packages/studio/src/App.tsx b/packages/studio/src/App.tsx index 999f88016..9e181b324 100644 --- a/packages/studio/src/App.tsx +++ b/packages/studio/src/App.tsx @@ -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); }