Ask Duck.ai pixels and wide event - #9766
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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 1aeef24. Configure here.
| // so it isn't resumed, then let the dialog command hide the sheet. Mark the impending hide as a | ||
| // handoff so onSheetClosed doesn't revert the tab's contextual input state. | ||
| duckChatPixels.reportContextualSheetNewChatFromPopup() | ||
| selectionJourney.onJourneyEnded(SelectionTerminalReason.NEW_CHAT) |
There was a problem hiding this comment.
New Chat ends journey too early
Medium Severity
onJourneyEnded runs on New Chat and chat-cleared while resetToNewChat leaves attached selections in TextSelectionStore. A later submit of those leftover selections calls onPromptSubmitted with no active journey, so a successful ask is recorded as cancelled.
Please tell me if this was useful or not with a 👍 or 👎.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 1aeef24. Configure here.
| return | ||
| } | ||
| duckChatPixels.reportContextualSheetDismissed() | ||
| selectionJourney.onSurfaceDismissed() |
There was a problem hiding this comment.
Entry dismiss skips journey dismissal
Medium Severity
onSurfaceDismissed is only wired from sheet close. Ask Duck.ai opens the entry dialog first, and onDismiss there never notifies the journey, so dismissal_count and dismissed_before_submission miss the main surface people leave after attaching text.
Please tell me if this was useful or not with a 👍 or 👎.
Reviewed by Cursor Bugbot for commit 1aeef24. Configure here.
73352a5 to
af941cf
Compare
af941cf to
f3c8db0
Compare



Task/Issue URL: https://app.asana.com/1/137249556945/project/1200204095367872/task/1218319678030442?focus=true
Tech Design URL (if applicable):
API Proposals URL(s) (if applicable):
Description
Steps to test this PR
Feature 1
Note
Low Risk
Telemetry-only changes with no user-facing behavior beyond firing analytics when selections are added or removed; selection limits and deduplication logic are unchanged.
Overview
Adds telemetry for contextual “Ask Duck.ai” text selections: four new count/daily pixels (attach, limit hit, remove, prompt submitted with bucketed
selection_count) induck_chat.json5, wired throughDuckChatPixelsandRealTextSelectionRepository.Introduces the
duckai-selection-journeywide event (definition + JSON schema) andRealDuckAiSelectionJourneyWideEvent, which starts when the first selection is attached and finishes on submit, clearing all selections, new chat, fire/clear chat, sheet dismiss counts, suggestion usage (summarize/translate), or a 5‑minute stale timeout. Hooks live in the contextual sheet ViewModel, suggestions ViewModel, and text-selection repository.Tests are extended to assert pixel and journey callbacks on attach/remove/limit paths.
Reviewed by Cursor Bugbot for commit f3c8db0. Bugbot is set up for automated code reviews on this repo. Configure here.