Nice feature! However
I’m curious about the Top / New / Old sort more than the nested layout itself. I’ve shipped similar sort controls in my mobile app (a Discourse client) and would love to support this natively than my current method although it works as I’ll show below.
Looking at the source, I can see GET /n/{slug}/{topic_id}.json?sort={top|new|old}&page={n} returns the topic in nested view sorted by the chosen mode. My question: is there any appetite to expose just the sort through the existing /t/{slug}/{topic_id}.json endpoint (e.g. ?sort=top) so flat-view clients can benefit too?
If sort were available on flat view, third-party clients could opt in without adopting the nested view rendering model.
I realize the nested view’s data shape (root posts + lazy children) is what makes server-side sort tractable, and that flat view paginates differently. If a full flat-sort isn’t realistic for performance reasons, even an optional ?sort=top&limit=N would be enough to drive a “highlights” view.

