Skip to content

fix(nav): register HashtagFeedRoute on every tab's navigation stack#401

Open
dmnyc wants to merge 1 commit into
mainfrom
fix/hashtag-route-missing-destinations
Open

fix(nav): register HashtagFeedRoute on every tab's navigation stack#401
dmnyc wants to merge 1 commit into
mainfrom
fix/hashtag-route-missing-destinations

Conversation

@dmnyc

@dmnyc dmnyc commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Tapping a hashtag (e.g. #foodstr) in a note viewed outside the Home feed — inside a thread opened from Search or Notifications, or on a profile reached from those tabs — navigated to a blank screen with only a yellow ⚠️ warning icon and no explanation.

Root cause

HashtagFeedRoute's .navigationDestination(for:) was registered on only the Home feed tab's stack ($feedPath). ThreadView.push(_:) appends routes to whichever path binding it was handed, so a thread opened from Search hands it $searchPath; tapping a hashtag there pushed a HashtagFeedRoute onto a stack with no matching destination → SwiftUI's built-in "no destination registered" placeholder (the blank view + yellow triangle).

Compounding it, ProfileView's onHashtagTap was a no-op { _ in } on the Search and Notifications stacks and unset on the placeholder stack, so hashtag taps on profiles in those tabs silently did nothing.

Fix

  • Register .navigationDestination(for: HashtagFeedRoute.self) on the Search, Notifications, and placeholder stacks.
  • Parameterize hashtagFeedView(for:path:) by the destination path so a nested hashtag tap (a #tag inside a hashtag feed) pushes onto the correct stack instead of always $feedPath.
  • Wire the previously no-op onHashtagTap closures on those stacks' ProfileViews.

DMs don't route hashtags (separate known issue #329), so they're unaffected.

Fixes / supersedes

Test plan

  • Build succeeds, installed and ran on simulator
  • Tapping #foodstr in a note within a thread opened from Search / Notifications opens the hashtag feed (verified)
  • Hashtag taps on a profile reached from Search / Notifications route to the feed
  • Nested hashtag tap inside a hashtag feed stays on the same tab's stack
  • Home feed behavior unchanged

Tapping a hashtag (e.g. #foodstr) in a note viewed outside the Home feed
— inside a thread opened from Search or Notifications, or on a profile
reached from those tabs — pushed a HashtagFeedRoute onto a stack that had
no matching .navigationDestination, so SwiftUI rendered its built-in
"no destination" placeholder: a blank screen with a yellow warning icon.

Only the Home feed stack registered the destination. Register it on the
Search, Notifications, and placeholder stacks too, parameterize
hashtagFeedView(for:path:) by the destination path so nested hashtag taps
push onto the correct stack, and wire the previously no-op ProfileView
onHashtagTap closures on those stacks.

Fixes #400. Supersedes #365 and #259 (same missing-destination root cause).
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.

bug(nav): tapping a hashtag outside the Home feed shows a blank yellow-warning screen

1 participant