Track demo agent interactions in PostHog - #907
Draft
zahlekhan wants to merge 5 commits into
Draft
Conversation
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.
Summary
demo_agent_interactionevents across all four hosted demos, including one event per visible/comparevariantWhy
The hosted demos had no shared boundary for observing an accepted user turn. The docs-owned chat transports are invoked once after a user turn is accepted, while
/comparecaptures shared prompts before fanout so its hidden third controller is not counted. The final diff is entirely docs-scoped and does not modifypackages/**.Privacy and identity
Custom event properties exclude prompts, responses, generated UI, action payloads, GitHub usernames, action or tool URLs, thread IDs, user IDs, tool arguments, and raw errors. PostHog may still attach its standard page context.
Demo events use PostHog's existing anonymous distinct ID. The receiver-side bootstrap that preserves that anonymous identity through sign-in is already merged in thesysdev/composition#1609, allowing the console's canonical
posthog.identify(user.id)call to merge earlier demo activity into the authenticated profile.Validation
pnpm --filter @openuidev/docs types:checkpnpm install --lockfile-only --frozen-lockfile --offlinegit diff --checkKnown repository baseline
react-hooks/set-state-in-effecterrors in unchanged portions ofdocs/app/demo/github/page.tsx