0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 04:48:33 +08:00
discourse/lib/nested_replies.rb
Mark VanLandingham dc2d170a9f
FEATURE: Hot algorithm for nested replies (simple) (#41742)
Previously, nested replies offered only `top`, `new`, and `old`
ordering, so active discussions could not surface recently engaged
branches while keeping tree loading bounded.

This change adds default-off `hot` sorting backed by demand-driven
PostgreSQL snapshots and bounded branch preloading, preserves the
resolved fallback across pagination, and skips hot-cache work for small
topics or topics inactive for 30 days.
2026-07-20 10:56:05 -05:00

14 lines
527 B
Ruby
Vendored

# frozen_string_literal: true
module NestedReplies
CONVERSION_COMPLETED_CUSTOM_FIELD = "nested_replies_conversion_completed"
end
require_relative "nested_replies/ancestor_walker"
require_relative "nested_replies/hot_score_calculator"
require_relative "nested_replies/hot_score_queue"
require_relative "nested_replies/hot_score_cache"
require_relative "nested_replies/sort"
require_relative "nested_replies/tree_loader"
require_relative "nested_replies/post_preloader"
require_relative "nested_replies/post_tree_serializer"