App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2026-11-25] [Insights][R6][App] Add Efficiency supporting charts and chart eligibility rules

Open luacmartins opened this issue 1 month ago • 12 comments

Implement these sections of the design doc:

Description

  • Configure Average processing time, Longest to submit, Slowest to approve, and Most time to pay in INSIGHTS_DASHBOARD_SPECS using the duration metric.
  • Use workflow-stage rows for Average processing time and member rows for the other three graphs.
  • Set Slowest to approve's isPolicyEligible to hasApprovalsEnabled and use the shared workspace-scope eligibility behavior.
  • Connect all four charts to the selected filters, comparison snapshots, report count labels, and shared non-drillable Efficiency behavior.

Acceptance criteria

  • [ ] All four supporting charts and inline tables render the corresponding backend values with duration formatting.
  • [ ] Filters and both comparison modes update chart values consistently.
  • [ ] Slowest to approve is visible only when a workspace in scope has approvals enabled.
  • [ ] Include focused chart-spec/eligibility coverage and manual chart, table, filter, comparison, and Explain regression steps.

Manual regression reference: Insights manual tests.

Dependencies

  • https://github.com/Expensify/Expensify/issues/692067
  • https://github.com/Expensify/App/issues/104095
  • https://github.com/Expensify/App/issues/104096
  • https://github.com/Expensify/App/issues/104097
Issue OwnerCurrent Issue Owner: @mallenexpensify

luacmartins avatar Oct 15 '26 14:10 luacmartins

Backlog

luacmartins avatar Oct 29 '26 18:10 luacmartins

Assigning myself to review all [R6] issues, as discussed with truph

daledah avatar Nov 05 '26 13:11 daledah

@daledah

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.37-1 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/106360

If no regressions arise, payment will be issued on 2026-11-20. :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 13 '26 07:11 melvin-bot[bot]

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: N/A

  • [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. Sign in as an admin of a workspace with approvals on and a few reports submitted, approved and paid this year. Enable the insightsEfficiency beta. Open Insights and verify the tabs read Spend, Efficiency, Compliance in that order, and that Efficiency opens at /insights/efficiency.
  2. Verify Efficiency shows the following charts: Workflow efficiency, Longest to submit, Slowest to approve and Most time to pay.
  3. Hover a bar in any chart. Verify the tooltip counts reports ("3 reports"), not expenses.
  4. In Slowest to approve and Most time to pay, verify each row shows a person's name and avatar.
  5. Click a bar. Verify nothing opens. Open a chart's menu and verify "View on Spend" isn't there.
  6. Download a chart's CSV. Verify the count column is titled "Reports".
  7. Change the date grouping, for example Month to Quarter. Verify the headline reloads and the other charts don't flash a loading state.
  8. Narrow the Workspace filter to a workspace with approvals off. Verify Slowest to approve is not shown.
  9. Sign in as a regular member (not admin or auditor) of the workspace. Verify the Efficiency tab isn't shown.
  10. In the search bar, type group-by:. Verify paid-by isn't suggested. Search group-by:paid-by and verify the results show as an ungrouped list.

Do we agree 👍 or 👎

daledah avatar Nov 13 '26 07:11 daledah

Deploy Blocker https://github.com/Expensify/App/issues/107132 was identified to be related to the PR https://github.com/Expensify/App/pull/106736 that attempted to fix this issue.

jponikarchuk avatar Nov 17 '26 16:11 jponikarchuk

Deploy Blocker https://github.com/Expensify/App/issues/107133 was identified to be related to the PR https://github.com/Expensify/App/pull/106736 that attempted to fix this issue.

Chandkia24 avatar Nov 17 '26 16:11 Chandkia24

Deploy Blocker https://github.com/Expensify/App/issues/107132 was identified to be related to the PR https://github.com/Expensify/App/pull/106736 that attempted to fix this issue.

Deploy Blocker https://github.com/Expensify/App/issues/107133 was identified to be related to the PR https://github.com/Expensify/App/pull/106736 that attempted to fix this issue.

Both blockers are minor bugs and both are behind the beta.

daledah avatar Nov 17 '26 17:11 daledah

@daledah

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.40-1 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/106736

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

melvin-bot[bot] avatar Nov 18 '26 00:11 melvin-bot[bot]

@daledah Huh... This is 4 days overdue. Who can take care of this?

Triggered auto assignment to @mallenexpensify (Awaiting Payment)

Payment Summary

Resolving PRs:

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

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

  • Reviewer: @daledah 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

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