how to replicate the duplicate post issue
click new post, write something
click the post button
before you're redirected, click new post again, repeat step 1
expected: idk
actual: lots of duplicate posts.
click new post, write something
click the post button
before you're redirected, click new post again, repeat step 1
expected: idk
actual: lots of duplicate posts.
Update from Ilya's review with ChatGPT.
For prevention, use a stable submission ID: retrying the same submission returns the existing post. Reconcile server success and clear the matching saved draft even if navigation interrupts the redirect. Cover restored local drafts and browser Back followed by a genuinely new post.
Add a conservatively normalized content hash as a second safeguard for restored drafts that receive a new submission ID. Preserve meaningful formatting, especially code; scope checks to the same author or Guest session, same thread/destination and a short time window. Looser near-matches should warn and link to the earlier post while allowing intentional publication.
Also verify whether Recent repeats rows for one post ID or shows separately created posts; we suspect actual duplicate submissions but have not confirmed every case.
For existing confirmed duplicate threads, keep the earliest published copy and reparent all replies into it, preserving reply IDs, authors, timestamps and nested reply relationships. Keep old thread and reply URLs working. Hide duplicate roots from normal feeds, retain their records and record original thread/parent relationships so the merge is reversible. Preserve reactions and other attached state. Automatically handle only clear cases; review uncertain matches before hiding anything.
Acceptance includes interrupted navigation, repeated clicks, restored drafts, intentional repeated content, and a reversible merge of duplicate threads that both have replies. This records the agreed work; no cleanup has been performed.