Skip to content

Fix blank page for new convention attendees after login#11787

Merged
nbudin merged 1 commit into
mainfrom
fix-new-user-profile-setup-blank-page
Jun 30, 2026
Merged

Fix blank page for new convention attendees after login#11787
nbudin merged 1 commit into
mainfrom
fix-new-user-profile-setup-blank-page

Conversation

@nbudin

@nbudin nbudin commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When a user logged into a convention site for the first time, appRootLoader correctly detected a missing profile, ran SetupMyProfile, and redirected to /my_profile/setup.
  • On that redirect, MyProfileForm.loader ran MyProfileQuery with the default cache-first policy. Because SetupMyProfile's mutation result is stored under setupMyProfile.my_profile, the Apollo normalized cache still had Convention.my_profile = null. A null reference is treated as a complete cache hit, so no network request was made. The loader returned a 404 response, which surfaced as a RouteErrorBoundary error (a cryptic [object Response] message) — effectively a blank/broken page instead of the profile setup form.
  • Fix: add an update callback to the SetupMyProfile mutate() call in appRootLoader. After the mutation succeeds, the callback patches Convention.my_profile in the normalized cache to reference the newly created UserConProfile entity. Subsequent cache-first queries then find a valid (but incomplete) reference and correctly make a real network fetch for the full profile fields, allowing MyProfileForm.loader to succeed and the form to render normally.

Test plan

  • Log into a convention site with an account that has no existing UserConProfile for that convention (first-time attendee)
  • Verify the profile setup form (/my_profile/setup) renders correctly after login instead of showing a blank page or error
  • Log in as a returning attendee (existing profile) and verify the normal login flow is unaffected
  • Log in as an attendee with needs_update: true and verify the profile edit form renders correctly

🤖 Generated with Claude Code

When a user logged in for the first time on a convention site, the
appRootLoader correctly detected a missing profile, ran SetupMyProfile
to create one, and redirected to /my_profile/setup. But on that
redirect, MyProfileForm.loader ran MyProfileQuery with cache-first and
got null back from the stale Apollo cache — the SetupMyProfile mutation
result was stored under setupMyProfile.my_profile, leaving
Convention.my_profile = null in the normalized cache untouched. A null
reference is treated as a complete cache hit, so no network request was
made. MyProfileForm.loader returned a 404, triggering the
RouteErrorBoundary with a cryptic "[object Response]" message instead of
the profile setup form.

Fix by adding an update callback to the SetupMyProfile mutate() call.
After the mutation succeeds, the callback patches Convention.my_profile
in the normalized cache to reference the new UserConProfile entity.
Subsequent cache-first queries then find a valid (but incomplete)
reference and make a real network fetch for the full profile fields,
letting MyProfileForm.loader succeed and the form render normally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nbudin nbudin added bug patch Bumps the patch version number on release labels Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
Overall Coverage 🟢 54.31% 🟢 54.31% ⚪ 0%

Minimum allowed coverage is 0%, this run produced 54.31%

@nbudin nbudin merged commit 7483f82 into main Jun 30, 2026
24 checks passed
@nbudin nbudin deleted the fix-new-user-profile-setup-blank-page branch June 30, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug patch Bumps the patch version number on release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant