Skip to content

feat(onboarding): improvements#343

Merged
LiquidatorCoder merged 3 commits intomasterfrom
abhay/onboarding-improvements
Apr 8, 2026
Merged

feat(onboarding): improvements#343
LiquidatorCoder merged 3 commits intomasterfrom
abhay/onboarding-improvements

Conversation

@LiquidatorCoder
Copy link
Copy Markdown
Member

@LiquidatorCoder LiquidatorCoder commented Apr 8, 2026

Summary by CodeRabbit

  • New Features
    • Added AI-powered wallpaper generation to the onboarding experience, introducing a new step positioned between starter pack selection and first wallpaper choice.
    • Users can skip the AI generation step using the skip option.
    • Updated onboarding progress indicator to display all four steps of the onboarding flow.

…ponents

- Introduced F3AiGeneratePage for AI wallpaper generation, including prompt chip and preview area.
- Updated onboarding shell to include the new AI generation step.
- Enhanced state management to handle AI generation requests and responses.
- Modified progress indicators and helper texts to accommodate the new step.
- Adjusted background and progress indicator styles for consistency.
- Updated splash screen logic to support debug onboarding flow.
- Refactored JSON serialization for Pexels and Wallhaven DTOs for improved readability.
@LiquidatorCoder LiquidatorCoder self-assigned this Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c472a81f-e4b1-4a9f-bd3b-f543e4e9505c

📥 Commits

Reviewing files that changed from the base of the PR and between bc4f0d2 and c911cf8.

📒 Files selected for processing (11)
  • lib/features/onboarding_v2/src/biz/onboarding_v2_bloc.j.dart
  • lib/features/onboarding_v2/src/biz/onboarding_v2_bloc.j.freezed.dart
  • lib/features/onboarding_v2/src/biz/onboarding_v2_event.dart
  • lib/features/onboarding_v2/src/biz/onboarding_v2_state.dart
  • lib/features/onboarding_v2/src/theme/onboarding_layout.dart
  • lib/features/onboarding_v2/src/utils/onboarding_v2_config.dart
  • lib/features/onboarding_v2/src/views/onboarding_v2_shell.dart
  • lib/features/onboarding_v2/src/views/pages/f3_ai_generate_page.dart
  • lib/features/onboarding_v2/src/views/widgets/onboarding_background.dart
  • lib/features/onboarding_v2/src/views/widgets/onboarding_progress_indicator.dart
  • lib/features/startup/views/pages/splash_widget.dart

📝 Walkthrough

Walkthrough

A new AI wallpaper generation step is integrated into the onboarding V2 flow, positioned between starter pack and first wallpaper selection. The implementation includes BLoC event handlers for AI generation requests and completions, a new UI page with loading/success/failure states, configuration for AI styles and prompts, updated navigation and shell integration, and debug-forced onboarding support in the splash screen.

Changes

Cohort / File(s) Summary
AI Generation BLoC Logic
lib/features/onboarding_v2/src/biz/onboarding_v2_bloc.j.dart
Added event handlers for _AiGenerationRequested, _AiGenerationCompleted, _AiGenerationStepContinued; integrated AiGenerationRepositoryImpl and random AI prompt selection; modified onboarding flow to emit aiGenerate step instead of directly entering firstWallpaper; implemented AI generation with free trial charge mode; pre-populated wallpaper data on successful generation.
Generated BLoC Code
lib/features/onboarding_v2/src/biz/onboarding_v2_bloc.j.freezed.dart
Extended pattern-matching helpers (maybeMap, map, mapOrNull, maybeWhen, when, whenOrNull) for three new AI event variants; introduced OnboardingAiData model with prompt, style preset, status, and optional image URLs; added aiData field to OnboardingV2State with corresponding copyWith and pattern-matching updates.
Event & State Definitions
lib/features/onboarding_v2/src/biz/onboarding_v2_event.dart, lib/features/onboarding_v2/src/biz/onboarding_v2_state.dart
Added three new OnboardingV2Event factories for AI generation; introduced AiGenerateStatus enum (idle, loading, success, failure); added OnboardingV2Step.aiGenerate step; created OnboardingAiData Freezed model with initial factory; extended OnboardingV2State to require aiData field.
Configuration & Theme
lib/features/onboarding_v2/src/utils/onboarding_v2_config.dart, lib/features/onboarding_v2/src/theme/onboarding_layout.dart
Added debugForceOnboarding flag, AI style presets list, interest-to-style mapping, and prompt pool per style; reduced minInterests from 5 to 3; added four AI layout constants (aiChipX, aiChipY, aiPreviewX, aiPreviewY).
Onboarding Shell & Navigation
lib/features/onboarding_v2/src/views/onboarding_v2_shell.dart
Integrated F3AiGeneratePage into page list; added OnboardingV2Step.aiGenerate handling in CTA tap with computed target size; added auto-advance logic on successful AI generation; extended state listening to track aiData changes; updated progress indicator to 4 steps; added AI-specific UI text and status handling.
AI Generation UI Page
lib/features/onboarding_v2/src/views/pages/f3_ai_generate_page.dart
Created new F3AiGeneratePage widget with prompt chip display, animated preview switcher handling idle/loading/success/failure states, skip button, and cached network image loading with fallback error handling.
UI Component Updates
lib/features/onboarding_v2/src/views/widgets/onboarding_progress_indicator.dart, lib/features/onboarding_v2/src/views/widgets/onboarding_background.dart
Added totalSteps parameter to progress indicator (default 3) with dynamic inactive dot generation; refactored active dot offset computation to uniform spacing formula; added OnboardingV2Step.aiGenerate blur sigma mapping (40, same as interests).
Startup & Debug Onboarding
lib/features/startup/views/pages/splash_widget.dart
Introduced session-level _debugOnboardingShownThisSession flag to ensure debug-forced onboarding redirect fires at most once; modified _navigatePostBootstrap to respect OnboardingV2Config.debugForceOnboarding override when enabled.

Sequence Diagram

sequenceDiagram
    participant UI as UI/Shell
    participant Bloc as OnboardingV2Bloc
    participant Repo as AiGenerationRepository
    participant API as AI Backend

    UI->>Bloc: aiGenerationRequested(targetSize)
    Bloc->>Bloc: emit state with aiData.status=loading
    Bloc->>Repo: generate(prompt, stylePreset, targetSize, ...)
    Repo->>API: POST generate image request
    API-->>Repo: return imageUrl & thumbnailUrl
    Repo-->>Bloc: success with URLs
    Bloc->>Bloc: dispatch aiGenerationCompleted event
    Bloc->>Bloc: emit state with aiData.status=success
    Bloc->>Bloc: pre-populate wallpaperData
    Bloc-->>UI: state update with success
    UI->>UI: AnimatedSwitcher displays generated image
    UI->>Bloc: aiGenerationStepContinued() [auto or manual]
    Bloc->>Bloc: emit aiGenerate→firstWallpaper navigation
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • fix: critical fixes #320: Modifies onboarding V2 shell and navigation flow; the main PR integrates an AI generation step while the related PR adjusts the completion path logic, creating a potential interaction point requiring coordinated review.

Suggested reviewers

  • codenameakshay

Poem

🐰✨ A wallpaper blooms from silicon dreams,
AI brushes paint in onboarding streams,
Four steps now dance where three once stood,
From prompt to image, as it should,
Generation magic, swift and bright! 🎨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch abhay/onboarding-improvements

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 and usage tips.

@LiquidatorCoder LiquidatorCoder merged commit 4ed9c9e into master Apr 8, 2026
4 of 7 checks passed
@LiquidatorCoder LiquidatorCoder deleted the abhay/onboarding-improvements branch April 8, 2026 15:23
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Android App Size Report

Status: FAIL

Metric Base Head Delta
app-profile.apk 86,132,049 B (82.14 MiB) 103,897,701 B (99.08 MiB) 17,765,652 B (16.94 MiB) (20.63%)

Thresholds: max delta 1,572,864 B (1.50 MiB) OR 5.00%.

Top artifact bucket deltas (uncompressed bytes):

  • assets: +0 B (0.00 MiB)
  • bundle_metadata: +0 B (0.00 MiB)
  • dex: +0 B (0.00 MiB)
  • meta_inf: +0 B (0.00 MiB)
  • native_libs: +0 B (0.00 MiB)

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.

2 participants