Skip to content

move to production#3721

Merged
Baalmart merged 10 commits into
masterfrom
staging
Jul 1, 2026
Merged

move to production#3721
Baalmart merged 10 commits into
masterfrom
staging

Conversation

@Baalmart

@Baalmart Baalmart commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Mozart299 and others added 10 commits July 1, 2026 19:50
… 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
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 71d7497c-bc4d-4d6d-a7d5-ffb134578a53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Baalmart
Baalmart merged commit 016c6dd into master Jul 1, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants