discourse/lib/nested_replies
Rafael dos Santos Silva 0e03b4170f
FIX: Show suggested and related topics on nested replies view (#39473)
**Previously**, the nested replies view (`/n/:slug/:id`) was missing the
Suggested/Related Topics widget. The backend was still serializing
`suggested_topics`/`related_topics` on every initial page-0 response —
running the core suggested-topics query and the discourse-ai embedding
similarity query — but the frontend never rendered the data, so the cost
was entirely wasted.

**In this update**, `<MoreTopics>` now renders at the end of the nested
view, and the payload piggybacks `suggested_topics`/`related_topics`
only on whichever response has `has_more_roots: false` — mirroring the
flat view's lazy-load contract so the embedding query runs once, when
the reader has paginated through all roots.
2026-04-23 12:05:20 -03:00
..
ancestor_walker.rb
post_preloader.rb
post_tree_serializer.rb
sort.rb
tree_loader.rb