Skip to content

Claude/share button mobile bug 3aekma - #117

Merged
NeedToUpdate merged 4 commits into
devfrom
claude/share-button-mobile-bug-3aekma
Jul 20, 2026
Merged

Claude/share button mobile bug 3aekma#117
NeedToUpdate merged 4 commits into
devfrom
claude/share-button-mobile-bug-3aekma

Conversation

@NeedToUpdate

Copy link
Copy Markdown
Owner

No description provided.

NeedToUpdate and others added 4 commits July 19, 2026 15:18
posthog.capture batches events by default and relies on a periodic
flush (or a pagehide/navigation flush) to actually send them. The copy
link button doesn't navigate, so on mobile users tap it and immediately
switch apps to paste the link, freezing the page before the batch flushes
— and iOS doesn't reliably fire pagehide on app-switch, so the queued
share_created event was silently dropped. The email/linkedin/native
channels navigate or open a sheet, which flushes the queue on the way
out, so only copy was affected.

Send the event with { send_instantly: true } so it goes out on the tap
instead of waiting for the batch, across every channel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W8Zx2fvJxFSGKm9MpetRqg
ShareButton mints an opaque ?s=<id> on each share_created event, but
nothing recorded the other side of the funnel: someone opening a shared
link. Add a global ShareOpenedTracker in the root layout that, on the
initial document load (the moment the id is still on window.location),
fires share_opened with the same share_id — the join key back to the
share that produced the open — then removes s from the address bar via
history.replaceState so the id isn't re-shared, bookmarked, or
double-counted on refresh. Renders nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W8Zx2fvJxFSGKm9MpetRqg
@NeedToUpdate
NeedToUpdate merged commit f42ba15 into dev Jul 20, 2026
2 checks passed
@NeedToUpdate
NeedToUpdate deleted the claude/share-button-mobile-bug-3aekma branch August 2, 2026 02:39
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.

2 participants