Two coupled additions.
Task 1 — Per-thread sort selector
A sort selector on each comments page allowing the user to re-sort comments (top, best, new, controversial, old, qa) for that thread.
Task 2 — User preference for default comment sort
Separate from the feed sort preference, applied automatically when entering any comments page. The per-thread selector overrides for that page only.
Acceptance
Changing comment sort on one thread persists for that thread only via URL param; the user pref controls the default on all threads.
Two coupled additions.
Task 1 — Per-thread sort selector
A sort selector on each comments page allowing the user to re-sort comments (top, best, new, controversial, old, qa) for that thread.
src/views/comments.pug— model after the existing sort/view dropdowns insrc/views/index.pug:45-72sortparam throughgetSubmissionComments(id, params)insrc/geddit.js/comments/:idhandler atsrc/routes/index.js:64-97readsreq.query.sort, falls back to user pref, forwards to gedditTask 2 — User preference for default comment sort
Separate from the feed sort preference, applied automatically when entering any comments page. The per-thread selector overrides for that page only.
pref_commentSort(defaultconfidence— Reddit's "best")src/db.jsprefToColumnmap insrc/routes/index.jsget_user_prefshelper updatedsrc/views/dashboard.pugAcceptance
Changing comment sort on one thread persists for that thread only via URL param; the user pref controls the default on all threads.