Skip to content

Stable account identity check: SideNav + Profile href must match before Reply/Post #135

Description

@Trace824

Summary

On x.com, the visible SideNav account and the account that actually publishes can diverge under multi-account session switching. Automation can click Reply/Post while the wrong account is active, producing an unintended author on the published post.

Repro

  • Context: Multiple X accounts signed in; AccountSwitcher available.
  • Steps:
    1. Open AccountSwitcher ([data-testid=SideNav_AccountSwitcher_Button]) and select account A; confirm Profile link path.
    2. Open a reply compose; wait or allow other UI activity.
    3. Click [data-testid=tweetButtonInline] / reply send without re-checking identity.
  • Observed: published author can be account B even when SideNav briefly showed A.
  • Example pattern: wrong-account status URL under a different handle than intended.

Code pointers (verified against /workspace/FSB)

  • extension/site-guides/social/twitter.jsSideNav_AccountSwitcher_Button, Profile/account menu notes (~L63, ~L152, ~L218); tweet buttons (~L139–143).
  • extension/utils/agent-tab-resolver.js — tab ownership (TAB_NOT_OWNED) — related multi-agent contention, not identity.
  • Likely area: new pre-send assert in content actions or a site-guide helper (no existing dedicated identity-guard symbol found).

Proposed fix

Before send: read SideNav account label + /<handle> Profile href (and optionally draft permalink context) and require match to a caller-supplied expected handle. Abort send on mismatch. Root cause is missing identity gate, not the tweet button itself.

Acceptance / regression

  • Mismatch aborts before click; match allows send.
  • Works across AccountSwitcher transitions when sessions are present.

Owner

extension (primary); mcp-server if expected-handle is a tool param


Priority: P1 · 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