Summary
Selector click / type_text on X’s [data-testid=tweetTextarea_0] can hang ~10s because readiness, stability, and captureActionState burn the messaging budget on a busy SPA. draft_fast_path already skips that stack when detected; it should be the reliable default for this compose surface.
Repro
- Context: Active tab on x.com with compose open (
[data-testid=tweetTextarea_0]).
- Steps:
- Call selector
click then type_text on tweetTextarea_0 without CDP.
- Observe wall time and success/timeout (~10s messaging budget).
- Observed: hangs or timeouts; with
draft_fast_path loaded, returns method: draft_fast_path in ≪10s (append quirks tracked separately).
Code pointers (verified against /workspace/FSB)
extension/content/actions.js — captureActionState (~L217; avoids full document.body.innerText); isDraftLikeEditable / shouldUseDraftFastPath / findDraftEditableRoot (~L2121–2155); type fast-path (~L2959–3008) returns method: 'draft_fast_path'; click fast-path (~L2408).
extension/content/messaging.js — tool dispatch / timeout budget (Unknown-tool and tool handlers).
- Local branch already contains draft_fast_path; harden detection + ensure always taken for
tweetTextarea_0.
Proposed fix
Treat data-testid=tweetTextarea_0 (and nested contenteditable) as always-fast-path on x.com/twitter.com: skip smartEnsureReady / waitForPageStability / heavy captureActionState for click+type. Keep CDP click_at/insert_text as the recommended alternate path in docs.
Acceptance / regression
- Selector click+type on compose completes well under 10s and reports
draft_fast_path.
- Non-Draft inputs unchanged (still use readiness/verify).
- Regression test or harness covering
shouldUseDraftFastPath for tweetTextarea_0.
Owner
extension
Priority: P1 · Owner: extension
Summary
Selector
click/type_texton X’s[data-testid=tweetTextarea_0]can hang ~10s because readiness, stability, andcaptureActionStateburn the messaging budget on a busy SPA.draft_fast_pathalready skips that stack when detected; it should be the reliable default for this compose surface.Repro
[data-testid=tweetTextarea_0]).clickthentype_textontweetTextarea_0without CDP.draft_fast_pathloaded, returnsmethod: draft_fast_pathin ≪10s (append quirks tracked separately).Code pointers (verified against /workspace/FSB)
extension/content/actions.js—captureActionState(~L217; avoids fulldocument.body.innerText);isDraftLikeEditable/shouldUseDraftFastPath/findDraftEditableRoot(~L2121–2155); type fast-path (~L2959–3008) returnsmethod: 'draft_fast_path'; click fast-path (~L2408).extension/content/messaging.js— tool dispatch / timeout budget (Unknown-tool and tool handlers).tweetTextarea_0.Proposed fix
Treat
data-testid=tweetTextarea_0(and nested contenteditable) as always-fast-path on x.com/twitter.com: skipsmartEnsureReady/waitForPageStability/ heavycaptureActionStatefor click+type. Keep CDPclick_at/insert_textas the recommended alternate path in docs.Acceptance / regression
draft_fast_path.shouldUseDraftFastPathfor tweetTextarea_0.Owner
extension
Priority: P1 · Owner: extension