Skip to content

Build My Events with upcoming/past registrations and cancellation - #44

Merged
saitunguturu merged 2 commits into
mainfrom
codex/my-events-38
Nov 17, 2026
Merged

saitunguturu merged 2 commits into
mainfrom
codex/my-events-38

Conversation

@abhinav-bellapu

Copy link
Copy Markdown
Collaborator

👍 What's new in this PR

Closes #38.

Adds /my-events with the signed-in participant's registrations joined to workshop details, split into Upcoming and Past. Users can open each event and cancel an upcoming registration with an inline confirmation.

  • Uses the existing participant access gate and checks the current account before reads and cancellation. Queries and updates filter by participant ID; cancelled registrations are excluded while NULL attendance status remains active.
  • Cancellation preserves registration history by setting attendance_status = 'cancelled'. Failed or zero-row updates retain the event and show an error. Repeat clicks are blocked while saving.
  • Includes loading, overall/per-section empty states, retryable load errors, cancellation feedback, refresh, and keyboard focus management.
  • Upcoming includes today, ongoing multi-day events, and undated events; an event becomes Past after its final local calendar day. Upcoming is sorted soonest first and Past most recent first.
  • Redirects /my-workshops to the new page. Adds My Events navigation and links workshop names to their participant detail pages.

No database migrations or dependency changes.

Screenshots

Live hosted Supabase data using clearly labeled fictional test workshops.

Two active registrations:

My Events showing both registered test workshops

After cancelling Resume Workshop, only Networking Workshop remains:

Cancellation success and exactly one remaining registration

Mobile and Past section My Events at a measured 390 CSS pixel viewport with no horizontal overflow A completed event in Past without a cancel button

👍 How to review

Review lib/my-events.ts and tests/my-events.test.mjs first, then the new page/styles and navigation changes.

Validation completed

  • All 51 tests pass, including 12 My Events tests covering date boundaries/sorting, account-scoped requests, session changes, cancellation persistence, missing/past registrations, and failed/zero-row writes.
  • TypeScript, ESLint, Prettier, git diff --check, and next build --webpack pass.
  • Live browser acceptance, including the production build: registered the existing test account for two fictional events; confirmed both appeared; kept a registration through the confirmation's Keep action; cancelled one; verified only that card disappeared and stayed absent after reload; registered again successfully.
  • Temporarily moved the remaining test event's dates into the past, confirmed Past (1) with no cancellation control, then restored its dates. Verified the empty state after cancelling the remaining test registration, the legacy-route redirect, and no horizontal overflow at 390 CSS pixels.
  • Test registrations are all cancelled. The two labeled QA workshops and cancellation history remain available for reproduction; no existing workshop/profile data was changed.

Reviewer walkthrough: sign in, open a workshop and register, then follow My Events. Cancel and reload. Try Keep registration, re-register, and use Refresh events. With a past registration, confirm it is listed without a cancel action.

👍 Next steps

Uses the existing /workshops routes on main and does not require open #41. When #41 lands, participant browsing can use its /events routes. Reconcile the small profile/detail navigation additions when merging overlapping #33 and #41.

👍 Relevant links

@abhinav-bellapu

Copy link
Copy Markdown
Collaborator Author

@saitunguturu ready

@saitunguturu
saitunguturu merged commit 4ad9d84 into main Nov 17, 2026
2 checks passed
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.

My Events

2 participants