Skip to content

feat: onboarding overhaul — topics screen + first-post coach#464

Merged
barrydeen merged 3 commits intomainfrom
feat/onboarding-overhaul
Apr 17, 2026
Merged

feat: onboarding overhaul — topics screen + first-post coach#464
barrydeen merged 3 commits intomainfrom
feat/onboarding-overhaul

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

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

  • Topics screen — curated 'trending' and 'all' hashtag sets fetched from 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 existing InterestRepository.followHashtag path — a kind 30015 interest set named 'Interests' — so this reuses existing CRUD instead of introducing a parallel code path.
  • First-post coach — pre-fills #introductions\n\n and calls the existing ComposeViewModel.publish flow. 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.
  • Self-follow on skip — the skip handler on the People screen now calls 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

  • New: viewmodel/TopicOnboardingViewModel.kt, ui/screen/OnboardingTopicsScreen.kt, ui/screen/OnboardingFirstPostScreen.kt
  • Modified: Navigation.kt — two new routes + composables, rewired suggestion continue/skip, initRelays moved to first-post LaunchedEffect

Test plan

  • Fresh signup, pick 5 people, pick 3 topics, post intro → lands on a populated feed with #introductions visible
  • Fresh signup, skip people, skip topics, skip first post → lands on feed; own pubkey is in kind 3 (verify on njump.me)
  • Topic search: typing 'bit' surfaces bitcoin and related tags; popular chips toggle correctly
  • Topic continue publishes kind 30015 with d='interests' containing selected tags (verify on relay explorer)
  • First-post countdown can be canceled via the button during the 10s window
  • Pressing Back on Topics returns to Suggestions without crash
  • Existing-user login still routes to FEED and skips the new screens
  • EXISTING_USER_ONBOARDING flow for returning users still works

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.
@barrydeen barrydeen merged commit 973eadf into main Apr 17, 2026
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.

1 participant