From 702888d3aacec1ab671b35176afc890976a8582d Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Fri, 1 May 2026 23:26:12 -0500 Subject: [PATCH] checkout: drop auth wall so payment form mounts on page load The auth-first flow blocked Stripe Elements from initialising for any visitor without an existing Supabase session. Users hit the checkout page, saw "Sign in to continue", and could not get to a card field at all. Restored the inline-JS path (HEAD before extraction broke it), flipped payment-section visible by default, kept the sign-in panel behind an explicit "Already have an account? Sign in" link. Build pipeline: added supabase_get stub injection and -lssl/-lcrypto linker flags (web_stubs.c uses EVP for the AES-256-GCM transport). Without those the Docker build aborts at link time. --- Dockerfile.stage | 12 ++++++++++-- build-local.sh | 22 +++++++++++++++++++--- src/checkout.el | 37 ++++++++++++++++++++++++------------- 3 files changed, 53 insertions(+), 18 deletions(-) diff --git a/Dockerfile.stage b/Dockerfile.stage index 0340cc7..744dee8 100644 --- a/Dockerfile.stage +++ b/Dockerfile.stage @@ -25,6 +25,14 @@ WORKDIR /build COPY runtime/el_runtime.c runtime/el_runtime.h ./ # ── Build neuron-web ────────────────────────────────────────────────────────── +# +# Inline-JS extraction (scripts/extract-js.py) is expected to run BEFORE the +# wrapper concatenates src/*.el into dist/main-combined.el. That side of the +# pipeline lives in build-local.sh (gated by EXTRACT_JS=1) and the outer +# orchestrator. By the time we reach this Dockerfile, main-combined.el +# already references /assets/js/.js and the corresponding asset files +# have been emitted under src/assets/js/. The COPY of src/assets at the +# runtime stage below is what ships those files into the container. COPY dist/web_stubs.c ./ COPY dist/bootstrap.py ./ COPY dist/main-combined.el ./ @@ -36,7 +44,7 @@ RUN python3 bootstrap.py main-combined.el > main.c && \ cc -O2 -rdynamic \ -o neuron-web \ main.c web_stubs.c el_runtime.c \ - -lcurl -lpthread -ldl -lm + -lcurl -lpthread -ldl -lm -lssl -lcrypto # ── Build soul-demo ─────────────────────────────────────────────────────────── COPY dist/soul-demo.c ./ @@ -45,7 +53,7 @@ COPY dist/vessel_stubs.c ./ RUN cc -O2 -rdynamic \ -o soul-demo \ soul-demo.c vessel_stubs.c el_runtime.c \ - -lcurl -lpthread -ldl -lm + -lcurl -lpthread -ldl -lm -lssl -lcrypto # ── Stage 2: runtime image ──────────────────────────────────────────────────── FROM debian:bookworm-slim diff --git a/build-local.sh b/build-local.sh index 84eb8ee..dbcd8cb 100755 --- a/build-local.sh +++ b/build-local.sh @@ -6,8 +6,12 @@ # and the soul dies with it. No separate process manager. No port conflicts. # # Usage: -# ./build-local.sh — build only -# ./build-local.sh --run — build and start both servers +# ./build-local.sh — build only (fast, leaves inline JS as-is) +# ./build-local.sh --run — build and start both servers +# EXTRACT_JS=1 ./build-local.sh — also extract inline