feat: onboarding overhaul — topics screen + first-post coach#464
Merged
feat: onboarding overhaul — topics screen + first-post coach#464
Conversation
New flow after profile: People suggestions → Topics → First post → Feed. - Topic screen fetches a curated 'trending' set and an 'all' set from feeds.nostrarchives.com (kind 30015) so users can pick hashtags via autocomplete or tap popular chips. Selections are saved through the existing InterestRepository / followHashtag path (kind 30015 interest set named 'Interests'). - First-post screen pre-fills #introductions and reuses the existing ComposeViewModel.publish flow. The feed subscription kicks off on screen entry so the feed is ready by the time the user finishes. - Skip handler on the People screen now calls finishOnboarding with an empty selection, so skippers still get a kind 3 event that at least self-follows — their own posts will show up in their feed.
The nonAppRoutes set is used to decide whether the post-process-death redirect-to-LOADING effect should fire. With ONBOARDING_TOPICS and ONBOARDING_FIRST_POST missing from the set, that effect treated them as regular app screens and kicked users from the topic/first-post screens to LOADING mid-flow.
Two onboarding polish fixes: - Topic selections were racing: createInterestSet launched a coroutine to publish an empty kind 30015, then a for-loop called followHashtag for each tag. Each followHashtag read the repo synchronously before the prior coroutines landed, so each call produced its own event with just one tag, and the later events with equal created_at did not overwrite the first one in the repo. Add a bulk followHashtags that takes a Set and publishes a single event with a proper title. - First-post bottom bar now matches ComposeScreen: during the send countdown, an Undo button cancels and a 'Post now (Ns)' button publishes immediately, instead of a single button that only canceled.
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
Rebuilds the new-account flow so users land in a populated, engaged feed instead of an empty room. Pairs with #463 (the fresh-signup empty-feed bug fix).
New flow: Profile → People → Topics → First post → Feed
feeds.nostrarchives.com(kind 30015). Autocomplete over 'all' filters client-side as the user types; popular topics render as chips. Selections are saved through the existingInterestRepository.followHashtagpath — a kind 30015 interest set named 'Interests' — so this reuses existing CRUD instead of introducing a parallel code path.#introductions\n\nand calls the existingComposeViewModel.publishflow. The countdown button doubles as a cancel during the send window. The feed subscription fires on screen entry so it is ready by the time the user posts or skips.finishOnboarding(emptySet)instead of bypassing it, so skippers still publish a kind 3 that at least follows themselves. This fixes a gap where skip users had no kind 3 at all until they manually followed someone from the feed.Files
viewmodel/TopicOnboardingViewModel.kt,ui/screen/OnboardingTopicsScreen.kt,ui/screen/OnboardingFirstPostScreen.ktNavigation.kt— two new routes + composables, rewired suggestion continue/skip, initRelays moved to first-post LaunchedEffectTest plan
EXISTING_USER_ONBOARDINGflow for returning users still works