Repository navigation
Return to the split overview after Remove split when editing a per diem split #102271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7efd100
Revert a per diem split right away when removing a split leaves only one
MelvinBot ee2303f
Merge remote-tracking branch 'origin/main' into claude-perDiemRemoveS…
MelvinBot 003ad20
Rename removeSplitExpenseField to removeSplitExpenseAndRedistributeAm…
MelvinBot c5a9a67
Call updateSplitTransactionsFromSplitExpensesFlow directly from the s…
MelvinBot 29fea25
Move the split revert into an on-demand RevertSplitExpenseFlow component
MelvinBot d158f14
Open the split edit page after the overview transition instead of rev…
MelvinBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user presses Back or navigates to another destination while the overview is still transitioning in, this callback remains queued and later opens the captured edit route over the destination they chose.
Navigation.navigateschedulesafterTransitionthroughTransitionTracker, which waits for transitions to finish but does not cancel callbacks when the overview is popped; guard or cancel this continuation when its overview is no longer active.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MelvinBot Please check this feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The race is real, but I don't think it's worth changing here. I recommend no code change.
dismissModalWithReportchains anavigatethrough an uncancelledafterTransitionthe same way.navigatedoesn't return the cancel handle, so the only option is an active-route check inside the callback.isActiveRoutestrips query params from the active route but not from the route you pass in. The overview route is dynamic and can carry query params, for example from Search. A mismatch there would block the edit page every time and break the main flow. I can't test that flow in the browser, because the test account has no per diem rates.How the timing works
navigatepassesafterTransitiontoTransitionTracker.runAfterTransitionswithwaitForUpcomingTransition: true.runAfterTransitionswaits for the next transition to start, then until no transitions are active. If the user goes Back during the overview's push, the pop is just another transition. The callback then fires after the pop ends. Each wait is capped at 1000 ms (MAX_TRANSITION_START_WAIT_MS,MAX_TRANSITION_DURATION_MS).If you'd still like a guard, reply and I'll add one. It would compare paths without query params.
view run