Repository navigation
Description
Background
The Efficiency dashboard shows how long reports take, but not who or what moves them along. Today a report can be submitted by a person, by an AI agent, or on a schedule by the workspace's Submissions setting, and approved by a person, by an agent, or by Auto-approve compliant reports. #645498 keeps agents and rules out of the ranking graphs, so those graphs rank people only.
Admins can't see how much of their workflow is already automatic, or how much faster it is. Agents in particular are invisible on the dashboard, even when they handle a large share of reports.
This issue adds a Handled by table to the Efficiency dashboard, above the ranking graphs. It splits the reports in a stage between people, each AI agent, and rules, with each one's share, reports, and average time. A selector switches between the approve and submit stages. On a workspace without an agent, it offers to set one up.
Product and design details
Desktop, Approve, a workspace with agents, Compare: Previous period
Mobile Example:
Desktop, Submit, Compare: Previous period
Desktop, Approve, a workspace without agents, Compare off
Mobile Example
Desktop, Approve, a workspace without agents OR rules, Compare off
Layout
- The table is a full-width card after
Workflow efficiencyandAverage processing time, and before the ranking graphs (Time to submit,Time to approve,Time to pay). The page reads from overall time, to time by stage, to who handles each stage, to time by person. - On mobile, the graphs stack in the same order.
- The card header has the
Handled bytitle, a stage selector, andExplain. Like the other Efficiency graphs, it has no⋮menu. - The table follows
Top violations([Due for payment 2026-11-25] [Insights polish] [R4] Replace theTop violationsdonut with a table of up to 15 violations #106841): it runs edge to edge in the card, has a fixed sort, and has no tooltips.
Stage selector
- The selector reuses the control from the ranking graphs (#). The options are
Approve(the default) andSubmit. - When no workspace in the Date range has
Approvalson,Approveisn't offered and the card showsSubmit. - Agents can't pay reports yet, so there's no
Payoption.
Rows
| Row | Name | Line beneath |
|---|---|---|
People |
People, with the Users icon |
none |
| Each AI agent | The agent's name and avatar | AI agent |
Rules |
Rules, with the Bolt (lightning) icon, as on the workspace Rules page |
The setting: Auto-approve compliant reports for Approve, Submissions for Submit |
Each report counts once, in one row. An AI agent is an account with an @expensify.ai login.
| Stage | People |
An agent | Rules |
|---|---|---|---|
Approve |
A person approved at least one of its steps | No person approved it, and its final approval came from that agent | No person or agent approved it |
Submit |
A person submitted it | That agent submitted it on the employee's behalf | The Submissions setting submitted it on its schedule |
- Rows are sorted by
Reports, most first, and theReportsheader shows a down arrow. Headers aren't clickable. - A row with no reports in the Date range is hidden, apart from the setup rows below.
Columns
| Column | Contents |
|---|---|
Source |
The row's name and line beneath |
Share |
A green400 bar, then the row's reports as a share of all reports that finished the stage in the Date range, to one decimal place, e.g. 40.8%. The bar works the same as in Top violations. Rows add up to 100%. |
Reports |
Reports that finished the stage in the Date range |
% change |
Only with Compare: Previous period. |
Average time |
The stage's average time: submission to final approval for Approve, creation to submission for Submit. Under 1 day it's in hours, e.g. 2.4 hours, and below 0.1 hours it reads <0.1 hours. Otherwise it's in days, e.g. 4.2 days. |
Setup rows
These rows only show when the Workspace filter is one workspace and the person is an admin of it. They always sit at the bottom of the table, with — in Share and Reports, and a button in Average time.
| Row | Shows when | Line beneath | Button |
|---|---|---|---|
AI agent, with the Bot icon |
The workspace has no agent | Approve reports in minutes, not days for Approve, Submit reports as soon as they're ready for Submit |
Set up, which opens the workspace's Agents page (/workspaces/<policyID>/agents) |
Rules |
The stage's setting is off | The setting's name | Turn on, which opens Auto-approve compliant reports on the Rules page, or the Submissions tab of the Workflows page |
Comparing
Compare: Previous periodadds the% changecolumn right afterReports, showing the change inReportsfrom the previous period, e.g.↑ 40%. It followsTop violations, with one difference: chips are gray in both directions, because more automation isn't good or bad on its own.Compare: Averageadds nothing, because an average across people, agents, and rules doesn't mean anything.Average timealways shows, whateverCompareis set to. It's the row's time in the Date range, not a comparison.
Clicking and states
- Rows aren't clickable for now. # makes agent rows open that agent's
Detailspanel. - While loading, the table shows the existing skeleton table rows.
- With no reports in the stage in the Date range, and no setup rows to show, the card shows the existing empty state.
Mobile
The table becomes a list, following Top violations on mobile:
- Each row shows the name with
<N> reports · <Share>beneath it, e.g.168 reports · 40.8%. UnderCompare: Previous period, the change chip sits right after the count, e.g.168 reports↑ 40%· 40.8%. OnRulesand agent rows, the row's line beneath (from Rows) comes first, so these rows have two lines. Average timeis on the right.- A full-width
Sharebar with a gray track sits beneath each row. - Setup rows show their line beneath and their button on the right, with no bar.
Issue Owner
Current Issue Owner: @OlGierd03Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
daledah commentedon Nov 17, 2026
Assigning myself to review all [R6] issues, as discussed with truph
OlGierd03 commentedon Nov 19, 2026
I'm working on this one
JmillsExpensify commentedon Nov 19, 2026
Sounds good. You're assigned.
dannymcclain commentedon Nov 19, 2026
Just updated the mocks in the issue description with where Jason and I landed. (Figma)
OlGierd03 commentedon Nov 26, 2026
@luacmartins I'm working on the
Handled bytable in #107409 and it needs new data fromGetInsights.For the request, in the draft PR FE already send:
handledBygraph ininsightsHashes, with the same three hashes as the other graphs. The table doesn't show an average, so FE doesn't read theaverageSnapshotHashsnapshothandledByStagesnext toinsightsHashes, the same way asviolationStages:For the
handledBygraph, we need a newhandled-bygroup by over the reports that finished the stage fromhandledByStages, with the Date range onanyApprovalforapproveand onanySubmissionforsubmit.For the response, we need one group per source, with a
handledByfield (plusaccountIDfor agents):The table relies on:
countas reports, with each report in one group following theRowstable in the issuepersonalDetailsListfor the name% changecan match each group with its previous valueFor the
Sharecolumn, we need a share of reports, butpercentOfTotalfollows the amount. I'd lean towards basing it oncountfor this group-by, but working it out on the FE from the counts is also an option. What would you prefer?For Explain, I believe it should know which stage the table shows, so I'd add
handledByStagetoinsightsScope, like we already do withviolationStagefor Compliance.Let me know if I missed anything here
OlGierd03 commentedon Nov 26, 2026
One more thing on the request: I tried sending the
handledBygraph withoutaverageSnapshotHash, since the table doesn't use the average andGetInsightsreturned an error for the whole dashboard. Would it make sense to make that hash optional for this graph or should FE keep sending it and ignore the snapshot?JmillsExpensify commentedon Nov 26, 2026
@luacmartins for when you're next online ^^
mhawryluk commentedon Nov 27, 2026
while we're at it, I think we could drop the required
averageSnapshotHashacross the board. the only chart that uses it is Top tags (btw is it on purpose that Top tags shows the average different than all the other charts?)luacmartins commentedon Nov 30, 2026
I have a draft BE PR for this https://github.com/Expensify/Auth/pull/27379
luacmartins commentedon Nov 30, 2026
@mhawryluk Yes, that’s intentional. In
Compare: Average,Top tagscompares each tag with its own historical average. For example,Travelis compared with averageTravelspend across prior periods. The other Spend rankings use one shared average across all groups in the selected period. That’s whyTop tagsstill needs to sendaverageSnapshotHash. The other charts can omit it once the Auth change is deployed.luacmartins commentedon Dec 1, 2026
@JmillsExpensify We can build
Handled byfrom existing report history, but some Instant Submit reports are recorded the same way as manual submissions. Are we ok counting those underPeoplefor now? Counting them underRuleswill require additional data storage in the DB.JmillsExpensify commentedon Dec 1, 2026
Yeah, that's fine. In fact, it's even technically right too. I would count Instant Submit as a manual submission and then just sit on this consideration until we get pulled in a different direction by customers.