Dandelion is a fair source project. View the code on Github · See the design guide
Commits on Nov 02, 2026
| c6ea9de |
Only round a small donation up to the currency's smallest unit when it goes to Dandelion. The checkout form raised any donation under £1 to £1, as the donation field's change handler was the same for both kinds, but the floor is for Dandelion's, which is taken as the payment's application fee and which OrderBuilder refuses below it (DonationTooSmall). A donation to the organisation is only added to the order's total, and agents could already give a smaller one, so the form now lets buyers do the same. An organisation's own minimum_donation is unchanged. |
| a7b9b98 |
Refuse a donation to Dandelion below the currency's smallest unit in OrderBuilder, so agents can't send one the checkout form wouldn't. The form rounds a smaller donation up to FiatCurrency.minimum_unit_amount (£1), but OrderBuilder only refused a negative one, so an agent could add 10p. It now raises DonationTooSmall before making anything, unless the payment method drops the donation anyway. Event#checkout_donation gives Dandelion's minimum, which the requirements tool lists, with required saying whether there must be a donation: an organisation's minimum requires one, while one to Dandelion is optional. create_checkout_tool tells the agent to ask the buyer whether to give at least that or nothing. |
| 7481248 |
Check for a mistyped email in OrderBuilder, so agents and embedded forms are asked too. The check (a domain one or two keystrokes from a common provider's, like gmial.com or hotmail.con) was only in purchase.js, which embedded forms skipped, as they can't use confirm(), and agents never ran. It moves to EmailTypos, the same domains and rules in Ruby, and OrderBuilder raises EmailLooksMistyped before making anything unless confirmed_email is passed, as it raises Duplicate unless confirmed_duplicate is. A signed-in buyer's email, or an API key's account's, is their own and isn't checked. The purchase action returns it as a 409 with mistyped_email, which the form confirms as it confirms a duplicate: with confirm() on the page, and embedded by pressing again. create_checkout_tool takes confirm_email, and its error tells the agent to check the address with the buyer. |
| 921e891 |
Show OrderBuilder's messages on the checkout form, rather than checking the same things in the browser. The purchase action returned only a status when OrderBuilder refused a booking, so purchase.js kept its own copies of the checks (tickets chosen, event and ticket group capacity, required checkboxes, terms, the phone number's country code) to say what was wrong, and anything they missed cleared the form for the error panel. It now returns OrderBuilder's message, which the form shows in its alert, turning the buttons back on to try again, as it already did for duplicates; only a response with no message (a 500, a malformed form) shows the error panel. The copies go, with the capacity config and data attributes only they read. The mistyped-email confirm, donation rounding and totals stay, as only the browser does them. |
Commits on Nov 01, 2026
| 301ea61 |
Join waitlists through WaitlistJoiner, from the event page and agents alike The event page's two waitlist forms and join_waitlist_tool each found or made the account and then the waitship. WaitlistJoiner does it for all three: it checks the waitlist is open (TicketTypeWaitship's own check, or Event#event_waitlist_open?) before finding or creating an account, so a refused request makes none, which the forms didn't do, and the event's own waitlist form no longer joins one that isn't open. As before, only the signed-in account has its name updated. Its errors give a reason, which join_waitlist_tool turns into what an agent can do instead. The forms keep their reCAPTCHA. Claude-Session: https://claude.ai/code/session_015HnU1N8yQJZmKADsqsfMV4 |
| a92ea6a |
Render the checkout form from what the requirements tool lists The checkout form and get_event_checkout_requirements_tool each worked out which buyer details, opt-ins, donation and waitlist the event offers. The form now renders from Event#checkout_buyer_fields, #checkout_opt_ins and #checkout_donation, which the tool lists, so neither can offer one without the other. The opt-in labels join names with "and", as the form did. checkout_donation says whether the donation goes to the organisation or to Dandelion (to), with its name, rather than only a name. Event#shows_event_waitlist? (sold out, with no ticket type waitlists) is the event page's condition for its sold-out card, and #event_waitlist_open? (unless the event hides its waitlist) the tool's event_waitlist and join_waitlist_tool's. Claude-Session: https://claude.ai/code/session_015HnU1N8yQJZmKADsqsfMV4 |
| a95adf0 |
Check the checkout form's choices in OrderBuilder, for the web and agents alike The checkout form checked most of what the buyer chooses in the browser, so the agent tool checked it again itself, and a request made without the form skipped it. OrderBuilder now checks it before making anything, and the MCP tool only translates its arguments and adds hints to the errors:
Claude-Session: https://claude.ai/code/session_015HnU1N8yQJZmKADsqsfMV4 |
| 6684d1b |
Bring agent checkout up to the web checkout form create_checkout_tool now takes what the checkout form does:
With an API key, phone, postcode and country in buyer now update the account, as the form updates the signed-in account's; buyer is kept to the fields the event's buyer_fields list. OrderBuilder says which account details are invalid rather than failing with a generic error. When the buyer has to finish on the event page, the error links to it with their choices filled in. The order returned lists its discounts, credit and donation. get_event_checkout_requirements_tool takes secret_ticket_type_id (listing the ticket type it unlocks) and discount_code (whether it's valid, what it takes off and which ticket types it applies to), and lists the donation on offer, whether the event takes codes, and which waitlists are open. The donation_required restriction goes, as agents can now add the donation. The new join_waitlist_tool joins a sold-out ticket type's waitlist, or the event's own once it's sold out, as the API key's account or the buyer given. Claude-Session: https://claude.ai/code/session_015HnU1N8yQJZmKADsqsfMV4 |
| 2b9c4b6 |
Let agents opt buyers in to organisers' emails and say how they heard about an event. create_checkout_tool takes opt_ins, the names get_event_checkout_requirements_tool lists (now from Event#checkout_opt_ins, which both read), refusing any the event doesn't offer, and hear_about in buyer when the event asks it, with an API key too, as it belongs to the order rather than the account. |
| fe198df |
Let agents book events without an API key. create_checkout_tool takes a buyer (name and email, and the other buyer_fields) and, without an API key, books for them as the checkout form books for someone signed out: OrderBuilder finds the account with their email, without changing it or spending its credit, or creates one. With a key it still books as that account and ignores buyer. Payment is the gate for paid tickets, and the web checkout is no more guarded. A retry with the same idempotency_key finds the order through the buyer's email, but without a key returns only its id and status, as knowing an email and a guessable key doesn't make the caller its buyer: the first call had its details and checkout_url. |
| 904fc0a |
Let agents book events through the MCP server. create_checkout_tool books fixed-price tickets as the API key's account through OrderBuilder, which checks who may book, what's on sale and any donation the event needs. The tool itself checks only what's particular to agents: quantities, answers to the event's questions (by index, as get_event_checkout_requirements_tool lists them, with selects kept to their options, stored as the checkout form stores them) and the terms, and that range and pay-what-you-want tickets go to the event page. Free bookings are confirmed straight away; paid ones return a checkout_url, only using payment methods where paying means following a link (the new redirect option on EventPaymentMethod, which GoCardless instalments leaves off, as it signs the buyer up to a monthly plan). An idempotency_key, saved with the order (OrderBuilder raises IdempotencyKeyTaken on the unique index on event_id, account_id and idempotency_key, which needs creating in the database), makes a retry return the first order: processing while it's set up, awaiting_payment, complete or expired, including one the hourly cleanup deleted. A failed attempt frees its key. Orders are marked as via mcp and store the key and checkout URL. The requirements tool also says which payment methods agents can use, which only apply when nothing is left to pay, and when the event needs a donation. |
| 0bd712f |
Refuse the bookings OrderBuilder shouldn't take, each with a message saying why. A minimum donation was only checked by Donation's validation, so a booking with no donation skipped it: OrderBuilder now raises DonationRequired below the event's minimum_donation (to the organisation). Ticket types for monthly donors (minimum_monthly_donation) were only refused by Ticket's validation, as an unexpected error reported to Sentry: TicketType#monthly_donation_too_low?, which that validation now uses, lets OrderBuilder raise MonthlyDonationRequired first. Order::NoTickets and Order::PaymentMethodNotFound, which also ended in the catch-all, become OrderBuilder's NoTickets and PaymentMethodUnavailable, destroying the order like its other errors. Each error has a MESSAGE, and NotAllowed carries its restriction and says what it means; PaymentFailed and an unexpected error no longer pass on the provider's or exception's own text, which still goes to the failed purchase email or Sentry. Order::UNPAID_HOLD names how long an unpaid order holds its tickets, for the hourly cleanup. |
| 3d08df4 |
Open the payment tab from an embed as Pay is pressed. Embedded, the checkout opened the provider's page with window.open only once the order came back, which browsers' popup blockers stop (Safari always), silently: the button kept spinning and the order sat pending. The form now opens a blank tab as Pay is pressed, for Stripe and the methods that redirect, sends it to the payment page when the order comes back, and closes it if the order fails or is a duplicate. It also shows a "continue to payment" link, in case that tab was blocked too or opened out of sight. |
| 7892c6a |
Check who may book in one place. Event#booking_restriction says why an account can't book an event (locked, monthly donors only, members only) or nil, built on Event#monthly_donor? and Event#activity_member?, which move from the purchase helpers; event admins can still book a locked event. OrderBuilder checks it for the signed-in account and raises NotAllowed (403), so the purchase action no longer checks it itself, and can_purchase_event_tickets? and the checkout gate read the same method. OrderBuilder also refuses a ticket type no longer on sale with SalesEnded before creating tickets: Ticket's validation already refused these, but as an unexpected error, reported to Sentry. |
| 0237bfc |
Move booking out of the purchase action into OrderBuilder. POST /e/:slug/purchase now turns the checkout form's fields into plain values (order_builder_args) and hands them to OrderBuilder (lib/order_builder.rb), which finds or creates the buyer's account, checks for duplicates, creates the order, tickets and donation, applies discounts and credit and hands over to the payment method, in the same order as before. Instead of halting it raises OrderBuilder errors (duplicate, banned email, ticket type not found, not enough tickets, invalid account, payment failed), which the action maps to the same responses as before, so other callers such as agents can book the same way. Only a malformed form becomes a 400: errors raised while OrderBuilder cleans up after a payment provider error still escape as before. Payment methods now take cohost and utm rather than the raw forms, as Stripe was the only one to read them. The action moves to orders.rb, beside payment_completed, and purchase.rb goes. |
| 90ff421 |
Show agents what booking an event involves. The MCP get_event_tool now returns an event's currency and public ticket types (pricing, price or range, tickets available, sold out, sales end), and a new get_event_checkout_requirements_tool describes the checkout form: whether the event can be booked and why not (sales closed, monthly donors only, members only, no public ticket types), buyer fields, questions, opt-ins, terms and the payment methods on offer, marking those like RSVP that only apply when nothing is left to pay (free_only). Both are read-only; booking still happens on the event page. Booking and application questions are now read by the new Questions.parse, which questions/_questions.erb renders from instead of its own copy of the question syntax, so the form and the tool read questions the same way. The markup is unchanged. |
| d521b7d |
Skip a screenshot folder another test run removed first. Two runs starting together both clean up finished runs' capybara/ |
| 09cb10b |
Update gems, chart.js, Sass, uv and GitHub Actions to the newest versions out of cooldown Gems: omniauth 2.3.1, omniauth-oauth2 1.10.0, sanitize 7.0.1, excon 1.8.0, mcp 1.8.1, rubocop 1.92.1, rack-test 2.3.0 and others. chart.js 4.6.1, Sass 1.106.1 (Bootstrap rebuilds identically), uv 0.13.5. Actions: codeql-action v4.39.1, claude-code-action v1.0.262, setup-uv v10.3.2, action-release v3.7.2, setup-ruby v1.335.0 |
| b692df5 |
Bump crass to 1.0.8, fixing its incorrect tokenization of bad URLs, which let CSS through Sanitize's sanitizer (Dependabot alert 345) |
| 2dd0dc5 |
Block the Maps API in browser tests. Tests have no Maps key, and Google's own scripts, which change weekly, threw on the edit profile page's map (map.js: Cannot read properties of undefined (reading 'setAttribute')), failing test_editing_profile through js_errors. Maps now show their could-not-load message, and the places.js tests fake the Places library as before |