Fix Reddit/Instagram/Threads posting from captured DOM - #69
Merged
Merged
Conversation
Used the DOM captured on failure (sp_post.debug_html) to fix selectors against the real authenticated pages: - Reddit: new UI renders a <post-composer-title name="title"> web component and a Lexical <div data-lexical-editor contenteditable> body inside <shreddit-composer> — the old [data-testid=post-content] / DraftEditor selectors were dead. Target the real elements and type via keyboard (Lexical ignores programmatic fills). - Instagram: the session landed on /accounts/emailsignup (logged out) but the login-wall detector didn't recognize that URL, so it timed out instead of flagging reconnect. Detect emailsignup/signup now. - Threads: moved from threads.net to threads.com (old domain's cookies don't carry) — navigate to and build URLs on threads.com. Facebook left as-is: the captured page was a personal profile (profile.php) with no composer markers — a config/Page issue, not a selector we can fix blind. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using the authenticated DOM captured by #68 (
sp_post.debug_html), read via Supabase — real fixes, not guesses./r/SEO/submit/(logged in ✅)<post-composer-title name="title">+ Lexical<div data-lexical-editor contenteditable>in<shreddit-composer>. Old[data-testid=post-content]/ DraftEditor selectors are dead./accounts/emailsignupemailsignup/signup→ flagstoken_expired.threads.com/threads.com.profile.php?id=…(Also: my subreddit fallback correctly picked r/SEO for the content ✅, and Reddit was genuinely logged in — the failure was purely stale selectors.)
Verification
tsc --noEmitclean;tests/sp/*35/35page.content()); Playwright pierces open shadow roots at runtime, so this should work — but it's the one part not 100% verifiable from the HTML alone. If it still misses, the next failure re-captures and I refine.🤖 Generated with Claude Code