Skip to content

Add conference switcher - #4775

Draft
patrick91 wants to merge 1 commit into
2026-08-06-add-login-pagefrom
2026-08-06-add-conference-switcher
Draft

Add conference switcher#4775
patrick91 wants to merge 1 commit into
2026-08-06-add-login-pagefrom
2026-08-06-add-conference-switcher

Conversation

@patrick91

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pycon Ready Ready Preview Aug 14, 2026 8:23pm

@claude

claude Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Adds a conference switcher to the dashboard sidebar: the backend now exposes a conference-scoped /dashboard/<code> route (redirecting from /dashboard to the most recent conference) and shares the conference list as Inertia props; the frontend renders a dropdown to switch between conferences.

Issues:

  • Unscoped conference listing: _conferences() returns all conferences and is shared with any authenticated user — the login_required decorator is the only gate, and the user test fixture used in test_dashboard_shares_authenticated_user etc. is is_staff=False. Previously the dashboard only showed a static "PyCon Italia 2026" label; now every logged-in site user (not just staff/organizers) can see the full conference roster including organizer names via /dashboard. Worth confirming this is intentional for this dashboard's current audience, or scoping the list to conferences the user has access to.

  • Route collision with reserved segment: dashboard/urls.py's <str:conference_code> converter matches any non-empty string, but pycon/urls.py lists path("dashboard/login", ...) before the include, so a conference with code="login" would be permanently unreachable at /dashboard/login (it would hit the login view instead). Minor/unlikely, but worth a code validator or reserved-word check if conference codes are user-editable.

  • Minor inefficiency: dashboard_index calls _conferences() (which does a select_related("organizer") fetch of every conference) purely to read conferences[0].code for the redirect. Since this runs on every hit to bare /dashboard, this could instead be a lightweight .values_list("code", flat=True).first()-style query.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.89%. Comparing base (177fb7e) to head (421f609).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           2026-08-06-add-login-page    #4775      +/-   ##
=============================================================
+ Coverage                      92.87%   92.89%   +0.01%     
=============================================================
  Files                            363      363              
  Lines                          11192    11211      +19     
  Branches                         896      898       +2     
=============================================================
+ Hits                           10395    10414      +19     
  Misses                           675      675              
  Partials                         122      122              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Shortcake-Parent: 2026-08-06-add-login-page
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