Skip to content

o11y(seer): Track block content copy in Seer Explorer#115900

Merged
aliu39 merged 1 commit into
masterfrom
aliu/seer-explorer-block-copied-event
May 20, 2026
Merged

o11y(seer): Track block content copy in Seer Explorer#115900
aliu39 merged 1 commit into
masterfrom
aliu/seer-explorer-block-copied-event

Conversation

@aliu39
Copy link
Copy Markdown
Member

@aliu39 aliu39 commented May 20, 2026

Summary

  • Register a new seer.explorer.block_copied analytics event mapped to Seer Explorer: Block Content Copied, so we can measure how often users copy block content from the Seer Explorer global panel.
  • Wire the event into the existing copy-to-clipboard handler in BlockComponent.

Test plan

  • Open the Seer Explorer global panel and click the copy button on an assistant block; confirm the Seer Explorer: Block Content Copied event fires in analytics.

Register a new `seer.explorer.block_copied` analytics event so we can
measure how often users copy block content in the Seer Explorer global
panel.

Co-Authored-By: Claude <noreply@anthropic.com>
@aliu39 aliu39 requested review from a team as code owners May 20, 2026 17:14
@aliu39 aliu39 changed the title feat(seer): Track block content copy in Seer Explorer o11y(seer): Track block content copy in Seer Explorer May 20, 2026
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 20, 2026
@aliu39 aliu39 enabled auto-merge (squash) May 20, 2026 17:16
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

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 and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 58ec62c. Configure here.

const handleCopyClick = (e: React.MouseEvent) => {
e.stopPropagation();
copy(block.message.content ?? '');
trackAnalytics('seer.explorer.block_copied', {organization});
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.

Analytics before copy succeeds

Medium Severity

The new trackAnalytics call for seer.explorer.block_copied runs right after copy(), which returns a Promise and can reject when clipboard access fails. The event label implies a successful copy, so failed attempts are still counted.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 58ec62c. Configure here.

Copy link
Copy Markdown
Member Author

@aliu39 aliu39 May 20, 2026

Choose a reason for hiding this comment

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

we'll incl failed, rarely happens

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

failed copy attempt (if it somehow happens) is still relevant analytics event tbh

@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.56%

Copy link
Copy Markdown
Member

@isaacwang-sentry isaacwang-sentry left a comment

Choose a reason for hiding this comment

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

Worth taking a look to confirm bugbot is noise but LGTM!

Copy link
Copy Markdown
Member

@shashjar shashjar left a comment

Choose a reason for hiding this comment

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

huge

@aliu39 aliu39 merged commit e800059 into master May 20, 2026
73 checks passed
@aliu39 aliu39 deleted the aliu/seer-explorer-block-copied-event branch May 20, 2026 17:33
JonasBa pushed a commit that referenced this pull request May 21, 2026
## Summary
- Register a new `seer.explorer.block_copied` analytics event mapped to
**Seer Explorer: Block Content Copied**, so we can measure how often
users copy block content from the Seer Explorer global panel.
- Wire the event into the existing copy-to-clipboard handler in
`BlockComponent`.

## Test plan
- [ ] Open the Seer Explorer global panel and click the copy button on
an assistant block; confirm the `Seer Explorer: Block Content Copied`
event fires in analytics.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants