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.
af941cf to
f3c8db0
Compare
99f7022 to
3e194f5
Compare
f3c8db0 to
caf5d16
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
Analytics-only changes with no auth, payment, or user-data handling beyond existing pixel/wide-event pipelines.
Overview
Adds telemetry for contextual “Ask Duck.ai” text selections: four new count/daily pixels (attach, max-limit refusal, remove, and prompt submit with bucketed
selection_count), registered induck_chat.json5and implemented onDuckChatPixels.Introduces the
android-duckai-selection-journeywide event (definition + JSON schema) andDuckAiSelectionJourneyWideEvent, which tracks a funnel from the first successful attach through dismissals, selection suggestions (summarize/translate), and terminal outcomes (submitted, all selections removed, new chat, chat cleared, session expiry after 5 minutes).Instrumentation is wired into
RealTextSelectionRepository(attach/remove/limit pixels + journey start/update),DuckChatContextualWebViewViewModel(submit with selections, sheet dismiss, new chat, fire clear), andContextualSuggestionsViewModel(selection suggestions shown/selected). Tests are extended to cover pixel and journey callbacks.Reviewed by Cursor Bugbot for commit caf5d16. Bugbot is set up for automated code reviews on this repo. Configure here.