[Due for payment 2026-11-13] [Insights][R3][App] Add the Explain button to charts
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 Owner
Current Issue Owner: @mallenexpensify
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
This is what we have from the DD: "Explain the data in [graph name]”
Let's just keep it simple is my vote.
thanks!
@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]
@truph01 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Working on it.
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:
- Enable the
insightsAIbeta. Open Insights. - While the dashboard loads, check each AI card placeholder shows a short bar under the text where the Explain button goes.
- Check every AI card has an Explain button and it looks correct.
- Press Explain on a card.
- 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".
- In the Network tab, open the AddComment request. Check sidePanelContext has insightsScope with searchKey, policyIDs, date and groupCurrency matching the dashboard filters.
- Check the headline chart and each supporting chart has an Explain button in its header.
- Press Explain on Top merchants.
- Check Concierge gets "Explain the data in Top merchants", with insightsScope in sidePanelContext.
- Change Date, Workspace and Group currency. Press Explain on a chart again. Check insightsScope matches the new filters.
- Pick filters with no expenses. Check the charts show the empty state with no Explain button.
- 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 👎
Triggered auto assignment to @mallenexpensify (Awaiting Payment)
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
This'll be closed soon. Just awaiting payment.
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
PAYPREP v1
Looks like we're waiting on the regression testing steps.
Payment Summary
Contributor+: @truph01 due $250 via NewDot