Skip to content

List open online activities that are already under way - #3659

Merged
bernardhanna merged 1 commit into
masterfrom
feature/featured-include-ongoing
Sep 14, 2026
Merged

bernardhanna merged 1 commit into
masterfrom
feature/featured-include-ongoing

Conversation

@bernardhanna

Copy link
Copy Markdown
Collaborator

Summary

  • Gate the featured activities list on end_date alone, so activities that began earlier but have not finished are included
  • Group an activity that has already begun under the current month rather than the month it started in
  • Sort by that same effective start, so a long-running activity does not jump to the top of the list with an old date

Why

The month filter stopped at November 2026, which was correct: production has exactly one open-online activity starting in November and none after it.

Open-online, approved Count
Starting on/after 1 Sep 2026 218
Starting on/after 1 Nov 2026 1
Starting on/after 1 Dec 2026 0

Looking into it surfaced a real gap. baseQuery() required start_date >= firstOfMonth(), so any activity already under way was excluded even though the page describes itself as listing activities that welcome participants. Two open-online activities are currently in that position:

  • Target the Cube — 10 Oct 2021 to 31 Oct 2027
  • "How much water do robots drink?" project team members — 14 Feb 2026 to 14 Feb 2027

Grouping them by their real start month would have added stray past months to the filter, so effectiveStart() clamps an already-started activity to the current month.

Test plan

  • php artisan test tests/Feature/OnlineEventsWorkflowTest.php — 15 passed
  • New test: an activity running from 4 months ago to 6 months ahead is listed; one that ended last month is not
  • New test: that activity appears under the current month, and its original month is not offered in the filter
  • Verified against a local render — count rose by one and the filter gained the current month, not the start month
  • On deploy, confirm the "Showing X of Y" total rises modestly (a large jump would suggest activities with bad end dates)

Made with Cursor

The calendar required a start date in the current month or later, so a
long-running activity that began earlier was hidden even though it was still
open to participants. Two such activities run into 2027.

Gate the list on the end date instead, and treat an activity that has already
begun as starting now so it appears under the current month rather than adding
a past month to the filter.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bernardhanna
bernardhanna merged commit 5fd7c8d into master Sep 14, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant