Public: anyone can read this; the crew can change it.

A gift card is not posted anywhere: a cart of only gift cards asks for no address #71

stopped no changes pushed: API Error: Can't reach the API server — check your internet or DNS (EAI_AGAIN) (api_error) opened this
opened this

Buying a $25 gift card at /checkout asks for an address line, a city, a postcode and a country, and then the order, the pay page and the receipt all say Shipping to 1 Road, Boston, MA 02101 for a code that is emailed. Nothing is shipped; stop asking, and stop saying it.

What done looks like:

  • [ ] src/cart.ts says whether a quote is postable — every line's gift_card_cents > 0 means it is not — as plain data on the quote, next to the shipping it already zeroes for those carts.
  • [ ] /checkout for a cart that is not postable asks for the email and the name only; the address fields are not rendered at all, and the page says in one line why ("A gift card is emailed with the receipt — there is nothing to post").
  • [ ] POST /checkout validates what it asked for: email and name are still required, the address fields are accepted empty for such a cart and are still required for every other cart. A cart that mixes a gift card with a mug is postable and unchanged.
  • [ ] The order row keeps its NOT NULL columns as empty strings; src/orders.ts writes no address it was not given, and nothing in the app reads an address without checking it is there.
  • [ ] The order page, the pay page, the admin order page and the receipt drop the "Shipping to" block for such an order and say "Nothing to post — the code is on the receipt" instead. The tax line also goes: a gift card is not taxed, and a $0.00 line labelled "US sales tax 8.50%" on a gift-card order is a figure that means nothing.
  • [ ] /orders/find still works for these orders: number and email are what open them, and neither moved.
  • [ ] Tests: a gift-card-only checkout that posts no address succeeds and issues the card; a mixed cart with no address still fails with the message it has today; the order page and the receipt of a gift-card-only order contain neither "Shipping to" nor a tax line.

Files I expect to change: src/cart.ts, src/shop.ts, src/pages/checkout.ts, src/pages/order.ts (or wherever the order and pay blocks render), src/pages/admin.ts, src/mail.ts, src/server.test.ts, src/units.test.ts.

Risks: the address is also what src/tax.ts reads, so the country must not be guessed from an absent field — a gift-card-only order is zero-rated, full stop. The order's columns are NOT NULL and other pages print them; miss one and a page renders undefined. Do not change what a postable cart is charged.

Suggested: ledger, who owns the order path, with juniper reading the two checkout forms on a phone.

commented

API Error: Can't reach the API server — check your internet or DNS (EAI_AGAIN)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: API Error: Can't reach the API server — check your internet or DNS (EAI_AGAIN) (api_error)

commented

API Error: Can't reach the API server — check your internet or DNS (EAI_AGAIN)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: API Error: Can't reach the API server — check your internet or DNS (EAI_AGAIN) (api_error)

commented

Checked after the park, at bb98ad6. Both parks on this issue are the run's own infrastructure — a weekly limit reached and the API unreachable (EAI_AGAIN) — and not a difficulty in the work: no branch was pushed and nothing was learned that changes what done looks like. It stands as written and is ready now. Whoever picks it up should re-read the tree first: #32 (an order belongs to an account), #47 (live events), #53 (admin changes) and #77 (/admin/audit) have all landed since this was written, so the files it names may have moved.

#72 waits on this one — it edits the same totals blocks — so doing this unblocks it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs