Skip to content

v1.1.2 — three bug fixes from end-to-end install testing

Choose a tag to compare

@cashcon57 cashcon57 released this 12 Apr 02:18

Three bug fixes discovered while running the v1.1.1 wizard end-to-end against a fresh public repo (AgentBoard). All three would have hit real users; two were silently destructive.

Fixed

Bug 1: `setup.sh` account log was misleading for users with multiple Cloudflare accounts.

The script used `wrangler whoami | grep -Eo '[a-f0-9]{32}' | head -1` to determine the target account, which always returned the first account in the whoami table regardless of which account wrangler would actually use for the deploy. Users with a personal + business account on the same token would see a log line saying "deploying to account A" while the deploy actually went to account B. Worst case: a re-run without `CLOUDFLARE_ACCOUNT_ID` set would silently deploy to a different account than the original run.

Fix: the script now reads `CLOUDFLARE_ACCOUNT_ID` first (matching wrangler's own resolution order), falls back to whoami parsing only for single-account tokens, and fails fast with explicit instructions if the token has multiple accounts — refusing to guess which one the user wants. The error message prints the available accounts and tells the user to re-run with `CLOUDFLARE_ACCOUNT_ID= ./setup.sh`.

Bug 2: wizard would clobber existing `.env` files.

Phase 6 step 15 said "Create a local .env file" and a naive implementation would overwrite whatever was already there. Real projects almost always have an existing `.env` with framework config (VITE_API_PORT, EXPO_PUBLIC_, NEXT_PUBLIC_, database URLs, etc.). Any user running the wizard on an existing project would lose that content, and since `.env` is gitignored, there's no git history to recover from.

I hit this running the wizard on AgentBoard: clobbered an existing `VITE_API_PORT=3000` line before catching it via the 19-byte file size difference. Had to infer the original content from `.env.example` and restore it.

Fix: step 15 is now APPEND-ONLY with explicit rules — read the existing file first, check whether the Recall key is already set, stop and ask the user if the key is present with a different value, append cleanly with a comment header if missing, and never replace existing content. The step now explicitly explains WHY this matters in the wizard instructions so future rewrites don't reintroduce the bug.

Bug 3: `wrangler deploy` emitted `workers_dev` and `preview_urls` warnings on every fresh deploy.

Cosmetic but noisy, and confusing for first-time users who would read the warnings and wonder if something was wrong.

Fix: added both fields to `wrangler.toml.example` with explicit defaults (`workers_dev = true`, `preview_urls = false`) so new deploys are silent. The defaults match the intended behavior (deploy to the free workers.dev subdomain, skip preview URLs since Recall is meant to be bound to a stable URL).

Upgrading from v1.1.1

If your v1.1.1 install is working, you don't need to upgrade. v1.1.2 only changes `setup.sh` and the wizard prompt, not the deployed worker code. Your existing install is fine.

If you haven't run the install yet, use the v1.1.2 pinned URL in the install one-liner (below). All three fixes will apply automatically.

Multi-account Cloudflare users: the new setup.sh will fail fast if your wrangler token has more than one account. Pass `CLOUDFLARE_ACCOUNT_ID=` explicitly to pick which one.

Install

```text
Fetch https://raw.githubusercontent.com/cashcon57/recall/v1.1.2/SETUP_PROMPTS.md using Bash (curl -fsSL) so you get the raw markdown, not a summary. Verify it contains a section titled "Prompt 0 — First-time setup". Execute that section verbatim, step by step, adapted and optimized for my current project. Do not summarize. Do not skip. If the fetch fails or the section is missing, stop and tell me.
```

Or clone and run `./setup.sh`.

See CHANGELOG.md for the full entry.