Optionalpage: numberProtectedmutateReconcile the realtime additions after a background revalidation.
refresh() empties extraDiscussions, because it routes through
clear(). revalidate() deliberately does not clear anything before it
asks the API, so it rebuilds pages and leaves extraDiscussions alone —
and the first page it gets back contains exactly the discussions realtime
put there, since a new post is what moved them to the top. Left unhandled
they render from both places at once, which is what a reader coming back
to an idle tab sees as a duplicate.
Only the ids the new pages actually contain are dropped. A revalidation
that failed resolves rather than rejecting and leaves pages untouched,
so clearing unconditionally would take realtime's additions off a list
that was never reloaded.
Get the parameters that should be passed in the API request. Do not include page offset unless subclass overrides loadPage.