chore: remove missions and tours dead code - #108
Merged
Conversation
Remove HasDismissedMissions and CompletedTours from User entity, ProfileResponse, and all related commands, endpoints, and tests. These were used by the old onboarding system (missions checklist + driver.js tours) which has been replaced by an interactive flow. - Drop HasDismissedMissions and CompletedTours columns (migration) - Delete DismissMissionsCommand and MarkTourCompletedCommand - Remove PUT /api/profile/missions/dismiss and PUT /api/profile/tour endpoints - Remove related unit and domain tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
#108) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
…ck (#108) Aligns StreakFreezeAutoActivationService.LoadRecentCompletionsAsync with UserStreakService.LoadStreakDataAsync by filtering out soft-deleted habits when computing recent completions, so a deleted habit's log can no longer count as activity for a date and suppress the auto-freeze. Adds DB-backed tests locking the LoadRecentCompletionsAsync contract for soft-deleted and live habit logs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
#108) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
* feat(api): auto-activate streak freeze on inactive day (#108) Add a dedicated StreakFreezeAutoActivationService BackgroundService that auto-activates a streak freeze for a Pro user who held an active streak but logged nothing on their fully-elapsed local "yesterday". - Mirrors SlipAlertSchedulerService / HabitDueDateAdvancementService: poll interval, conservative UTC pre-filter, authoritative per-user TimeZoneHelper local-yesterday guard, single SaveChanges per tick. - Pro-only (matches ActivateStreakFreezeCommand). Spends one freeze per missed day, bounded by MaxStreakFreezesAccumulated (inventory) and MaxStreakFreezesPerMonth (monthly). - Presence-based: inserting a StreakFreeze row for the missed date preserves the streak on the next on-read RecalculateAsync; no direct streak mutation. - Idempotent: new SentStreakFreezeAlert guard entity (unique UserId+FrozenDate) plus the existing StreakFreeze unique index, both re-checked before spending. - Notifies via in-app Notification + push (IPushNotificationService); localized copy via LocaleHelper, mirroring GoalDeadlineNotificationService. - EF migration AddSentStreakFreezeAlert; account reset purges the guard table; registered in ServiceCollectionExtensions and BackgroundServiceHealthCheck. Unit tests cover the eligibility predicate, local-yesterday computation, interval default, notification copy, and the guard entity. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(api): remove manual streak-freeze activation (auto-only) (#108) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(api): exclude soft-deleted habits from auto-freeze completion check (#108) Aligns StreakFreezeAutoActivationService.LoadRecentCompletionsAsync with UserStreakService.LoadStreakDataAsync by filtering out soft-deleted habits when computing recent completions, so a deleted habit's log can no longer count as activity for a date and suppress the auto-freeze. Adds DB-backed tests locking the LoadRecentCompletionsAsync contract for soft-deleted and live habit logs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 4, 2026
* feat(api): auto-activate streak freeze on inactive day (#108) Add a dedicated StreakFreezeAutoActivationService BackgroundService that auto-activates a streak freeze for a Pro user who held an active streak but logged nothing on their fully-elapsed local "yesterday". - Mirrors SlipAlertSchedulerService / HabitDueDateAdvancementService: poll interval, conservative UTC pre-filter, authoritative per-user TimeZoneHelper local-yesterday guard, single SaveChanges per tick. - Pro-only (matches ActivateStreakFreezeCommand). Spends one freeze per missed day, bounded by MaxStreakFreezesAccumulated (inventory) and MaxStreakFreezesPerMonth (monthly). - Presence-based: inserting a StreakFreeze row for the missed date preserves the streak on the next on-read RecalculateAsync; no direct streak mutation. - Idempotent: new SentStreakFreezeAlert guard entity (unique UserId+FrozenDate) plus the existing StreakFreeze unique index, both re-checked before spending. - Notifies via in-app Notification + push (IPushNotificationService); localized copy via LocaleHelper, mirroring GoalDeadlineNotificationService. - EF migration AddSentStreakFreezeAlert; account reset purges the guard table; registered in ServiceCollectionExtensions and BackgroundServiceHealthCheck. Unit tests cover the eligibility predicate, local-yesterday computation, interval default, notification copy, and the guard entity. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(api): remove manual streak-freeze activation (auto-only) (#108) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(api): exclude soft-deleted habits from auto-freeze completion check (#108) Aligns StreakFreezeAutoActivationService.LoadRecentCompletionsAsync with UserStreakService.LoadStreakDataAsync by filtering out soft-deleted habits when computing recent completions, so a deleted habit's log can no longer count as activity for a date and suppress the auto-freeze. Adds DB-backed tests locking the LoadRecentCompletionsAsync contract for soft-deleted and live habit logs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(api): author feature-explanation markdown bundle (#84) Add eight grounded markdown explainer files (streaks, frequencies, gamification, paygate, schedule-math, freezes, notifications, ai-memory) so the in-app AI answers feature questions from code-accurate content. Each file carries a 6-key YAML frontmatter and a body whose constants are copied verbatim from AppConstants, LevelDefinitions, and the streak/schedule/paygate/reminder services. Ship the bundle inside the API binary via the first EmbeddedResource glob in the repo; resources embed as Orbit.Application.Chat.Content.FeatureExplanations.<key>.md, the documented loader contract for the downstream consumer. Refs thomasluizon/orbit-ui-mobile#84 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(chat): freezes.md describes auto-activation model (#108) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(chat): repoint freezes.md derived_from to auto-activation service (#108) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
HasDismissedMissionsandCompletedTourscolumns from Users tableDismissMissionsCommandandMarkTourCompletedCommandPUT /api/profile/missions/dismissandPUT /api/profile/tourendpointsCompanion to thomasluizon/orbit-ui#185 which replaces the old onboarding system.
Test plan
dotnet ef database updateto apply migrationGET /api/profileno longer returnshasDismissedMissionsorcompletedToursdotnet test)🤖 Generated with Claude Code