Skip to content

tweetButton / Ctrl+Enter: debounce / single-flight to prevent twin posts #141

Description

@Trace824

Summary

A single automation click on the inline tweet/reply button (or equivalent Ctrl+Enter) has been observed to fire twice, producing twin posts. Send should be single-flight / debounced.

Repro

  • Context: Compose ready; click [data-testid=tweetButtonInline] (or reply tweetButton) via FSB click tools.
  • Steps:
    1. Issue one click (or one Ctrl+Enter press_key).
    2. Observe network/UI for duplicate post creation.
  • Observed: occasional twin posts from one logical send.

Code pointers (verified against /workspace/FSB)

  • extension/site-guides/social/twitter.jstweetButtonInline, tweetButton (~L47, ~L139–141).
  • extension/content/actions.js — click tool path; no send-specific single-flight found (likely area to add).
  • Existing debounce utilities elsewhere (e.g. extension/content/visual-feedback.js) are for overlay text, not tweet send.

Proposed fix

Wrap tweet/reply send clicks (and Ctrl+Enter on compose) in a short single-flight lock per tab so a second dispatch within N ms is ignored or coalesced.

Acceptance / regression

  • Double-dispatched click → one post.
  • Intentional second post after unlock still works.

Owner

extension


Priority: P2 · Owner: extension

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions