Repository navigation
feat(dev-server): send UI analytics through the local server - #855
Merged
Merged
Conversation
The browser posts page views and UI actions to the dev server. The server sends allowed events with the CLI analytics client. Opt-out still sends nothing. The browser does not see the access token. Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
…analytics-7932 Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9567da8. Configure here.
The stream effect runs again when the user pauses or resumes streaming. The open event was in that effect, so each toggle sent a second open event. Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
The UI refreshes flags and environments after the settings PATCH. If that refresh failed, the UI sent an error outcome for a change that the server already saved. The UI now sends the outcome when the PATCH succeeds. Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
btesfamariam
approved these changes
Oct 27, 2026
…ct update Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 28, 2026
Merge origin/main to fix the conflicts with the UI analytics change in #855. Flags.tsx had one conflict in its imports. The merge keeps sortFlags for the local flags list and keeps the uiAnalytics imports from main. The override analytics calls and the local flag filters now work together. The merge rebuilds ui/dist/index.html from the merged source with npm ci and npm run build. Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
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.

Requirements
Related issues
None.
Describe the solution you've provided
The dev server UI sends page views and UI actions to
POST /ui-analyticson the local dev server. The server allows only a fixed list of event names and properties. It then sends the event with the CLI analytics client. The access token stays in that process. The browser does not call the tracking service.--analytics-opt-outstill selectsNoopClient. The local route returns success and sends nothing onward. A failed tracking call does not change a flag override.The first events are page views, flag override set, flag override remove, project update, project sync, context update, and Events screen open or pause. Project add, remove, and import are on the allowlist. The UI has no controls for those three, so it does not send them yet.
Describe alternatives you've considered
A direct call from the browser to the tracking service would skip the opt-out flag or put the access token in the page. Events on the shared project routes would count CLI commands a second time. Those routes already send
CLI Command Run.