WEB-1166: Fix chargeId race condition in charge forms - #4044
Merged
Merged
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: openMF/web-app/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Note
|
IOhacker
approved these changes
Sep 25, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Add Charge forms for client, savings, fixed deposit and recurring deposit accounts load the charge template in a nested subscribe. A slow response for an older charge can overwrite the form after a newer selection.
Template lookup now runs inside
switchMap. Only the response for the latestchargeIdreaches the form.A failed lookup maps to
EMPTYthroughcatchError. Later selections still load their template.Fixed deposit and recurring deposit forms now unsubscribe with
takeUntilDestroyed, same as client and savings forms.add-client-charge.component.spec.tsgets two specs: out of order template responses, and a new selection after a failed lookup. Out of order spec fails ondevwith amount 100 instead of 200.No new dependencies.
Related issues and discussion
https://mifosforge.jira.com/browse/WEB-1166
Screenshots, if any
No visual change.
Checklist
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit