Skip to content

Reduce duplicate API requests across event management pages - #1314

Merged
daveearley merged 1 commit into
developfrom
perf/reduce-duplicate-requests
Aug 13, 2026
Merged

Reduce duplicate API requests across event management pages#1314
daveearley merged 1 commit into
developfrom
perf/reduce-duplicate-requests

Conversation

@daveearley

Copy link
Copy Markdown
Contributor

Performance

  • useGetEvent had staleTime: 5 (five milliseconds), so /api/events/{id} refetched on every route change and twice on first load. Removed, now uses the 60s default.
  • Added GET_EVENT_QUERY_KEY invalidation to the 15 product, category, image and occurrence mutations, since the event payload embeds those relations and nothing refreshed them before.
  • useGetOrganizer no longer fires /api/organizers/undefined (500) before the event loads, and no longer sets staleTime: 0, gcTime: 0.
  • Orders, attendees, waitlist and reports no longer fetch occurrences for non-recurring events.
  • Report date range is now day-aligned so the query key is stable across visits.

Event counts endpoint

  • New GET /events/{event_id}/counts returning lifetime order and attendee totals from event_statistics.
  • Sidebar badges use it instead of the full stats aggregate, which ran a per-day time series and only covered a 30-day window from the event start.
  • Counts invalidated on order cancel, mark-as-paid, attendee create and attendee modify.

Admin

  • New PUT /admin/accounts/{account_id}/verification (superadmin only).
  • Verification toggle on the account overview page. Previously is_manually_verified could only be set by Stripe sync.
  • Translations added for all supported locales.

Tests

  • Unit tests for the counts service and the verification handler.
  • E2E spec for the admin verification toggle.
  • E2E account fixture grants verification and a trusted messaging tier in SaaS mode, so the messages and email template specs run in both modes instead of failing.
  • Added saasOnly() alongside nonSaasOnly().

Check-in lists

  • Row actions split into an explicit open button and an actions menu, with test ids.

Adds a lightweight event counts endpoint for the sidebar badges, caches
the event and organizer queries properly, and adds a superadmin account
verification toggle.
@railway-app

railway-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

πŸš… Deployed to the Hi.Events-pr-1314 environment in Hi.Events

Service Status Web Updated (UTC)
Hi.Events Queue Worker βœ… Success (View Logs) Aug 13, 2026 at 6:13 am
Hi.Events Scheduler βœ… Success (View Logs) Aug 13, 2026 at 6:13 am
Hi.Events Frontend βœ… Success (View Logs) Web Aug 13, 2026 at 6:13 am
Hi.Events API βœ… Success (View Logs) Web Aug 13, 2026 at 6:12 am
1 service not affected by this PR
  • Maildev

@railway-app
railway-app Bot temporarily deployed to Hi.Events / Hi.Events-pr-1314 August 13, 2026 06:10 Destroyed
@daveearley
daveearley merged commit 8d020d5 into develop Aug 13, 2026
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant