Repository navigation
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@MelvinBot Cancel the request for a review from @Pujan92 and instead request a review from @daledah, since he's assigned to the Insights project |
|
Done. I removed the review request for |
|
I can review this PR in a couple of hours |
|
@dylanexpensify could you please run parrot translations here? 🦜 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1dc9d4bdd6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| graphKey: CONST.INSIGHTS.GRAPH.SPEND_OVER_TIME, | ||
| titleKey: 'search.spendOverTime', | ||
| view: CONST.SEARCH.VIEW.LINE, |
There was a problem hiding this comment.
Do not render the Spend chart on Compliance
When an eligible admin or auditor opens Compliance after Spend has loaded for the same default filters, this placeholder is treated as a real chart: buildInsightsJsonQuery produces the same chart hash as Spend and useMultipleSnapshots reads the globally keyed snapshot_<hash>. Consequently getDashboardState sees the cached Spend snapshot as loaded and the Compliance page immediately renders “Spend over time” and its data instead of a chartless Compliance page; later responses can also overwrite the snapshot used by Spend. Represent the empty dashboard without a queryable Spend spec, or namespace its snapshots by dashboard/search key.
Useful? React with 👍 / 👎.
| // The tab opens on Spend dashboard once, then keeps the last dashboard in navigation state until the app restarts. | ||
| initialParams={{dashboardID: CONST.INSIGHTS.DASHBOARD.SPEND}} |
There was a problem hiding this comment.
Validate retained Compliance before native tab restore
When a narrow native user selects Compliance, leaves the tab, and then loses the compliance beta or their last admin/auditor workspace, the retained dashboardID: compliance here is still restored on the next Insights tab press. I checked NativeTabNavigator/tabScreenListeners.ts: the Insights handler only performs anonymous interception and never runs getInsightsTabRoute, so InsightsPage renders NotFound and the user cannot recover via the native tab even though Spend remains accessible. Validate the retained dashboard on native tab presses and fall back to Spend when access was revoked.
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| graphKey: CONST.INSIGHTS.GRAPH.SPEND_OVER_TIME, | ||
| titleKey: 'search.spendOverTime', | ||
| view: CONST.SEARCH.VIEW.LINE, |
There was a problem hiding this comment.
Compliance still sends the Spend payload (date:year-to-date and spendOverTime), so GetInsights returns 400. Could we use anySubmission OR anyApproval with the same bounded range and request violationsOverTime instead? The chart and comparison queries need matching filters and regenerated hashes too.
You can apply this patch to fix the issue
|
Bug: I can’t click the back button in the header of the Not Found page when I access bug.1.mov |
Explanation of Change
Adds a Spend / Compliance segmented control to the Insights page. Compliance is gated behind the new
insightsCompliancebeta and shown only to workspace admins and auditors (canViewAllPolicyData). Each tab navigates to/insights/<dashboardID>, so the route decides which dashboard is shown. Compliance has no charts yet, they come in a follow-up.For readability, the workspace scoping in
getVisibleChartsis moved into a separategetPoliciesInScopehelper, with no change in behavior.Fixed Issues
$ #102807
Tests
Precondition: account with the insightsPage beta, admin of a workspace.
/insights/complianceand verify the not found page shows./insights/compliance./insights/compliancein a new tab and verify Compliance is selected./insights/compliance, log in and verify Compliance is selected./insights/unknownand verify the not found page shows./insights/complianceand verify the not found page shows.Offline tests
QA Steps
NoQA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Screen.Recording.2026-10-22.at.21.09.58.mov