fix(onboarding): restore search/OPML suggestions handoff loader and seed filtering - #960
Conversation
…eed filtering Show a real loading state while similar shows fetch, clear stale rows on back, exclude already-picked seeds from lanes, and tighten CTA/loader copy.
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughSummary by CodeRabbit
WalkthroughOnboarding suggestions now use shared presentation helpers, track and filter search or OPML seeds, avoid automatic recommendation subscriptions, clear suggestion state on back navigation, and update loading copy, CTA labels, artwork clipping, documentation, and tests. ChangesOnboarding suggestion flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant SearchOnboardingScreen
participant OnboardingViewModelSearch
participant OnboardingSuggestionsPresentation
participant AiSuggestionsScreen
User->>SearchOnboardingScreen: Start search or OPML suggestions
SearchOnboardingScreen->>OnboardingViewModelSearch: Generate recommendations
OnboardingViewModelSearch->>OnboardingSuggestionsPresentation: Reset state and apply seed filtering
OnboardingSuggestionsPresentation-->>OnboardingViewModelSearch: Return presentation state
OnboardingViewModelSearch-->>AiSuggestionsScreen: Update suggestion state
AiSuggestionsScreen->>OnboardingSuggestionsPresentation: Request loading copy and CTA label
OnboardingSuggestionsPresentation-->>AiSuggestionsScreen: Return presentation text
User->>AiSuggestionsScreen: Navigate back
AiSuggestionsScreen->>OnboardingViewModelSearch: Request navigation
Possibly related PRs
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (3 errors)
✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
Extract shared launchSimilarShowsFetch so the search and OPML handoffs no longer trip the new-code duplication gate.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
feature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingViewModelSearch.kt (1)
293-321: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftAdd hermetic ViewModel tests for both seed handoffs.
The new presentation-helper tests do not execute
generateRecommendationsFromSearchorgenerateRecommendationsFromOpml. Add JVM tests with fakes that verify seed subscription state, seed-row filtering, no automatic recommendation selection, retry reset behavior, and backend error behavior.As per coding guidelines, production ViewModel changes must add or extend hermetic JVM tests under
src/test.Also applies to: 356-372, 397-427, 457-473
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@feature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingViewModelSearch.kt` around lines 293 - 321, Add hermetic JVM tests under src/test covering both generateRecommendationsFromSearch and generateRecommendationsFromOpml using fakes. Verify seed subscription state, filtering seed rows, no automatic recommendation selection, retry-state reset behavior, and backend error handling for each handoff path.Sources: Coding guidelines, Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@feature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingSuggestionsPresentation.kt`:
- Around line 103-117: Update withClearedSuggestionPayload to reset all
reachedSuggestionsVia*Flow flags, including the search, OPML, and AI flow state,
alongside the existing suggestion payload fields. Add a regression test covering
a cleared seed flow followed by an AI suggestions transition, and verify
loadingCopy and finishCtaLabel use the AI-flow behavior rather than stale
seed-flow behavior.
In
`@feature/onboarding/src/test/java/cx/aswin/boxlore/feature/onboarding/OnboardingSuggestionsPresentationTest.kt`:
- Line 11: Add JVM coverage in OnboardingSuggestionsPresentationTest for
OnboardingSuggestionsPresentation.isError, asserting true for errors without
content and validating behavior for errors containing existing curriculum or
chart content; follow the test class’s existing setup and assertion patterns.
---
Outside diff comments:
In
`@feature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingViewModelSearch.kt`:
- Around line 293-321: Add hermetic JVM tests under src/test covering both
generateRecommendationsFromSearch and generateRecommendationsFromOpml using
fakes. Verify seed subscription state, filtering seed rows, no automatic
recommendation selection, retry-state reset behavior, and backend error handling
for each handoff path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4f72e258-5bd0-4687-9e43-c3ca924dd012
📒 Files selected for processing (9)
feature/onboarding/README.mdfeature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/AiSuggestionCards.ktfeature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/AiSuggestionsScreen.ktfeature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingSuggestionsPresentation.ktfeature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingUiModels.ktfeature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingViewModelAi.ktfeature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/OnboardingViewModelSearch.ktfeature/onboarding/src/main/java/cx/aswin/boxlore/feature/onboarding/SearchOnboardingScreen.ktfeature/onboarding/src/test/java/cx/aswin/boxlore/feature/onboarding/OnboardingSuggestionsPresentationTest.kt
Move similar-shows fetch into its own file to stay under TooManyFunctions, clear suggestion-flow flags when leaving search/OPML suggestions, and cover isError.
|



Summary
isAiLoading/isSynthesizingshow a real loader instead of an empty “No suggestions yet” state.Listener impact
What changes in the user’s life
After choosing shows in “I know my shows” (or OPML), continue now shows a clear “subscribed → finding more” loading screen, then optional similar shows that aren’t already picked — without stale cards flashing on back.
Test plan