[Due for payment 2026-11-25] [Insights][R6][App] Support workflow-stage grouping in Insights charts
Implement these sections of the design doc:
Description
- Add WORKFLOW_STAGE and WORKFLOW_STAGES for created-submitted, submitted-approved, and approved-paid.
- Add SearchWorkflowStageGroup and TransactionWorkflowStageGroupListItemType with averageDuration in seconds and translated display labels.
- Add getWorkflowStageSections, duration-based sorting, and chartGroupByConfig support. Make getFilterQuery optional because workflow-stage rows do not drill in.
- Add INSIGHTS_ONLY_GROUP_BYS and exclude them from autocomplete. Treat a manually typed Spend group-by:workflow-stage as having no group-by.
Acceptance criteria
- [ ] Workflow-stage rows have the correct labels, types, and average-duration ordering.
- [ ] Charts can read stage labels without requiring drill-in query generation.
- [ ] Workflow stage is absent from Spend autocomplete and manually typed queries fall back to ungrouped behavior.
- [ ] Include focused section-builder, sorting, and autocomplete/query-normalization regression coverage.
Manual regression reference: Insights manual tests.
Dependencies
- https://github.com/Expensify/App/issues/104095
Issue Owner
Current Issue Owner: @mallenexpensify
Backlog
Assigning myself to review all [R6] issues, as discussed with truph
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.
@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:
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]
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.
minor bug and behind the beta.
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.
this is expected behavior
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:
- Sign in as an admin of a workspace with some reports submitted, approved and paid. Enable the insightsEfficiency beta.
- Open Insights > Efficiency
- Verify Average processing time shows as a donut before Longest to submit, with slices labeled Created → Submitted, Submitted → Approved and Approved → Paid
- Hover a slice and verify the tooltip shows the stage and its report count, and the cursor doesn't turn into a pointer
- Press a slice and verify nothing happens
- Change the date range and Compare, and verify the chart reloads with the new data
- Go to the Spend page, type group-by: in the search bar, and verify Workflow stage isn't suggested
- Search for type:expense group-by:workflow-stage and verify the expenses are listed ungrouped
Do we agree 👍 or 👎
Triggered auto assignment to @mallenexpensify (Awaiting Payment)
Payment Summary
Resolving PRs:
-
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!
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.
Your call.
Job price: $250.
- daledah (C+): 25% or 50%, via NewDot
Price basis: project started before 2026-09-19 (645498): bernhardoj assigned, 2026-09-10.
Cut: deploy blockers 107132 and 107133 from 106736.
luacmartins demoted both as behind a beta. RUBRIC "Beta features": beta is no defence. 50% if 107133 is expected wording (mhawryluk).
Next: pick the percentage, then pay.
Evidence
- C+ checklist by daledah, 9 steps: comment
- No TestRail case yet.
- Resolving PR 106736: mhawryluk, merged 2026-11-13, approved by daledah, luacmartins. Videos: author 1/5, C+ 1/1.
- Deploy blocker 107132: open, demoted by luacmartins, no employee finding.
- Deploy blocker 107133: closed, demoted by luacmartins, no employee finding.
PAYPREP v1
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.
minor bug and behind the beta.
@luacmartins can you chime in on how much is due here? project work is trickier to price with regressions, cuz off 'behind beta'. Thx
@mallenexpensify we can pay the full amount here, no need to cut because of blockers
Payment Summary
Contributor+: @daledah due $250 via NewDot