-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add tracking for feature tab changes #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Script size changes
Totals
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds tracking for feature tab changes in the check editor sidepanel to provide visibility into how users interact with different features. When users switch between tabs (Test, Secrets, Docs), the feature_tab_changed event is now tracked with the selected tab label and source context.
Key changes:
- Added a new
trackFeatureTabChangedfunction to track tab selection events - Integrated tracking into the
FeatureTabsContextusing a callback wrapper - Added a minor formatting improvement to SecretsPanel.tsx
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/features/tracking/checkFormEvents.ts | Defines the new trackFeatureTabChanged tracking event with label and source parameters |
| src/components/Checkster/contexts/FeatureTabsContext.tsx | Wraps the setActive function with handleSetActive callback that triggers tracking on tab changes |
| src/components/Checkster/feature/secrets/SecretsPanel.tsx | Minor formatting change (added blank line) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| interface FeatureTabChanged extends TrackingEventProps { | ||
| /** The label of the feature tab. */ | ||
| label: FeatureTabLabel; |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The label field in FeatureTabChanged interface is typed as FeatureTabLabel, which is ComponentProps<typeof Tab>['label']. This type can include React elements and other non-primitive values. However, TrackingEventProps only accepts boolean | string | number | undefined. This type mismatch could cause runtime issues if a tab label is anything other than a string or number.
Consider constraining the type to ensure only trackable values are accepted:
interface FeatureTabChanged extends TrackingEventProps {
/** The label of the feature tab. */
label: string;
}| label: FeatureTabLabel; | |
| label: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm. Good point. We should change this to only allowing a string in the label prop. Will do that in another PR.
VikaCep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Problem
Currently, we don't track when users interact with feature tabs in the check editor sidepanel. This limits our ability to understand which features are being used and how users navigate between different feature tabs.
Solution
This PR adds tracking for feature tab changes in the check editor. When a user switches between feature tabs (such as Secrets, Docs, etc.), we now track this interaction with the
feature_tab_changedevent. The tracking includes the label of the selected tab and the source context (check_editor_sidepanel_feature_tabs), providing visibility into feature usage patterns.The implementation:
trackFeatureTabChangedin the check form events moduleFeatureTabsContextto automatically track tab changes