From 3b8300f250f24ce8a1606cdf0a66c1ea7d6c9077 Mon Sep 17 00:00:00 2001 From: theetherGit Date: Thu, 26 Nov 2026 20:27:20 +0530 Subject: [PATCH] Dev shows the app's name and icon again: replace Sepal's older bundles In dev on macOS the host runs out of a throwaway bundle in node_modules/.sepal, so the Dock and the app switcher show the app's name and icon. Since apps became web builds, `calyx --bundle` only counted a bundle with Resources/index.html as its own, and refused to replace every bundle Sepal made before (Resources/app.js): "exists and was not built by Sepal; not replacing it". Dev then ran the bare host, and the Dock said "calyx", for anyone who had run dev before. The same refusal hit `pnpm bundle` over an older bundle. A bundle is Sepal's when its Resources has app.json next to the page or next to the old app.js. A test bundles over one in 0.2.0-alpha.0's layout; an .app Sepal did not make is still refused. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++-- crates/host/src/bundle.rs | 8 ++++++-- crates/host/tests/bundle.rs | 24 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 039e2fc..da45d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,8 +42,10 @@ Also: linux-x64-gnu 25.4 MB. Each must stay under 30,000,000 bytes; the release stops above that. - **`calyx app.js app.css` is gone.** `calyx dist` runs an app from its - folder, and `calyx --bundle` packs one that has an `index.html`. A bundle - made before this release is not replaced by mistake. + folder, and `calyx --bundle` packs one that has an `index.html`. It + replaces a bundle Sepal made, from this release or an earlier one (dev + keeps one in `node_modules/.sepal`, for the app's name and icon in the + Dock), and still never one it did not make. - **Relative `fetch` URLs resolve against `http://app.localhost/`**, the page's address, and the host answers that origin from the app folder: `GET` and `HEAD`, a content type by extension, a 404 for a missing file diff --git a/crates/host/src/bundle.rs b/crates/host/src/bundle.rs index 8a6ffb9..932ab8a 100644 --- a/crates/host/src/bundle.rs +++ b/crates/host/src/bundle.rs @@ -65,8 +65,12 @@ pub fn bundle_macos(dist: &Path, out: &Path, host: &Path) -> Result