Skip to content

[Due for payment 2026-11-25] [Insights polish] [R3] Improve AI insight cards as a stat chip, a title, and a short summary #105697

Done

Description

@JmillsExpensify

Background

The Spend dashboard shows up to 4 AI insight cards above Spend over time. Rules detect each signal, and Concierge writes the card as one sentence, e.g. Hubspot Inc. spend in Oct 1–31, 2026 was 26,440% above its Sep 1–30, 2026 historical average.

In testing, the cards read flat and long:

  • Dates repeat the Date filter, e.g. across Aug 1–31, Sep 1–30, and Oct 1–31, 2026, and make up most of the sentence.
  • Percentages get huge, e.g. 65,060%, when an item had almost no spend before. They're accurate but meaningless.
  • In-progress periods read as drops. On Nov 3, Nov 2026 was 98% below the Oct 2026 historical average compares 3 days against a full month.
  • The same item shows on more than one card, and the wording changes from card to card.

This issue gives every card the same layout: a colored chip with the stat, the item's name in bold, and one short summary line, with Explain for anything more. It also tightens which signals qualify and how cards are picked. It covers the Spend dashboard, and the rules here are the framework the other dashboards' cards follow when they're updated. Detection thresholds and materiality ranking don't change, except where this issue says so.

Product and design details

Spend dashboard card row, desktop

Image Image

Card layout

Each card has four parts, top to bottom:

  1. Chip: the stat.
  2. Title: the item that changed, in bold, e.g. IT Site Hosting, Cole Eason, or Total spend. It wraps to 2 lines, then truncates with an ellipsis.
  3. Summary: one short line in the secondary text style.
  4. Explain: opens Concierge in the RHP (full-screen on mobile) with a question already filled in.

Cards sit in one row, divided by vertical lines, with no card background. On mobile, the row is the same and scrolls horizontally, as today: the next card peeks in from the right, and people swipe left to see the rest.

On desktop breakpoints, we want the cards to squish and wrap so that they show fully in the PNG exported via the Export button. Examples:

Viewport around 1120px:
Image

Viewport around 900px:
Image

Viewport around 600px:
Image

Fully mobile viewport:
Image

The above are just examples—let's use the breakpoints we already have to determine when to wrap/scroll.

Chip

There are two kinds of chip:

Formatting:

  • Percentages are whole numbers, e.g. ↑ 65%.
  • From 1,000% up, the chip shows the change in the Group currency instead, rounded to whole units, e.g. ↑ $24,000.

Summary

Concierge writes the summary from the detected signal. It follows these rules:

  • At most 50 characters, so it fits on one line on desktop. It ends with a period.
  • No dates. The period word comes from the period rules in [Insights polish] [R3] Open data point details in the RHP instead of jumping to the Spend page #105196, e.g. this month or this week.
  • No numbers or names that are already in the chip or title.
  • It may name one driver when the data shows one, e.g. Above its average, mostly from Vercel.
  • Plain words, e.g. its average, not its historical average. Members use their, e.g. Below their average this month.

If Concierge's summary breaks a rule, or hasn't arrived after 3 seconds, the card shows the signal's default summary from Signals.

Signals

Signal Chip Default summary Explain question
Spike, above its average Change, red, e.g. ↑ 65% Above its average this month. Why is <item> spend above its average this month?
Spike, below its average Change, green, e.g. ↓ 19% Below its average this month. Why is <item> spend below its average this month?
Trend Change, from the first period in the run to the last, e.g. ↑ 28% Up 3 weeks in a row. Why has <item> spend gone up 3 weeks in a row?
Record, highest or lowest Change, against the previous record, e.g. ↑ 12% Highest month on record. Why was this <item>'s highest month on record?
Threshold crossed Neutral, the threshold, e.g. $100,000 First month above this amount. What pushed <item> past $100,000 this month?
Concentration Neutral, the item's share of all spend, e.g. 42% Share of all spend this month. Why is so much of our spend going to <item>?

Which items qualify

In-progress periods

When the card's period is still in progress, e.g. This month on Nov 16:

  • A spike compares spend so far against the item's average to date: the average of what it spent by the same day of each earlier complete period, the same matched-days rule as #.
  • Spikes only show after that issue's thresholds: day 3 of a week, day 8 of a month, day 15 of a quarter, and day 31 of a year. A day never compares while it's in progress.
  • A trend only counts complete periods.
  • An in-progress period can set a highest record, but never a lowest one.
  • Concentration compares shares within the same days, so it works as is.

Picking the cards

  • We show up to 4 cards, ranked by materiality, as today.
  • Each item appears on one card at most. When an item qualifies for more than one signal, we keep the most material one.
  • Each signal appears on 2 cards at most.
  • When nothing qualifies, the row of cards is hidden.

Loading

  • Cards show the existing skeleton loader until the chip, title, and summary are all ready, so a card never changes after it appears.
Issue OwnerCurrent Issue Owner: @mallenexpensify
Issue OwnerCurrent Issue Owner: @luacmartins

Activity

  1. added
    Weekly
    Improvement
    Internal
    on Nov 2, 2026
  2. dannymcclain commented on Nov 3, 2026

    @dannymcclain
    Contributor

    @JmillsExpensify left a comment in Figma for you to check out regarding these

  3. added
    Daily
    and removed
    Weekly
    on Nov 3, 2026
  4. JmillsExpensify commented on Nov 3, 2026

    @JmillsExpensify
    ContributorAuthor

    Awesome, I'll update the mocks. I think we've aligned at this point.

  5. dannymcclain commented on Nov 3, 2026

    @dannymcclain
    Contributor

    We may also want to handle the wrapping for these in this issue. @JmillsExpensify what do you think?

  6. JmillsExpensify commented on Nov 3, 2026

    @JmillsExpensify
    ContributorAuthor

    Yeah, let's do that. I can update the OP

  7. dannymcclain commented on Nov 5, 2026

    @dannymcclain
    Contributor

    Added some notes about these squishing and wrapping to the description.

  8. 32 remaining items

  9. truph01 commented on Nov 24, 2026

    @truph01
    Contributor

    Deploy Blocker #106591 was identified to be related to the PR #106133 that attempted to fix this issue.

    It is BE issue #106591 (comment)

  10. JmillsExpensify commented on Nov 24, 2026

    @JmillsExpensify
    ContributorAuthor

    Agreed.

  11. added
    Awaiting Payment
    on Nov 24, 2026
  12. expensify-chore-bot commented on Nov 24, 2026

    @expensify-chore-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  13. expensify-chore-bot commented on Nov 24, 2026

    @expensify-chore-bot

    Payment Summary

    Resolving PRs:

    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
  14. expensify-chore-bot commented on Nov 27, 2026

    @expensify-chore-bot

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

  15. truph01 commented on Nov 30, 2026

    @truph01
    Contributor

    Contributor+ Checklist:

    • [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: N/A. It is an improvement issue
      Link to the comment on the Issue:

    • [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:

    • [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. Log in to an account that has the insightsAI beta enabled on the backend. Go to Insights > Spend.
    2. Verify each card shows the chip, the title in bold, the summary and Explain, and it looks correct.
    3. Verify the increase chips are tangerine with an up arrow, the decrease chips are green with a down arrow, and the neutral chips are blue with a coins icon.
    4. Verify long titles wrap to 2 lines and the Explain buttons line up across cards.
    5. Press Explain on a card and verify Concierge opens with that card's prompt.
    6. Change a filter and verify the skeleton matches the card layout while the insights load.
    7. Pick a date range with no insights and verify the card row is hidden.
    8. On a wide window, verify the 4 cards sit in one row. Narrow the window to a medium width and verify they wrap into 2 rows of 2, with dividers only between columns.
    9. Narrow the window until the filters don't fit next to the tabs and verify they move below the tabs, aligned left.
    10. Press Export (on wide and medium desktop layout) and verify the PNG shows all the cards and filters.
    11. On mobile, verify the cards scroll sideways as before.

    Do we agree 👍 or 👎

  16. mallenexpensify commented on Nov 30, 2026

    @mallenexpensify
    Contributor

    Matt's AI agent:

    Prep notes for the CM. This is not a payment approval. Do not request payment until the CM posts the final amount.

    Ready.

    Job price: $250.

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

    Price basis: project started before 2026-09-19 (645498): bernhardoj assigned, 2026-09-10.

    Next: press Caps+Y, then pay.

    Evidence
    • Deploy blocker 106591 was a backend bug. luacmartins fixed it in Web-Expensify (comment).
    • C+ checklist by truph01, 11 steps: comment
    • No TestRail case yet.
    • Resolving PR 106133: mhawryluk, merged 2026-11-10, approved by luacmartins, truph01. Videos: author 2/2, C+ 3/5.
    • Resolving PR 106709: mhawryluk, merged 2026-11-13, approved by JmillsExpensify, luacmartins, truph01. Videos: author 1/1, C+ 1/5.
    • Deploy blocker 106591: closed, demoted by luacmartins, no employee finding.

    PAYPREP v1

  17. mallenexpensify commented on Nov 30, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @truph01 due $250 via NewDot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentDailyImprovementInternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions