Telemetry: Log userAgent in onboarding#32566
Conversation
Walkthrough
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant O as Onboarding Component
participant N as globalThis.navigator
participant C as Storybook Channel
U->>O: Mount / Render Onboarding
O->>N: read userAgent
N-->>O: userAgent string
rect rgba(200,230,255,0.25)
note right of O: emissions include userAgent in payloads
O->>C: emit("telemetry", { event: "...", userAgent })
alt onboarding completed
O->>C: emit("survey", { event: "onboarding:complete", userAgent })
end
end
note over O,C: completeOnboarding callback and telemetry useEffect depend on userAgent
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Comment |
|
View your CI Pipeline Execution ↗ for commit 357e15f
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit 6d14a2e
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
code/addons/onboarding/src/Onboarding.tsx(3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Adhere to ESLint and Prettier rules across all JS/TS source files
Files:
code/addons/onboarding/src/Onboarding.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Fix type errors and prefer precise typings instead of using any or suppressions, consistent with strict mode
Files:
code/addons/onboarding/src/Onboarding.tsx
🧬 Code graph analysis (1)
code/addons/onboarding/src/Onboarding.tsx (1)
code/addons/onboarding/src/constants.ts (1)
STORYBOOK_ADDON_ONBOARDING_CHANNEL(1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: normal
- GitHub Check: Danger JS
- GitHub Check: Core Unit Tests, windows-latest
tmeasday
left a comment
There was a problem hiding this comment.
LGTM. Does step 1 fire as soon as they open the browser during init?
|
@tmeasday Yeah it's the first screen when the browser opens |
Telemetry: Log userAgent in onboarding (cherry picked from commit f6a70e2)
Closes N/A
What I did
Log userAgent in browser-generated onboarding events.
We can theoretically get this information from the channel, but I did not want to rewrite everything to be able to pull it out.
Checklist for Contributors
Testing
Manual testing
STORYBOOK_TELEMETRY_DEBUG=1and navigate to?path=/onboarding. Verify userAgent is sent properly.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>Summary by CodeRabbit