fix: binary asset serving + checkout centering #128

Merged
will.anderson merged 1 commits from fix/binary-assets-checkout-layout into dev 2026-05-12 01:11:00 +00:00
Owner

Summary

  • PNG/binary assets not loading: http_response() JSON-encodes the body via jb_emit_escaped() which stops at the first null byte. PNG files have null bytes at byte 8 (IHDR chunk length). Served 8 bytes → browser got corrupt image. Fix: binary side-channel in el_runtime.c — raw bytes stored in thread-local, sentinel in envelope, http_send_response() substitutes real bytes.
  • Checkout left-aligned: .checkout-shell, .checkout-summary, .checkout-form-wrap had no CSS. Added 2-col grid layout, max-width: 980px centering, sticky order summary, responsive collapse at 860px.
## Summary - **PNG/binary assets not loading**: `http_response()` JSON-encodes the body via `jb_emit_escaped()` which stops at the first null byte. PNG files have null bytes at byte 8 (IHDR chunk length). Served 8 bytes → browser got corrupt image. Fix: binary side-channel in `el_runtime.c` — raw bytes stored in thread-local, sentinel in envelope, `http_send_response()` substitutes real bytes. - **Checkout left-aligned**: `.checkout-shell`, `.checkout-summary`, `.checkout-form-wrap` had no CSS. Added 2-col grid layout, `max-width: 980px` centering, sticky order summary, responsive collapse at 860px.
will.anderson added 1 commit 2026-05-12 01:10:32 +00:00
fix: binary asset serving + checkout centering
Dev — Build & local smoke test / build-smoke (pull_request) Successful in 1m34s
5ce5f4a8be
el_runtime: http_response() JSON-encoded the body via jb_emit_escaped(),
which stops at the first null byte. PNG/binary files contain null bytes
at byte 8 (IHDR chunk length), so only 8 bytes were served — browsers
received a corrupt/truncated image and showed broken icons.

Fix: when _tl_fs_read_len > 0 (binary fs_read), copy raw bytes into a
thread-local side-channel (_tl_binary_body/_tl_binary_size) and write
the sentinel "__el_binary__" into the envelope body field. http_send_response()
detects the sentinel and substitutes the real bytes for sending.

checkout.el: .checkout-shell, .checkout-summary, and .checkout-form-wrap
had no CSS, leaving the page left-aligned and single-column. Added grid
layout (2-col desktop, 1-col mobile), max-width centering, and sticky
order summary.
will.anderson merged commit be849c608e into dev 2026-05-12 01:11:00 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron-web#128