[Payment due @suneox] Add followup_clicked telemetry to resolveSuggestedFollowup#88277
[Payment due @suneox] Add followup_clicked telemetry to resolveSuggestedFollowup#88277AndrewGable merged 2 commits intomainfrom
Conversation
Reproduces Expensify/Expensify#625673 — resolveSuggestedFollowup does not emit any Log.info telemetry, so click-through rate cannot be measured before flipping BETA_SUGGESTED_FOLLOWUPS to always-on.
Addresses Expensify/Expensify#625673 — there was no instrumentation on suggested-followup resolution, blocking click-through measurement ahead of flipping BETA_SUGGESTED_FOLLOWUPS to always-on. Emits a Log.info with event=followup_clicked that the server-side logger will ingest for CTR analysis.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@AndrewGable Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🎯 @suneox, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
No new product considerations - removing my assignment and unsubscribing. |
|
🚧 @AndrewGable has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.3.61-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This PR adds a single |
Explanation of Change
Adds observability for the suggested-followup feature by emitting a
followup_clickedtelemetry event wheneverresolveSuggestedFollowup()actually resolves a followup. The event flows through the existingLog.infopipeline → backend → VictoriaLogs, so no new infra is needed. The payload includesreportID,reportActionID, andhasPregeneratedResponse(true = instant path, false = LLM round-trip).This pairs with the Web-E generation-side telemetry (separate issue) to give us a full CTR picture before flipping
BetaManager::BETA_SUGGESTED_FOLLOWUPSto always-on.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/625673
PROPOSAL: N/A (internal issue — no external contributor proposal required)
Tests
This change is observability-only (a
Log.infocall). It has no user-visible behavior, so manual tests focus on verifying the log payload is emitted.[Followups] followup clickedwith parameters{event: "followup_clicked", reportID, reportActionID, hasPregeneratedResponse}hasPregeneratedResponse: true)hasPregeneratedResponse: false)Unit test evidence:
FAIL — before fix (only the test commit
56f8a391a7bapplied;Log.infocall not yet added toSuggestedFollowup.ts):PASS — after fix (HEAD):
Offline tests
The telemetry call is a local
Log.info— it is queued byLogwhile offline and flushed when connectivity returns, same as every otherLog.infocall in the app. No additional offline behavior was introduced by this PR.QA Steps
Same as Tests. This is additive telemetry only; no user-visible behavior changes. QA can verify by clicking a followup chip in a Concierge chat on staging and confirming the chip becomes resolved (existing behavior). Backend log verification is out-of-scope for QA.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
This PR is observability-only (adds a single
Log.infocall in a non-UI code path). There is no user-visible rendering change on any platform, so per the UI verify classification, no platform screenshots are applicable. The behavior that matters is verified by the unit test included in this PR (see Tests section).Android: Native
N/A — no UI change. Behavior verified via unit test.
Android: mWeb Chrome
N/A — no UI change. Behavior verified via unit test.
iOS: Native
N/A — no UI change. Behavior verified via unit test.
iOS: mWeb Safari
N/A — no UI change. Behavior verified via unit test.
MacOS: Chrome / Safari
N/A — no UI change. Behavior verified via unit test.