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

Commits on Oct 12, 2026
33ba0dc

Re-enable RuboCop's Lint/AmbiguousOperatorPrecedence in erb_lint. Six sums that mixed + with * or / now bracket the multiplication or division, which Ruby already did first, so the results don't change.

c75f269

Re-enable erb_lint's CommentSyntax. Four ERB comments in gatherings/build.erb and questions/_questions.erb were written <% # rather than <%#, which can cause parser errors.

43fd601

Re-enable erb_lint's ParserErrors. error.erb's error image was missing the space between its class and src attributes. The event sidebar's buy button has a space after <% else %>, as the parser reads both branches' attributes as one run.

3dd5982

Run erb_lint in CI, failing at warning level like RuboCop (--fail-level W, as erb_lint 0.9 rejects the word "warning"), so templates are held to the same standard as Ruby files and RuboCop's convention cops don't fail them. The linters and warning-level cops that fail on existing templates are turned off in .erb_lint.yml, to be fixed and re-enabled one at a time; RequireInputAutocomplete stays off, as it forces an autocomplete attribute on every input. The config moves to .erb_lint.yml, the name erb_lint now expects, and allows the text/plain (held back until cookie consent), application/json and application/ld+json script types. Layout/LineLength and Style/FrozenStringLiteralComment overrides go, as .rubocop.yml already disables them.

3b387ef

AGENTS.md: start test runs in the background when the tool can, since test files take minutes and a foreground run blocks the session until it ends.

dbaa8eb

Save each test run's screenshots to capybara/

bfe49a9

Give factory ticket types a fixed quantity of 100. The quantity came from a sequence, so the first ticket type a test process made held one ticket: run on its own, "purchase does not warn when the account's earlier ticket was reassigned to someone else" got a 400 on its second purchase, which went over availability, and passed only when earlier tests had pushed the sequence up. Tests that depend on capacity already set it themselves.

96761fa

Give each test run its own database and port, so runs at the same time, in one checkout or several (e.g. agents' worktrees), no longer wipe each other's data or clash on port 8020. config/boot.rb names the database dandelion_test_

66c6697

Don't load irb and rubocop at boot. Bundler.require loaded both on every boot, production included, though the app uses neither: rubocop took ~390 ms and irb ~95 ms of a ~3 s boot. padrino console requires irb itself, and bundle exec rubocop loads rubocop.

91fda2f

Generate the Dandelion Daily without a request to our own server. late:errands warmed the cache with an XHR GET to BASE_URI/daily, as only a request could render _daily.erb's helpers. Daily.edition(date) (lib/daily.rb) now works out the day's article summaries and facilitator of the day and keeps them in a Stash under daily/

66aa398

AGENTS.md: check for absence with assert page.has_no_css? and friends, never refute page.has_css?, which waits 10 s to pass. After a click or submit, assert something on the new page first.

16ae069

Check that something is absent without waiting 10 s. refute page.has_css? (and has_link?, has_title?, has_content?) waits Capybara.default_max_wait_time for the element to appear, so each of these seven assertions took 10 s to pass; page.has_no_css? and friends return as soon as it is absent (~1 ms against 10,014 ms). The evergreen event test now waits for the redirect to the new event before checking, as the check would otherwise pass on the form.

3fed250

Hash passwords at bcrypt's minimum cost in test and development. At cost 12 each hash takes ~275 ms, and every account the test factory creates hashes a random password: webhooks_test spent 15.8 of its 39.6 s hashing (57 hashes) and accounts_test 21.4 of 75.6 s. Both files now run in 21 s and 56 s. Production keeps cost 12, and as each hash stores its cost, hashes made at either cost verify anywhere.

0bbad9f

Remove repomix. Delete repomix.config.json and drop repomix-output.xml from .gitignore. /stats/files read its ignore patterns from that config; it now ignores app/assets/javascripts/ext directly, the only pattern that could match, as the page lists only .rb, .erb and .js files.

5d392e7

Keep feedback ratings between 1 and 5

EventFeedback#rating took any integer, so anyone with a ticket could POST /events/:id/give_feedback with event_feedback[rating]=-1000000 and drag down the public averages of the event, its activity, organisation and facilitators. A rating of 1000000000 made the notification job build a billion-star subject line, and the average_rating.round.times loops in the views draw that many stars. Ratings must now be 1 to 5 or blank.

Claude-Session: https://claude.ai/code/session_01RCn7fFF18KgvP7adAWwY3N

1e68535

Note in AGENTS.md that sanitize_fields already strips markup from names

A security review reported raw names in dropdown_nav, ul_nav, activity blocks and the mention menu as stored XSS, missing that sanitize_fields strips tags and angle brackets from name, title and subject on every model before validation. The new Security reviews section says so, and asks for a write path that skips validation before reporting one.

Claude-Session: https://claude.ai/code/session_01RCn7fFF18KgvP7adAWwY3N

dfaa547

Stop forms setting a record's id, timestamps or deleted_at

mass_assigning let through any field a model didn't protect, and only some models list deleted_at, created_at, updated_at or _id. Event doesn't, so anyone event_admin? allows (facilitators, coordinators, cohost admins) could POST event[deleted_at] to /e/:slug/edit and soft-delete an event without the delete route's can_delete_event? check, notification or refunds. mass_assigning now drops these keys for every model. A test posts them to the event edit route.

Claude-Session: https://claude.ai/code/session_01RCn7fFF18KgvP7adAWwY3N

d6519f9

The image re-save test no longer needs ImageMagick, which the CI runner (ubuntu-24.04) lacks. Uploading the image ran identify, so the first save! failed with Image must be an image. The test now stores the image and sets its uid and dimensions directly, as an earlier upload would have, and is renamed to what it checks: saving an event does not read an image that is not new.

6705ee4

Measure an image only when it is new, so saving an event no longer downloads it. Event, Cohostship, Gathering and Organisation validations read image.width and image.height on every save, and validate_image_format read image.image? and image.format, each of which fetches the original from S3 and runs identify: POST /e/:slug/edit spent 400 ms to 1 s of its ~700 ms average (up to 1.4 s) in that gap before update events, with under 100 ms in queries. ImageWithValidation#image_new? (image_changed? or image_uid_changed?, which covers a duplicated event's copied uid) and #measure_image? (new, or width or height not yet stored) now gate the measuring and validate_image_format; the size checks still run against the stored dimensions. A test re-saves an event with the datastore's read stubbed to raise.

bd24d5d

Who can add and remove cohosts is now decided in one place each. Event.cohost_adder? (host organisation admins and event managers) and Event.cohost_remover? (revenue settings admins, including activity and local group admins) back the cohostship routes and the event page's add and remove controls, through the cached event_cohost_adder? and event_cohost_remover? helpers. organisations/_add checks organisations.exists? once. Tests check that the local group admin is redirected to the event and can't see emails, and that the event page hides the add control from activity and local group admins but shows it to host organisation admins.