Skip to content

Improve event dashboard loading and caching - #50

Merged
psam21 merged 1 commit into
mainfrom
fix/cached-event-dashboard
Aug 27, 2026
Merged

psam21 merged 1 commit into
mainfrom
fix/cached-event-dashboard

Conversation

@psam21

@psam21 psam21 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a 30-second in-memory cache for the 2026+ event breakdown and warm it asynchronously at handler startup.
  • Replace the year-discovery plus per-year queries with one grouped event aggregation query.
  • Add a validated /api/events endpoint for cache hydration and refresh status.
  • Show a clear loading state instead of a misleading zero-valued events table while the cache is cold.
  • Keep the last cached dashboard count visible during background refreshes.
  • Add regression coverage for year filtering and monthly, row, and grand totals.

Validation

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • go build -o /tmp/ns-relay ./cmd
  • node --check relay/web/static/script.js
  • git diff --check

@psam21
psam21 merged commit 30d98fa into main Aug 27, 2026
5 of 6 checks passed
@psam21
psam21 deleted the fix/cached-event-dashboard branch October 2, 2026 17:57
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