Skip to content

feat(dev-server): send UI analytics through the local server - #855

Merged
nieblara merged 6 commits into
mainfrom
cursor/dev-server-ui-analytics-7932
Oct 27, 2026
Merged

nieblara merged 6 commits into
mainfrom
cursor/dev-server-ui-analytics-7932

Conversation

@nieblara

@nieblara nieblara commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

None.

Describe the solution you've provided

The dev server UI sends page views and UI actions to POST /ui-analytics on 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-out still selects NoopClient. 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.

cursoragent and others added 2 commits October 7, 2026 21:49
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>
@nieblara
nieblara marked this pull request as ready for review October 27, 2026 21:22
@nieblara
nieblara requested a review from a team as a code owner October 27, 2026 21:23
@nieblara
nieblara requested review from btesfamariam and removed request for a team October 27, 2026 21:23
Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread internal/dev_server/ui/src/EventsPage.tsx
Comment thread internal/dev_server/ui/src/FlagsPage.tsx Outdated
cursoragent and others added 2 commits October 27, 2026 21:59
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>
…ct update

Co-authored-by: Ramon Niebla <nieblara@users.noreply.github.com>
@nieblara
nieblara merged commit 60c22da into main Oct 27, 2026
9 checks passed
@nieblara
nieblara deleted the cursor/dev-server-ui-analytics-7932 branch October 27, 2026 23:09
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>
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.

3 participants