Skip to content

A comment posted twice within seconds is one comment - #520

Merged
serenakeyitan merged 1 commit into
mainfrom
fix/double-posted-comment
Sep 9, 2026
Merged

A comment posted twice within seconds is one comment#520
serenakeyitan merged 1 commit into
mainfrom
fix/double-posted-comment

Conversation

@serenakeyitan

Copy link
Copy Markdown
Collaborator

Closes #519.

  • Composer: one submit at a time (busy), button reads Posting…; ⌘+Enter and the button share the guard.
  • Mention field: an Enter during IME composition (isComposing / keyCode 229) is not a submit.
  • Both hosts: duplicateComment() — same author, same words, same spot (anchor text / aid / selector) or same parent, within 15 s → respond with the existing record plus duplicate_of. Shared helper, pinned by no-drift.
  • New offline test comment-dedupe.test.js; verified on the local server: two identical POSTs 200 ms apart → one comment, the second answered with duplicate_of.

Offline suite green.

🤖 Generated with Claude Code

Two identical comments 830 ms apart, on the same sentence, by the same
person: nothing stopped a second submit while the first was in flight,
and neither host looked for a twin. The composer submits once at a time
and says Posting…; an IME's Enter is not a submit; and both hosts answer
the second POST of the same words on the same spot within fifteen
seconds with the record already there.

Closes #519.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Preview

Open this: https://pr-520-tdoc-preview.jyshi1107.workers.dev/ — the homepage, this PR's code
carrying the landing version in this PR's checkout.
Or a document: https://pr-520-tdoc-preview.jyshi1107.workers.dev/d/conway-life/v/2

This link is unique to this PR. New commits update the same URL. It is not tdoc.dev.

Preview has no Durable Object — concurrent comments use the KV fallback. Data expires in 14 days.

@serenakeyitan
serenakeyitan merged commit 31617c1 into main Sep 9, 2026
5 checks passed
serenakeyitan added a commit that referenced this pull request Sep 9, 2026
The comment composer got its lock in #520; a reply typed under a card
went through a second form with none. Same lock, same Posting… label.

Refs #519.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A comment posted twice within seconds becomes two comments

1 participant