docs: correct section 1.4 - the form endpoint is a build-time value, not runtime

The entry said to set PUBLIC_CONTACT_FORM_ENDPOINT in the ConfigMap. That
ConfigMap is not consumed by the Deployment, and a static Astro build inlines
PUBLIC_* at image build time regardless, so there is no runtime knob to set.
Record the build-arg wiring that replaced it and the two steps that still
need the owner: creating the Formspree form and adding the
CONTACT_FORM_ENDPOINT Actions secret.
This commit is contained in:
bmr_bluecap committed 2026-10-09 07:04:59 -04:00
1 parent 0f769d7bdd
commit 120ffb7445
1 file changed
+35 -7
+35 -7
View File
@@ -24,7 +24,7 @@ Status legend: `[ ]` open · `[x]` done · `[?]` needs verification · 🛑 owne
| `npm run build` | green, 21 pages, 0 errors / 0 warnings | | `npm run build` | green, 21 pages, 0 errors / 0 warnings |
| `npm run typecheck` | green, 28 files, 0/0/0 | | `npm run typecheck` | green, 28 files, 0/0/0 |
| `npm run seo:lint` | green, 21 pages clean | | `npm run seo:lint` | green, 21 pages clean |
| `npm run test:e2e` | **42 passed / 4 failed** (stale assertions, see §2.1) | | `npm run test:e2e` | **44 passed / 4 failed** (the 4 are stale assertions, see §2.1) |
| CI root cause | **found + fixed in-repo 2026-09-22** — see §1.2; needs a green run to confirm | | CI root cause | **found + fixed in-repo 2026-09-22** — see §1.2; needs a green run to confirm |
| Staging URL | **https://bcs.int.7tl-homelab.com** — LAN-only, valid cert (§2.6) | | Staging URL | **https://bcs.int.7tl-homelab.com** — LAN-only, valid cert (§2.6) |
| Old WordPress site | untouched and serving — must stay that way until cutover | | Old WordPress site | untouched and serving — must stay that way until cutover |
@@ -124,12 +124,40 @@ Two notes written for developers, not visitors, were being rendered:
Replaced the first with reader-facing copy and dropped the second (the deviation it described is Replaced the first with reader-facing copy and dropped the second (the deviation it described is
already recorded in `docs/content-deviations.md`). Commit `4e354d2`. already recorded in `docs/content-deviations.md`). Commit `4e354d2`.
### 1.4 Contact form has no endpoint 🛑 ### 1.4 Contact form endpoint — plumbing DONE 2026-09-23, needs your Formspree ID 🛑
`PUBLIC_CONTACT_FORM_ENDPOINT` is `""` in `k8s/configmap.yaml`, so the form falls back to a **Correction to the original entry:** it said to set `PUBLIC_CONTACT_FORM_ENDPOINT` in
mailto handoff. Inbound leads will be lost or awkward on day one. `k8s/configmap.yaml`. That would never have worked.
- [ ] Choose an endpoint (Formspree / webhook / ntfy / self-hosted) and set it in the ConfigMap. - The Deployment has **no `env`/`envFrom`** referencing that ConfigMap — it is dead config.
- [ ] Test a real submission end-to-end and confirm `/thank-you/` is reached. (`PUBLIC_SITE_URL` is in the same state; it only appears to work because the default baked into
- [ ] Confirm the delivery address is monitored. `astro.config.mjs` is already correct.)
- Even wired up it could not work: `output: "static"` means Astro **inlines** `PUBLIC_*` at image
build time, and the pod only runs nginx over pre-built HTML. There is no runtime knob.
**Done (commit `af4cc4a`):**
- [x] `Dockerfile` takes `ARG PUBLIC_CONTACT_FORM_ENDPOINT` / `PUBLIC_SITE_URL` → `ENV` before build.
- [x] CI passes `--build-arg` from a `CONTACT_FORM_ENDPOINT` Actions secret.
- [x] ConfigMap rewritten as documentation, with a warning not to add `envFrom`.
- [x] Submit posts in the background via `fetch()` and redirects to our own `/thank-you/` instead
of navigating to the provider's page.
- [x] Failure path: stays on the page, re-enables the button, shows the phone/email fallback.
- [x] Honeypot `_gotcha` (Formspree treats it as spam), positioned off-screen rather than
`display:none` so bots that skip hidden fields still fill it.
- [x] e2e covers the real fetch path (mocked endpoint, asserts the payload) and the failure case.
**Still needs you:**
- [ ] 🛑 Create the Formspree form for **info@bluecapstrategies.com** and confirm the address.
- [ ] 🛑 Add the endpoint as a Gitea repo Actions secret named **`CONTACT_FORM_ENDPOINT`**
(Settings → Actions → Secrets on `bmr_bluecap/bcs-website`), value
`https://formspree.io/f/<your-id>`.
- [ ] Push any commit touching `src/**` so CI rebuilds with the secret baked in.
- [ ] Verify on the staging URL: submit a real inquiry, confirm it arrives, confirm the browser
lands on `/thank-you/`.
- [ ] Confirm the destination inbox is actually monitored. A working form delivering into an
unwatched inbox is its own kind of failure.
**Degradation if the secret is missing:** the build still succeeds and the form falls back to
opening a `mailto:` draft. Survivable, but it fails silently for webmail users with no OS mail
client — so treat a missing secret as a launch blocker, not a warning.
### 1.5 Draft insight was being published and indexed ✅ FIXED 2026-09-23 ### 1.5 Draft insight was being published and indexed ✅ FIXED 2026-09-23
`src/pages/insights/[slug].astro` called `getCollection("insights")` unfiltered, so the `src/pages/insights/[slug].astro` called `getCollection("insights")` unfiltered, so the