Fix Report- Something when wrong when resize to fullscreen in bar or line view of expense report#87084
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c976df66b
ℹ️ 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".
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Fix is good for product
|
hi @DylanDylann, how's the review coming along? |
|
On my list today |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@borys3kk I think this bug only reproduces on Windows; unfortunately, I don’t have it. Could you ask someone to verify it there? Otherwise, we should ask the QA team to test this PR using an ad-hoc build. |
I was also able to reproduce this bug on macOS so I think you're good to go |
|
@borys3kk The code change looks fine to me Could you update and add unit tests?
|
sure, on it |
|
Reviewing now.... |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
Manual useMemo is redundant with React Compiler |
|
useChartLabelMeasurements is called twice, in both chart content components call useChartLabelMeasurements directly AND implicitly via useChartLabelLayout which calls it internally |
|
I discovered a new bug (also happens on the main branch). We can consider fixing in a new PR I can't scroll down the chart in mWeb Screen.Recording.2026-04-17.at.15.42.56.mov |
|
@MelvinBot Could you review this change? |
|
🤖 Code Review The core approach is sound — moving 1. Both Options: (a) have 2. Explicit The App uses React Compiler, which auto-memoizes. The explicit 3. The 4. Minor: In both Overall this is a well-structured fix for the re-render problem. The SharedValue approach correctly keeps hover events on the UI thread, and the |
|
@DylanDylann fixed both comments |
I can look at it but I also think that it should be fixed in a new PR |
|
@borys3kk Please fix the failed checks |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 774e9ca583
ℹ️ 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".
| <ChartXAxisLabels | ||
| labels={truncatedLabels} | ||
| labels={originalLabels} | ||
| labelWidths={truncatedLabelWidths} |
There was a problem hiding this comment.
Pass original widths to X-axis label truncation
ChartXAxisLabels expects labelWidths to be the measured widths of the original labels, because it decides whether to truncate by checking labelWidth <= maxWidth before calling truncateLabel(). Passing truncatedLabelWidths here (already clamped in useChartLabelLayout) makes many overlong labels look like they already fit, so they render untruncated and can overflow/overlap, while hit-testing still uses the clamped geometry. The same wiring is present in LineChartContent as well.
Useful? React with 👍 / 👎.
|
@DylanDylann all yours |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #87066 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
puneetlath
left a comment
There was a problem hiding this comment.
Good job with this.
One piece of feedback: there's a lot going on in this PR and I found it difficult to keep it all in-context. I think I could've done a better review if it had been smaller. Would it have been possible to break this up into some smaller PRs instead of one big one?
|
🚧 @puneetlath has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.3.62-0 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed chart crashes caused by excessive re-renders. Moved
activeDataIndexandisOverClickableTargetfrom React state to ReanimatedSharedValues so hover/cursor changes no longer trigger React re-renders. ExtractedChartTooltipLayerto read shared values directly. RefactoreduseChartLabelLayoutto return label widths only; truncation is now handled during render inChartXAxisLabels. AddeduseChartLabelMeasurements,useChartParagraphs, anduseYAxisLabelWidthhooks.Fixed Issues
$ #87066
PROPOSAL:
Tests
Crash fix:
Offline tests
QA Steps
Same as tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-04-03.at.16.06.23.mov