Conversation
… shimmer - Remove pilot demo seed from production builds; add one-time migration to clear previously seeded fake progress for all users - Stop auto-showing completion sheet when reopening an already-complete lesson; completed lessons now replay from step 0 - Guard getSurveyResponses API sync behind auth check to avoid noisy auth errors and wasted requests for guest users - Reduce country detection location timeout from 10s to 5s - Downgrade nearby-view early-return log from warning to info - Show shimmer placeholders in the country tab row while dashboard data is loading instead of rendering an empty row
Replaces GET /api/v2/devices/kya/lessons with GET /api/v2/devices/learn/catalog. Adds LearnV2CatalogResponse model, LearnRepositoryImpl, and LearnSyncService for guest session management and offline progress buffering. Real lesson activities from the v2 API are now used in the experience widget when available, falling back to the demo script for any lessons without v2 content. Guest progress is reported fire-and- forget and buffered locally when offline for sync on reconnect.
- LSP/DIP: Add getCachedCatalog() to LearnRepository interface so KyaBloc no longer needs a downcast to LearnRepositoryImpl to access it. - DRP: Consolidate LearnQuizFormat <-> API string mapping onto the enum itself (apiKey getter + fromApiKey factory). Removes duplicate switch statements from LearnLessonExperienceService and LearnLessonExperience. - SRP: Extract _ProgressBuffer from LearnSyncService to separate offline buffering from session management and progress reporting.
- Sign-in: call LearnSyncService.linkProgressToAccount on AuthLoaded so guest progress transfers to the signed-in account. - kya_page: map LessonsRefreshing to its currentModel in catalog switch so the course grid stays populated during background refresh. - LearnRepository: fail-fast when AIRQO_API_TOKEN is absent in both fetchCatalog and _refreshInBackground instead of sending an empty token. - Quiz parsing: use _toInt() helper with int.tryParse fallback for correct_index/correct_indices/correct_order to tolerate string-typed values. - LearnSyncService: redact guest session ID from success log. - LearnSyncService: flush pending buffer before clearing guestId in linkProgressToAccount so offline completions are not orphaned. - LearnSyncService: URI-encode lessonId in the progress PUT path. - LearnLessonExperience: guard empty _script in build() to prevent RangeError when a v2 lesson has no activities.
Delete kya_repository.dart, kya_lesson_container.dart, lesson_response_model.dart. Strip buildFromLessons, buildDemoScript, courseCoverImage, syncLegacyApiProgress, ensurePilotLearnDemosV3, showLesson (legacy), and all apiLesson references. Update bloc tests to use LearnRepository / LearnV2CatalogResponse.
Remove const from non-const ColorFilter.mode in analytics_specifics.dart. Drop redundant null-coalesce on non-nullable return in feature_flag_service.dart.
DIP: add isOffline to LearnRepository interface so KyaBloc no longer instantiates CacheManager directly. DRP: extract _fetchAndCache/_getToken helpers in LearnRepositoryImpl to eliminate duplicated token+request logic between fetchCatalog and _refreshInBackground. DIP: introduce abstract LearnSyncService interface; rename impl to _LearnSyncServiceImpl so callers depend on the abstraction.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…and-dashboard-stability Fix/learn guest mode ux and dashboard stability
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.
Uh oh!
There was an error while loading. Please reload this page.