0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/discourse-ai/test/javascripts/integration
Rafael dos Santos Silva cddde93979
FEATURE: Show gists in suggested and related topics (#36303)
Enables gist summaries to appear in suggested and related topics lists
at the bottom of topic pages. Previously gists were intentionally
excluded from these lists.

<img width="1180" height="620" alt="image"
src="https://github.com/user-attachments/assets/1becbcac-ecdd-48fc-bb42-8ffd69f3c002"
/>


  ## Changes

  - Remove skip list that filtered out suggested/semantic_related topics
- Enhance topic_query_create_list_topics modifier to handle both
ActiveRecord relations and Arrays (suggested topics are built as arrays)
- Add manual preloading for Array-based topic lists using
ActiveRecord::Associations::Preloader
  - Enable gist rendering on topic routes in ai-gist-connector
- Teach the gists service and ai-topic-gist component to read topic-side
related/suggested lists, always apply the AI table layout class when
Gists render, and add frontend test coverage
  - Add test coverage for suggested topics with gists

## Behavior

Gists now appear in suggested/related topics when users have the
expanded layout preference enabled, falling back to regular excerpts
when gists don't exist. Respects existing permission checks and avoids
N+1 queries through proper association preloading.
2025-12-01 12:12:55 -03:00
..
components FEATURE: Show gists in suggested and related topics (#36303) 2025-12-01 12:12:55 -03:00