App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2026-11-26] [Insights][R4][App] Add Compliance charts and chart eligibility rules

Open aldo-expensify opened this issue 2 months ago • 17 comments

Implement this section of the design doc: Add charts to the Compliance dashboard.

Description

Configure the Compliance dashboard's headline and supporting charts and apply the workspace eligibility rules for member charts.

  • Add Violations over time, Top violations, Violations by submitter, and Violations by approver to INSIGHTS_DASHBOARD_SPECS, including each chart's query and the count metric.
  • Add hasMultipleMembers and hasApprovalsEnabled helpers in insightsAccess.ts.
  • Gate Violations by submitter on hasMultipleMembers.
  • Gate Violations by approver on both hasMultipleMembers and hasApprovalsEnabled, using the existing per-chart isPolicyEligible mechanism.

Acceptance criteria

  • [ ] The four chart specs render the corresponding backend results correctly using counts.
  • [ ] Charts respond to the selected dashboard filters and comparisons.
  • [ ] Submitter and approver chart visibility follows workspace eligibility.
  • [ ] Include relevant eligibility tests and manual chart/filter/comparison regression steps.

Dependencies

  • https://github.com/Expensify/App/issues/102807
  • https://github.com/Expensify/App/issues/102808
  • The existing Release 4 backend implementation issue.
Issue OwnerCurrent Issue Owner: @daledah

aldo-expensify avatar Oct 01 '26 20:10 aldo-expensify

I'll be working on this one!

OlGierd03 avatar Oct 27 '26 12:10 OlGierd03

@MelvinBot assign me to this issue nad make it daily instead of weekly. Change the Issue Owner part of the issue description, assign me instead of @mhawryluk Also, assign @daledah

OlGierd03 avatar Oct 27 '26 12:10 OlGierd03

Done. I made these changes:

  • Assigned OlGierd03 and daledah.
  • Replaced the Weekly label with Daily.
  • Changed the Issue Owner in the description from mhawryluk to OlGierd03.

mhawryluk is still assigned. Let me know if you want them removed.


view run

MelvinBot avatar Oct 27 '26 12:10 MelvinBot

@OlGierd03 Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Oct 30 '26 21:10 melvin-bot[bot]

It's being worked on (https://github.com/Expensify/App/pull/105266). I'm OOO tomorrow, so I'll pick this back up on Tuesday and integrate it with the freshly merged https://github.com/Expensify/App/pull/102635

OlGierd03 avatar Nov 01 '26 22:11 OlGierd03

@daledah

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.35-3 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/105266

If no regressions arise, payment will be issued on 2026-11-18. :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 11 '26 00: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, new feature

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

  • account with the insightsCompliance beta that is an admin of a workspace with at least two members and approvals enabled, and a regular member of another workspace. In the admin workspace, some expenses with violations are submitted and approved in the current month.

Test:

  1. Open Insights, switch to Compliance and verify Violations over time, Top violations, Violations by submitter and Violations by approver show counts of expenses.
  2. Verify Top violations shows violation names (e.g. "Description required") and Violations by submitter / approver show member names with avatars.
  3. Click a bar in Violations by submitter and verify Spend opens with from:, has:submitted-violation and a submitted: date that match the chart's count.
  4. Go back, click a bar in Violations by approver and verify Spend opens with approver:, has:approved-violation and an anyApproval: date that match the chart's count.
  5. Go back, click a slice in Top violations and verify Spend opens as a list of expenses with violations, sorted by date.
  6. Open the workspace filter and verify it lists only the workspace you're an admin of.
  7. Disable approvals in the workspace and verify Violations by approver disappears.
  8. In a workspace with only one member, verify Violations by submitter and Violations by approver are hidden.
  9. Switch to Spend and verify its charts and workspace filter are unchanged.

Do we agree 👍 or 👎

daledah avatar Nov 11 '26 03:11 daledah

Triggered auto assignment to @mallenexpensify (Awaiting Payment)

Payment Summary

Resolving PRs:

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

  • Contributor: @mhawryluk does not require payment (Contractor)

  • Contributor: @OlGierd03 does not require payment (Contractor)

  • 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

@daledah @mallenexpensify

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.41-2 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/106514

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]

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

@daledah @mallenexpensify

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.42-2 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/106231

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

Price increase request

Mandatory

Proposed amount: $500

Why the work exceeded the issue: The issue shipped as two separate PRs, each requiring its own full C+ review cycle:

  • #105266 - Add Compliance charts and chart eligibility rules (+584/-82, 42 files)
  • #106231 - Add a selector to the compliance charts for submitters and approvers (+1,864/-1,299, 38 files)

Regressions caused by this PR: None. No deploy blockers were filed against either PR.

Multiple PRs: #105266, #106231

@JmillsExpensify @luacmartins what do you think?

daledah avatar Nov 20 '26 12:11 daledah

I think we can use the standard price for each PR given each diff was substantial, so 2 * $175 = $350

luacmartins avatar Nov 20 '26 15:11 luacmartins

Sounds good to me.

JmillsExpensify avatar Nov 25 '26 09:11 JmillsExpensify

@daledah Eep! 4 days overdue now. Issues have feelings too...

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+): 150% or 200%, via NewDot
  • truph01 (C+): 0%, via NewDot

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

Cut: truph01 reviewed 106514, which pays on 105790.

daledah asked for $500 for two PRs: request. luacmartins proposed the standard price for each PR, 2 x $175: comment. JmillsExpensify agreed: comment. At this job price, one price per PR is 200%. The $350 they named is closest to 150%.

Next: pick the percentage, then pay.

Evidence
  • Pays with a sibling issue on the same PR: 106514 is a second PR on this issue, which has its own main PRs 105266 and 106231. truph01 is paid on 105790.
  • C+ checklist by daledah, 10 steps: comment
  • TestRail case exists.
  • PR 105266 by OlGierd03, merged 2026-11-09, production 2026-11-11, approvers daledah, luacmartins. Videos: author 0/1, C+ 1/1.
  • PR 106231 by OlGierd03, merged 2026-11-18, production 2026-11-19, approvers aldo-expensify, daledah, luacmartins. Videos: author 1/1, C+ 1/1.
  • PR 106514 by OlGierd03, merged 2026-11-17, production 2026-11-18, approvers aldo-expensify, luacmartins, truph01. Videos: author 1/5, C+ 2/5.
  • No offending PR or deploy blocker found.
  • Shared PR 106514 also fixes 105790. It is a second PR here, and the main PR on that issue, where truph01 is the C+. Both issues pay.

PAYPREP v1

mallenexpensify avatar Nov 30 '26 22:11 mallenexpensify

Payment Summary

Contributor+: @daledah due $500 via NewDot

$500 cuz the base level is $250 cuz project started before 2026-09-19 .

@truph01 paid on this issue

  • https://github.com/Expensify/App/issues/105790

mallenexpensify avatar Dec 01 '26 00:12 mallenexpensify