From dc92f69f141ac70f9e599215c9446f73f18832c2 Mon Sep 17 00:00:00 2001 From: Jeremy McSpadden <211150+jeremymcs@users.noreply.github.com> Date: Sun, 30 Aug 2026 12:36:33 -0500 Subject: [PATCH 1/2] fix(site): keep dev CSS build reliable and pin Vercel build settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build.mjs --watch cleared dist/ and then relied on the Tailwind watcher to recreate styles.css, but the Tailwind CLI exits as soon as stdin reaches EOF — which is what it gets when the process runs detached. The dev server served the page with no stylesheet at all. - run a one-shot CSS build before starting the watcher so styles.css always exists, independent of whether the watcher survives - give the watcher an open stdin pipe rather than an inherited or ignored one - log when the watcher exits instead of failing silently The one-shot `npm run build` path used by CI and Vercel was unaffected. Also pins framework, build command, output directory and install command in vercel.json so the deployment does not depend on dashboard auto-detection. --- site/build.mjs | 20 ++++++++++++++++++-- site/vercel.json | 4 ++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/site/build.mjs b/site/build.mjs index cd4147d..835082c 100644 --- a/site/build.mjs +++ b/site/build.mjs @@ -47,10 +47,26 @@ fs.rmSync(DIST, { recursive: true, force: true }); copyStatic(); if (watch) { + // Build the stylesheet once up front. dist/ was just cleared, and the watcher + // below may take a moment (or fail) to produce it — without this the page + // serves with a 404 on styles.css. + const initial = spawnSync(tailwindBin, cssArgs, { stdio: "inherit" }); + if (initial.status !== 0) process.exit(initial.status ?? 1); + fs.watch(path.join(ROOT, "index.html"), () => copyStatic()); fs.watch(PUBLIC, { recursive: true }, () => copyStatic()); - spawn(tailwindBin, [...cssArgs, "--watch"], { stdio: "inherit" }); - console.log("watching — dist/ is live"); + + // stdin must be an open pipe we never write to or close. The Tailwind CLI + // watcher shuts down the moment stdin reaches EOF, which is what both + // "inherit" (when detached) and "ignore" (/dev/null) hand it immediately. + const watcher = spawn(tailwindBin, [...cssArgs, "--watch"], { + stdio: ["pipe", "inherit", "inherit"], + }); + watcher.on("exit", (code) => { + console.error(`tailwind --watch exited (${code}); css is no longer rebuilding`); + }); + + console.log("watching — dist/ is live on the files it has built"); } else { const result = spawnSync(tailwindBin, [...cssArgs, "--minify"], { stdio: "inherit" }); if (result.status !== 0) process.exit(result.status ?? 1); diff --git a/site/vercel.json b/site/vercel.json index bd5060c..871a8fc 100644 --- a/site/vercel.json +++ b/site/vercel.json @@ -1,5 +1,9 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", + "framework": null, + "buildCommand": "npm run build", + "outputDirectory": "dist", + "installCommand": "npm install", "cleanUrls": true, "trailingSlash": false, "headers": [ From 4ab2353ef20601b0cc7853e09602c56d8e59458a Mon Sep 17 00:00:00 2001 From: Jeremy McSpadden <211150+jeremymcs@users.noreply.github.com> Date: Sun, 30 Aug 2026 12:37:53 -0500 Subject: [PATCH 2/2] fix(site): point canonical URLs at the domain Vercel actually assigned MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The placeholder canonical, og:url, og:image, twitter:image, JSON-LD url, robots.txt sitemap line and sitemap.xml loc all pointed at patchdeck.vercel.app. That hostname is not ours: it serves an unrelated project called "PatchDeck — Visual Network Designer". Vercel assigned this project patchdeck-eta.vercel.app precisely because the plain name was taken. Left as-is it would have handed our canonical signal and link previews to a third party's site. Updates all eight references and records why the plain hostname must not be used. --- site/README.md | 11 +++++++++-- site/index.html | 10 +++++----- site/public/robots.txt | 2 +- site/public/sitemap.xml | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/site/README.md b/site/README.md index 572f365..a4c7cd4 100644 --- a/site/README.md +++ b/site/README.md @@ -61,8 +61,15 @@ project from the `jeremymcs/patchdeck` repository and set: ### One thing to change after the domain is set -The canonical URL currently points at `https://patchdeck.vercel.app/`. Once the -real domain is attached, update it in three places: +The canonical URL points at `https://patchdeck-eta.vercel.app/`, the alias Vercel +assigned this project. + +> Do not "correct" this to `patchdeck.vercel.app`. That hostname is taken by an +> unrelated project ("PatchDeck — Visual Network Designer") and is not ours; +> pointing the canonical, OG image or sitemap at it would hand our SEO and link +> previews to a stranger's site. + +Once a real domain is attached, update it in three places: - `index.html` — ``, the `og:url` / `og:image` / `twitter:image` meta tags, and the `url` field in the JSON-LD block diff --git a/site/index.html b/site/index.html index 343e589..44b71c3 100644 --- a/site/index.html +++ b/site/index.html @@ -9,22 +9,22 @@