Dandelion is a fair source project. View the code on Github · See the design guide

Commits on Nov 13, 2026
adb59f8

Carousels scroll natively with CSS scroll-snap rather than Slick, which is gone from the CDN dependencies, so every page loads one script and two stylesheets fewer. A carousel is a .snap-carousel around a .snap-carousel-track row of .snap-carousel-item columns, the same Bootstrap columns setting three to a screen from 992px, two from 576px, then one: the row scrolls rather than wraps, snapping to the start of an item, with no scrollbar, smoothly unless reduced motion is asked for, and fewer items than fit sit in the middle. carousels.js adds the arrows, which page a screenful at a time and wrap round at the ends as Slick's did, and a dot per screenful, shown only while the items overflow; it runs through onContentLoaded, so the organisation page's carousels, loaded as pagelets, are set up too. Each carousel's own Slick script goes from events/_carousel.erb, its placeholder and organisations/_carousel.erb, as do the rules showing only the first items before Slick loaded (some of which were in ckeditor.css). A swipe now snaps item by item rather than a screenful. The design guide's Carousel says so

a1e8e6b

Don't let members create an activity already scheduled: POST /g/:slug/tactivities/create mass-assigned space_id and tslot_id (Tactivity's assignable_foreign_keys), so a confirmed member could forge a create that put an activity in a space and slot on a timetable where only admins schedule. tactivity_params (gatherings_helper.rb) drops them for anyone the schedule route wouldn't let schedule, and both the create and edit routes use it. Fixes #308

cbabd57

Fix the ticket price test: Cuprite's fill_in already blurs the field, and its onblur submits the form and reloads the price cell, so the send_keys(:tab) after it reached for a field that was gone (ObsoleteNode in CI, ElementNotFound locally). fill_in alone saves the price now, with a comment saying why

a5177ed

Limit how often requests anyone can make email the same address: at most 5 sign in codes an hour, and 10 bookings an hour by anyone not signed in as the buyer with its email confirmed. Nothing limited either, so anyone could flood an inbox with sign in codes (POST /accounts/sign_in_code, ?account_id= on sign_in_code_required! routes) or free tickets (the checkout form, or anonymous MCP checkout), and Rack::Attack only throttled bots on search. RecipientLimit (lib/security/recipient_limit.rb) counts by a hash of the address, not by IP, as a botnet's requests come from many, in Rack::Attack's Redis store, and limits nothing if Redis is down. send_sign_in_code returns false and sends nothing past the limit, and the pages that send one say so (the latest code still works); OrderBuilder raises TooManyBookings (429) after the duplicate check, so a duplicate warning and the booking confirmed after it count once. Signing up signs in before the email is confirmed, so being signed in alone doesn't exempt a booking. Tests keep Rack::Attack's counts in memory, cleared by reset!, and the docs say the booking limit, as claims the tests cover

1ca009e

Build event recommendations with one query for attendees: an account's first visit to /recommendations/events, before the nightly Event.recommend had cached its recommendations, called attendee_ids on every live, public, future event, one or two queries each (~980 spans, 6 seconds). Event.participant_ids_for_recommendations plucks all those events' paid tickets at once and groups them by event, and both recommend_events!'s default and Event.recommend use it. The recommendations routes build the cache holding RecordLock on the account, so a second request at once waits for the first's rather than building it again

1f51ae6

Convert currencies at fixed rates in tests: DandelionBank fetched Uphold's live rates (or Frankfurter's and CoinGecko's) the first time a test converted a price, so those tests needed the network, and failed without it (events/boosts on a network that throttled connections), and a converted price changed with the day's rates. FixedExchangeRatesInTests (test/setup/outside_services.rb) gives the bank a fixed table per 1 USD for the fiat currencies, BTC and ETH, from which it builds the cross rates and the stablecoins' as before, and refuses the fallback services. Tests that need rates of their own still stub Money.default_bank.get_rate. AGENTS.md lists what the app doesn't reach in tests

3067bd8

Browser tests don't reach the internet on page loads: test/setup/cdn_cache.rb pauses the browser's https requests with Ferrum's request interception and answers jsDelivr and Google Fonts from tmp/cdn_cache, each file downloaded once by URL over one connection per host (through HTTPS_PROXY when set), checked against frontend/integrity.json and served with Access-Control-Allow-Origin so integrity and crossorigin checks pass. Maps, Turnstile, Stripe.js and Iframely are refused at once (no test needs them: there's no captcha without RECAPTCHA_SITE_KEY, paying tests replace window.Stripe, rich text checks for iframely). Any other outside host still goes through, with a warning. This replaces the driver's url_blacklist, as Ferrum's blacklist handler sends every request it doesn't block to the network. CI keeps tmp/cdn_cache with actions/cache. A network that throttles new connections no longer fails jQuery's load, and with it every script on the page

728093a

Lock what a check counts before writing, so requests at once can't both take the last of something: RecordLock (lib/record_lock.rb) holds a lock on a record while a block runs, as a document in a locks collection whose _id names the record, taken with one atomic upsert (a held lock makes the upsert clash on _id, so it waits and tries again). A lock lasts 60 seconds, so one left by a process that died is taken over; a hold's locks share one 25-second wait, so waiting for the later ones can't outlast the earlier ones' leases; a thread can take a lock it holds again; and locks on several records are taken in the order given. It replaces the event's booking_lock_token and booking_locked_until, which only covered creating the tickets and needed fields on each model it locked.

A booking now holds its event, its discount code and the buyer's organisationship (OrderBuilder#booking_locks) from the quote to the order's discounts, so two at once no longer both spend the buyer's whole credit, on any of the organisation's events, or both take a code's last use, which an organisation's code shares across its events. The quote is checked again inside the locks, so a code used up since is refused rather than dropped, and a booking that waits too long is refused with OrderBuilder::Busy.

Optionships and memberships are validated and inserted holding their option's or gathering's lock (RecordLock.on_insert), so an option's capacity, a gathering's member limit and one membership each hold against joins at once. Option#full? counts an option over capacity as full, as a race could leave it, and Mapplication#accept marks an application accepted only once its membership is made, rather than leaving it accepted with none when the gathering filled up meanwhile.

test/bookings/capacity_races_test.rb races a buyer booking two events with the same credit, and two buyers for a shared code's last use (both fail with the event's lock alone); test/record_lock_test.rb tests the lock itself and that bookings and joins wait for it.

32c9fb6

Include concerns in concerns at module level, so Activity and LocalGroup's search_fields work again: Subgroup included Searchable inside included do, which ActiveSupport::Concern runs after extending the model with Subgroup's class_methods, so Searchable's search_fields (which raises) hid Subgroup's and GET /stats/atlas failed. Subgroup now includes SlugLookup, ImportFromCsv, SendFollowersCsv and Searchable as dependencies, and EventFields and OrganisationFields include EmailFields the same way. A new cop, Dandelion/ConcernInclude, flags one of our concerns (models/concerns) included inside included do; other modules, like Geocoder::Model::Mongoid, stay there

f25e791

Share what activities and local groups have in common: a Subgroup concern (models/concerns/subgroup.rb, beside Subgroupship) holds their slug validations, unchangeable organisation and account, search fields, admin?, pmails_including_events, event_tags and subscribed_accounts, and names their followers (subgroupships, subgroupship_name), so the helpers in subgroups_helper.rb no longer take the association. Their routes stay written out in each controller, with the lookup and permission check, and call new helpers for the longer bodies they shared: save_subgroup (create and edit; the form posts back to request.path), add_subgroup_follower, unsubscribe_from_subgroup, subgroupship_button, subgroup_followers_page, subgroup_pmails_page and subgroup_discount_codes_page. The admins box and subscribed switch are one partial each in activities_and_local_groups/. Behaviour is unchanged, including where the two differ: unsubscribing makes a non-follower an unsubscribed follower of a local group but not of an activity, and admins add activity followers with force: true

9f0ae4b

Grow textareas with what's typed in them through CSS's field-sizing: content rather than the autosize package, which is gone from the CDN dependencies. A textarea.autosize starts at --autosize-rows lines (1 for rows="1", 2 with no rows, as browsers show, or what text_area_block's new autosize: true sets from its rows), as field-sizing ignores rows; the fields autosize was called on by id (an option's, a timetable activity's and a tier's description, an organisation's terms and minimal head, the event and activity questions, an event's feedback questions, terms and notes, and comments) now take it, and their fixed heights and scripts go. The message box keeps the thread at its latest message through a ResizeObserver, as autosize:resized went. Browsers without field-sizing (Firefox before 152, Safari before 26.2) keep the starting height and scroll

544993f

Every route needs a test now: with the last ones covered, test/routes_without_tests.yml goes, and test_every_route_is_covered takes no exemptions

e370986

Test the WhatsApp webhook (test/integrations/whatsapp_test.rb): Meta verifies it with the verify token and nobody else can; a delivery not signed with the app secret is refused; only a site admin's voice messages are transcribed, not others', nor messages that aren't audio or have an odd media id; a site admin's is fetched, transcribed, tidied and sent back to them; a long one goes in numbered pieces of at most 2048 characters, split at paragraphs and at words in a long one; and a blank transcription is an error. Meta's Graph API and OpenRouter are faked. In the integrations CI group

9e37449

Test the site admins' diagnostics: /raise raises the message it's given, or with detail reports it with that context and answers; /raise_job's error comes from the job; /geolocate gives the address's city, or why it couldn't be found; and someone signed out or not a site admin is sent away from all three. They come off test/routes_without_tests.yml

e880352

Test the site admins' stats pages no test covered (test/stats_pages_test.rb): someone signed out and an account that isn't a site admin are sent away from all eighteen, and from a trace and a route's slowest one, seeing none of what they hold; a site admin sees each without an error, its messages, contributions and a trace's spans; only a site admin deletes old traces, and only those of releases before the one chosen; and a route's slowest trace opens, an unknown route's not found. RubyGems, npm and GitHub are faked for the packages page. They come off test/routes_without_tests.yml, which keeps only /raise, /raise_job, /geolocate and the WhatsApp webhook. In the general CI group

8c8ec8d

Show the charts page without the leading organisation's chart when there's none: Organisation.lead is LEAD_ORG_SLUG's organisation, and without one (an install that doesn't set it, or the organisation gone) the dominance chart called id on nil and the whole page was a 500

fb146c8

Give the account forms autofill tokens, so password managers and phones fill them in: username and current-password on sign in, username on asking for a sign in code and one-time-code on entering it (not inputmode numeric, as codes are base 36), and name, email, postal-code and country-name on sign up, the compact and minimal subscribe forms and editing an account. text_block and email_block take an autocomplete option for it, and the sign in and sign up tests check the tokens

307b91b

Switch the chat model to Claude Haiku 5.5 at low effort, and tighten the prompts it slipped on

On 14 recent prod prompts across 7 tasks, Haiku 5.5 cost about a quarter of gemini-3.8-flash and took about half as long (median 1.7 s against 4.0 s), and made less up in feedback summaries and reports. Gemini 4 Hydrogen (about 7x Flash's cost, reasoning that can't be turned down) and Opus 5.5 (about 9x) weren't better enough to pay for. Haiku's slips came from the prompts, so they now say:

  • Every event summary (location pages and the Daily): write only the text to publish, with nothing addressed to the asker, as Haiku opened a story with "Only one event was included in your list". The location vibe summary also says not to describe any one event, even if there's only one
  • Feedback summaries (accounts, activities, organisations): say only what the feedback says, leave out criticisms, describe what attendees valued where it doesn't name them rather than crediting them with it, and add no notes to the asker
  • The improvement report: suggest only what the feedback points to, or reply NONE, which the view shows as there being nothing to improve, rather than inventing five suggestions from one compliment. It splits on the first "1." rather than the last, and the facilitator report's intro says up to 5
ea34ee9

Give each CI job a time limit, so a hung step fails in minutes rather than at GitHub's six hours: an orders group's checkout hung with nothing to stop it. Lint and coverage get 15 minutes, a test group 25, two attempts at its tests' 10 and setting up

e66a934

Escape messages rather than sanitising them as HTML: they're plain text, typed in a textarea, but message_html parsed them as HTML, so text after a < that looked like a tag (see