Skip to content

fix: ignore submits while a commit is being posted - #759

Merged
xHeaven merged 2 commits into
dev-null-sh:productionfrom
Taldres:fix/ignore-submits-while-posting
Oct 20, 2026
Merged

xHeaven merged 2 commits into
dev-null-sh:productionfrom
Taldres:fix/ignore-submits-while-posting

Conversation

@Taldres

@Taldres Taldres commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #729

Problem

Submitting the composer twice in quick succession posted the commit twice. The submit button is disabled while posting, but Cmd+Enter calls requestSubmit() on the form and bypasses it. A held or repeated shortcut therefore sent several requests, and the server created one commit per request.

Change

CommitComposer now tracks whether a post is in flight (onStart / onFinish) and onBefore rejects further submits until it finishes.

Testing

  • Added a regression test in tests/Unit/ComposerDraft.test.tsx. It fails without the change.
  • Reproduced in the browser by calling requestSubmit() three times in a row on the composer form. Before the change this created several commits, after it exactly one.
  • Not covered: the quote and reply forms, and server-side deduplication of identical requests.

@xHeaven
xHeaven merged commit 42f2f64 into dev-null-sh:production Oct 20, 2026
5 checks passed
@Taldres
Taldres deleted the fix/ignore-submits-while-posting branch October 20, 2026 05:57
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.

sometimes commits are posted twice, did you also notice this bug in /dev/null?

2 participants