Remove deprecated legacy frontend code, UserProfile, and Twilio SMS#969
Draft
alexdlaird wants to merge 13 commits into
Draft
Remove deprecated legacy frontend code, UserProfile, and Twilio SMS#969alexdlaird wants to merge 13 commits into
alexdlaird wants to merge 13 commits into
Conversation
Frees the platform from legacy frontend support ahead of frontend-legacy shutdown on August 1, 2026. API surface - Drop legacy token endpoint, serializer, and longer-TTL token classes - Drop deprecated PUT on user profile and GET on user push token - Drop CourseSchedule-as-Events views and DELETE on CourseSchedule - Drop legacy CSRF/CORS origins, throttle scope, and PROJECT_APP_LEGACY_HOST - Drop FRONTEND_LEGACY_VERSION setting Models, services, tasks - Delete UserProfile model entirely (only held phone fields, all legacy) - Drop User.last_login_legacy field - Migration 0060 removes the model and field - Delete Twilio integration: phoneservice, send_text task, process_text_reminders - Drop twilio dependency from requirements.txt - Add deprecation comment to User.username explaining it stays only because Django's AbstractBaseUser requires USERNAME_FIELD CI - Drop legacy cluster-tests stages from release/deploy/build workflows
- Delete entire testcasecoursescheduleresourceviews.py (tested the CourseScheduleAsEvents views removed in this PR) - Delete test_get_push_token_by_id (tested the deprecated GET removed) - Update test_delete_course_schedule_by_id to expect 405 (DELETE method was removed; DRF now returns Method Not Allowed) - Drop UserProfile assertions from test_get_user (UserProfile is gone)
This reverts commit 7fd1a97.
Rename Django migration file from 0047_alter_reminder_type.py to 0048_alter_reminder_type.py and update the generated timestamp. Update the migration dependency from ('planner', '0046_alter_category_title_and_more') to ('planner', '0047_alter_category_weight_alter_course_credits_and_more') so the migration ordering remains correct.
Update migration dependency references to match renumbered/renamed migrations: change 0061 to depend on '0060_alter_user_username_and_more' (replacing the old 0059 reference), and update 0062 to depend on '0061_alter_usersettings_default_reminder_type' (was 0060). Keeps the migration chain consistent after migration renames/insertions.
Renamed migration file from 0051_alter_reminder_type.py to 0053_alter_reminder_type.py and updated its dependency from ('planner', '0050_alter_course_credits_and_more') to ('planner', '0052_alter_reminder_start_of_range'). Keeps the migration ordering consistent with the new dependency chain.
Switch the default PROJECT_LANDING_HOST to the www subdomain for non-local environments, import the strip_www utility, and add strip_www(PROJECT_LANDING_HOST) to CSRF_TRUSTED_ORIGINS and CORS_ALLOWED_ORIGINS so both www and non-www variants are accepted. Local fallback remains unchanged.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics -23 complexity · -25 duplication
Metric Results Complexity -23 Duplication -25
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #969 +/- ##
===========================================
- Coverage 86.82% 86.63% -0.19%
===========================================
Files 148 143 -5
Lines 8045 7747 -298
Branches 835 811 -24
===========================================
- Hits 6985 6712 -273
+ Misses 852 829 -23
+ Partials 208 206 -2 ☔ View full report in Codecov by Sentry. |
Resolve conflict in MaterialSerializer: include notes field from develop alongside material_group read-only from this branch. Renumber helium_auth migrations 0062→0063 (alter_usersettings_default_reminder_type) and 0063→0064 (remove_userprofile_and_last_login_legacy) to follow develop's new 0062_alter_useroauthprovider_provider.
Clarify reminder-related help text and alter user fields. Adds a new auth migration that tightens the User.username field (validators, unique error message, help text, max_length) and updates Usersettings.default_reminder_type help_text/default. Also updates the planner Reminder.type help_text in both the model and its migration to describe it as the notification channel for the reminder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes everything in platform marked deprecated for the legacy frontend, plus the
UserProfilemodel (only held phone fields) and the Twilio SMS integration. Lands alongside the Aug 1, 2026 frontend-legacy shutdown.The email-alias rework that originally lived on this branch was cherry-picked out and shipped independently on develop (commits e37a0ab..6599141) so the new frontend could ship the email-keyed wire format ahead of the cutover. Merging that develop work back in is what the latest merge commit does — both halves coexist correctly while legacy code is still here, and stand alone once legacy goes.
API
/auth/token/legacy/, deprecatedPUT /auth/user/profile/, deprecatedGET /auth/user/pushtoken/<pk>/CourseScheduleAsEventsviews and the deprecatedDELETEonCourseScheduleApiDetailViewuser_legacythrottle,PROJECT_APP_LEGACY_HOST,FRONTEND_LEGACY_VERSIONUserRateThrottle(the customhelium.common.throttles.UserRateThrottlewas legacy-only)PUTremoved,PATCH-onlyusernamefromUserCreateSerializer(auto-generated from email)material_groupmade read-only onMaterialSerializerPOPUP/TEXTreminder types, alias toPUSH, shrinkREMINDER_TYPE_CHOICESto(EMAIL, PUSH); import service forward-maps legacy type valuesModels / services / CI
UserProfilemodel andUser.last_login_legacyfieldphoneservice,send_texttask,process_text_reminders,text_remindersperiodic tasktwiliofromrequirements.txtUser.username(kept only becauseAbstractBaseUserrequiresUSERNAME_FIELD; auto-generated from email)run_legacy_cluster_testsand the cluster-tests stage fromrelease.yml/deploy.yml/build.ymlLinked PRs — do not merge before Aug 1, 2026
Merge in order — this PR last so the deploy doesn't 404 routes the legacy frontend is still calling:
Test plan
helium_auth/0061,helium_auth/0062,helium_planner/0051apply cleanly on a copy of prod dataPOST /auth/token/legacy/returns 404GET /planner/courseschedules/events/returns 404