App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2026-11-13] [Insights][R3][App] Add the Explain button to charts

Open cristipaval opened this issue 2 months ago • 14 comments

Implement this section of the design doc: Add the Explain button to charts.

Add the shared button to chart headers and implement buildInsightsExplainPrompt using the chart configuration and selected filters. Support the muted chart-button style and accented card-button style.

Depends on https://github.com/Expensify/App/issues/102759.

Issue OwnerCurrent Issue Owner: @mallenexpensify

cristipaval avatar Oct 01 '26 12:10 cristipaval

what should the message to Concierge be when pressing the Explain button on the charts? here we're generating the message on the client, instead of getting it from the backend like on the AI cards at the top. would something like "Explain what stands out in my <chart name> data" be okay, or would a different wording be better? do we maybe want to customize it per chart, or is this generic version enough? @JmillsExpensify

mhawryluk avatar Oct 26 '26 10:10 mhawryluk

This is what we have from the DD: "Explain the data in [graph name]”

JmillsExpensify avatar Oct 26 '26 12:10 JmillsExpensify

Let's just keep it simple is my vote.

JmillsExpensify avatar Oct 26 '26 12:10 JmillsExpensify

thanks!

mhawryluk avatar Oct 26 '26 12:10 mhawryluk

@truph01

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.32-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/104862

If no regressions arise, payment will be issued on 2026-11-13. :confetti_ball:

The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

melvin-bot[bot] avatar Nov 06 '26 09:11 melvin-bot[bot]

@truph01 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Nov 09 '26 21:11 melvin-bot[bot]

Working on it.

JmillsExpensify avatar Nov 10 '26 23:11 JmillsExpensify

Contributor+ Checklist:

  • [x] [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to the comment on the PR: Link to the comment on the Issue:

  • [x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal

Precondition:

Test:

  1. Enable the insightsAI beta. Open Insights.
  2. While the dashboard loads, check each AI card placeholder shows a short bar under the text where the Explain button goes.
  3. Check every AI card has an Explain button and it looks correct.
  4. Press Explain on a card.
  5. Check a new Concierge thread opens: in the side panel on wide web, full screen on narrow and mobile. Check the message sent matches the card's prompt, e.g. "Explain why spend is up 18% vs last month".
  6. In the Network tab, open the AddComment request. Check sidePanelContext has insightsScope with searchKey, policyIDs, date and groupCurrency matching the dashboard filters.
  7. Check the headline chart and each supporting chart has an Explain button in its header.
  8. Press Explain on Top merchants.
  9. Check Concierge gets "Explain the data in Top merchants", with insightsScope in sidePanelContext.
  10. Change Date, Workspace and Group currency. Press Explain on a chart again. Check insightsScope matches the new filters.
  11. Pick filters with no expenses. Check the charts show the empty state with no Explain button.
  12. Turn the insightsAI beta off. Check the AI card row and every chart's Explain button are gone, and the chart headers look the same as on main.

Do we agree 👍 or 👎

truph01 avatar Nov 12 '26 07:11 truph01

Triggered auto assignment to @mallenexpensify (Awaiting Payment)

melvin-bot[bot] avatar Nov 12 '26 21:11 melvin-bot[bot]

Payment Summary

Resolving PRs:

  • https://github.com/Expensify/App/pull/104862

  • Contributor: @mhawryluk does not require payment (Contractor)

  • Reviewer: @truph01 owed $175 via NewDot

BugZero Checklist (@mallenexpensify)

  • [ ] I have confirmed assignees, roles, and Upwork contracts look correct
  • [ ] I have paid out Upwork contracts / manual NewDot requests
  • [ ] [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon

melvin-bot[bot] avatar Nov 12 '26 21:11 melvin-bot[bot]

This'll be closed soon. Just awaiting payment.

JmillsExpensify avatar Nov 14 '26 10:11 JmillsExpensify

Claude posting on behalf of Matt:

Ready. Job price: $250 (Insights project; truph01 joined it before 2026-09-19, as on 102758).

  • truph01 (C+): 100%, via NewDot

No deploy blockers or regressions on the issue or the PR.

One PR, #104862, also resolves 102759. Each issue pays the job price, as on 102758 and 102760.

Next: pay. The test steps are the same as on 102759: press Caps+Y there only.

Evidence
  • C+ checklist, 12 test steps: comment
  • TestRail case: none yet.
  • Resolving PR #104862: by mhawryluk (agency), merged 2026-11-04, approved by luacmartins and truph01. No revert.
  • Videos: author 2/5, C+ 3/5.

PAYPREP v1

mallenexpensify avatar Nov 16 '26 04:11 mallenexpensify

Looks like we're waiting on the regression testing steps.

JmillsExpensify avatar Nov 16 '26 20:11 JmillsExpensify

Payment Summary

Contributor+: @truph01 due $250 via NewDot

mallenexpensify avatar Nov 17 '26 04:11 mallenexpensify