Overview
Topic pages display potentially thousands of posts in chronological order. Instead of loading all posts at once, the system uses a chunk-based loading strategy that fetches posts in time-range batches.How It Works
- Legend request: Client fetches
GET /api/topics/{name}/posts/legendwhich returns year/month buckets with post counts - Initial load: Client requests the most recent chunk via
GET /api/topics/{name}/posts/chunk - Scroll loading: As the user scrolls, additional chunks are fetched by year/month
Legend Response
Chunk Request
Cache Layer
TopicTimelineCache pre-computes per (tag, post):
effective_date(resolved from multiple date sources)post_type,platform,visibility
Filtering
Both legend and chunk endpoints support:topic_filter: Filter by related topicstype_filter: Filter by post type or platformcreator_filter/exclude_creator_filter: Filter by creatorsort:ascordescby date