Skip to content

Guest import - #365

Open
jzgom067 wants to merge 71 commits into
v0.5.0from
guest-account-import
Open

Guest import#365
jzgom067 wants to merge 71 commits into
v0.5.0from
guest-account-import

Conversation

@jzgom067

@jzgom067 jzgom067 commented Jul 9, 2026

Copy link
Copy Markdown
Member

This PR adds functionality for importing guest data into an account.

New Endpoints

There are 3 new endpoints to support this feature.

  • /guest-import/get-summary/ - Returns counts of events and availabilities belonging to the guest on the request.
  • /guest-import/get-data/ - Returns data about each event and availability a guest has submitted, along with any conflicts.
  • /guest-import/import-data/ - Given conflict resolutions, imports the guest data into the account.

Conflicts happen when a user has added availability to an event both as a guest and from their account. They can only choose one to keep, and the other is deleted upon importing. This information is also explained to the user on the import page.

New Pages

  • /settings/guest-import/ - Shows the user a summary of their guest data (if any is found), with a link to the import page.
  • /guest-import/login/ - Shows upon logging in if guest data is found, displays a summary and the option to import the data (which brings them to the import page).
  • /guest-import/import/ - Gives the user a chance to review the data they are importing and resolve any conflicts.

The login-triggered page has an option for "don't show this again", which saves a value to local storage if checked.

guest-import was also added to the reserved keywords list, making it forbidden as a URL code.

public_id Column Added to UserEvent

Events will eventually lose their URL codes when we implement archiving. In preparation for this, I added a public_id field to be able to identify events without a URL code. This public_id is just a UUID that auto-populates when creating an event, the same as the one on UserSession and EventParticipant.

"use client"; Directive Added

The drawer, dialog, and toast components didn't have this directive on them, which for some reason didn't let me use a Banner component in a server component.

FormDialog Updates

One change is the same one that was made to the ConfirmationDialog, where it will automatically convert to a drawer if used on mobile. This removed a few redundant asNestedDrawer props.

The other change is an added submitDisabled prop, which disables the submit button.

MessagePage Children Support

The children prop was added to the MessagePage, so any content could be displayed inside the layout.

@jzgom067 jzgom067 added this to the v0.5.0 milestone Jul 9, 2026
@jzgom067 jzgom067 added enhancement New feature or request cleanup Involves refactoring or small changes frontend Related to frontend stuff backend Related to backend stuff labels Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds UUID public identifiers to events and exposes guest summary, data, and import endpoints. The backend resolves guest sessions, reports conflicts, and transfers events and participations according to submitted choices. The frontend adds guest-import login, settings, review, loading, and conflict-resolution pages, along with API types and routes. Settings navigation, dialogs, client-component boundaries, guest-mode messaging, and login redirect suppression are also updated.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9e1d4743-7644-47e5-88c9-e69876e657b8

📥 Commits

Reviewing files that changed from the base of the PR and between 15c49ad and fc11d97.

📒 Files selected for processing (37)
  • backend/api/docs/utils.py
  • backend/api/event/utils.py
  • backend/api/guest_import/serializers.py
  • backend/api/guest_import/urls.py
  • backend/api/guest_import/utils.py
  • backend/api/guest_import/views.py
  • backend/api/migrations/0034_userevent_public_id.py
  • backend/api/migrations/0035_populate_public_id.py
  • backend/api/migrations/0036_apply_unique_constraint.py
  • backend/api/models.py
  • backend/api/urls.py
  • frontend/src/app/(auth)/login/page.tsx
  • frontend/src/app/dashboard/page-client.tsx
  • frontend/src/app/guest-import/import/loading.tsx
  • frontend/src/app/guest-import/import/page-client.tsx
  • frontend/src/app/guest-import/import/page.tsx
  • frontend/src/app/guest-import/layout.tsx
  • frontend/src/app/guest-import/login/page-client.tsx
  • frontend/src/app/guest-import/login/page.tsx
  • frontend/src/app/settings/(submenus)/guest-import/page.tsx
  • frontend/src/app/settings/loading.tsx
  • frontend/src/components/layout/message-page.tsx
  • frontend/src/features/account/setting-dialogs/change-password/main-dialog.tsx
  • frontend/src/features/account/setting-dialogs/delete-account.tsx
  • frontend/src/features/account/settings/sidebar-nav.tsx
  • frontend/src/features/drawer/components/base.tsx
  • frontend/src/features/guest-import/components/guest-summary.tsx
  • frontend/src/features/guest-import/constants.ts
  • frontend/src/features/selector/components/drawer.tsx
  • frontend/src/features/system-feedback/dialog/components/base.tsx
  • frontend/src/features/system-feedback/dialog/components/confirmation.tsx
  • frontend/src/features/system-feedback/dialog/components/form.tsx
  • frontend/src/features/system-feedback/dialog/props.ts
  • frontend/src/features/system-feedback/toast/context.ts
  • frontend/src/lib/utils/api/endpoints.ts
  • frontend/src/lib/utils/api/types.ts
  • frontend/src/middleware.ts
💤 Files with no reviewable changes (1)
  • frontend/src/features/account/setting-dialogs/change-password/main-dialog.tsx

Comment thread backend/api/guest_import/utils.py
Comment thread backend/api/guest_import/utils.py
Comment thread backend/api/guest_import/views.py Outdated
Comment thread backend/api/guest_import/views.py Outdated
Comment thread backend/api/migrations/0035_populate_public_id.py
Comment thread frontend/src/app/(auth)/login/page.tsx Outdated
Comment thread frontend/src/app/guest-import/import/page-client.tsx
Comment thread frontend/src/app/guest-import/login/page-client.tsx
Comment thread frontend/src/features/account/settings/sidebar-nav.tsx
Comment thread frontend/src/features/system-feedback/dialog/components/form.tsx
@jzgom067
jzgom067 requested a review from mirmirmirr July 10, 2026 01:36
@jzgom067
jzgom067 removed the request for review from mirmirmirr July 14, 2026 22:32
@jzgom067
jzgom067 requested a review from mirmirmirr July 14, 2026 23:03
@jzgom067 jzgom067 mentioned this pull request Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Related to backend stuff cleanup Involves refactoring or small changes enhancement New feature or request frontend Related to frontend stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant