Skip to content

Add Dolly CLI bump stats#3559

Open
gcsecsey wants to merge 6 commits into
trunkfrom
gcsecsey/stu-1739-cli-dolly-tracks
Open

Add Dolly CLI bump stats#3559
gcsecsey wants to merge 6 commits into
trunkfrom
gcsecsey/stu-1739-cli-dolly-tracks

Conversation

@gcsecsey
Copy link
Copy Markdown
Member

@gcsecsey gcsecsey commented May 20, 2026

Related issues

How AI was used in this PR

Claude implemented the changes following my spec.

Proposed Changes

  • Add Dolly CLI bump-stat groups and metrics for start, attach, turn outcomes, detach reasons, and weekly/monthly unique usage.
  • Emit those stats from the remote-session start and poll-loop lifecycle, respecting --avoid-telemetry in foreground and daemon modes.
  • Add poll-loop tests covering telemetry opt-out, successful attach/turn/detach bumps, turn status mapping, and auth-error detach classification.

Testing Instructions

  • Build the CLI with the NPM config using npm run cli:build:npm
  • Open ~/.studio/cli.json and delete the lastBumpStats object
  • Run remote sessions in the foreground NODE_ENV=development node apps/cli/dist/cli/main.mjs code remote-session start --no-detach
  • Check that you see "Would have bumped stat" messages in the log for the newly added stat groups
    image
  • Optionally do a turn through Telegram
  • Check that in ~/.studio/cli.json, the stats are populated under lastBumpStats
CleanShot 2026-05-20 at 16 08 10@2x

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@gcsecsey gcsecsey marked this pull request as draft May 20, 2026 15:11
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented May 20, 2026

📊 Performance Test Results

Comparing e97a2a3 vs trunk

app-size

Metric trunk e97a2a3 Diff Change
App Size (Mac) 1327.01 MB 1327.02 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk e97a2a3 Diff Change
load 1500 ms 1461 ms 39 ms ⚪ 0.0%

site-startup

Metric trunk e97a2a3 Diff Change
siteCreation 8579 ms 8595 ms +16 ms ⚪ 0.0%
siteStartup 4930 ms 4930 ms 0 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@gcsecsey gcsecsey requested a review from epeicher May 20, 2026 15:57
@gcsecsey gcsecsey marked this pull request as ready for review May 20, 2026 16:28
Copy link
Copy Markdown
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

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

Thanks @gcsecsey for adding those, they will be very helpful to get feedback! I have tested it, and I can see the stats bumped, while they don't appear when using --avoid-telemetry. Changes also LGTM! :shipit:

Stats in terminal Stats in config file Using avoid-telemetry flag
Image Image Image

STUDIO_CLI_TOTAL_LAUNCHES_APP = 'studio-cli-lch-tot-app',
STUDIO_CLI_SITE_CREATE_NPM = 'studio-cli-site-crt-npm',
STUDIO_CLI_SITE_CREATE_APP = 'studio-cli-site-crt-app',
// Dolly remote-session (Telegram bot bridge) — see STU-1739.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question about naming, are there any other occurrences of Dolly, if not, should we adopt the wp-agent naming? 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thinking again about this, I think it's fine to consider Dolly as the internal codename

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