Skip to content

fix(BorrowerProfile): render the server-provided loan status label AD-475 - #7213

Merged
emuvente merged 2 commits into
mainfrom
feature/AD-475-loan-status-label
Sep 2, 2026
Merged

fix(BorrowerProfile): render the server-provided loan status label AD-475#7213
emuvente merged 2 commits into
mainfrom
feature/AD-475-loan-status-label

Conversation

@emuvente

@emuvente emuvente commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Volunteers noticed that two loan statuses are displaying the wrong label on the borrower profile: reviewed status loans display "Under review" instead of "Reviewed", and inactiveExpired status loans display "Inactive" instead of "Inactive expired". Investigating that revealed that there was a step missed during the migration to use the statusLabel defined by the backend (added in AD-220), so this PR completes that missing step.

Additionally, I found that the BorrowerProfile query result handler was not reading the minimal query from the cache when it was prefetched, and it was falling back to only using the loan data used for the routing decision instead. I fixed that by making it use the same showFullView method that the prefetch uses to decide between the full and minimal queries.

…y ran

The apollo result handler always read fullProfileQuery out of the cache, so
on the minimal-view path that read missed and the loan fell back to the
routing and share-meta seed. Any field belonging only to minimalProfileFields
was therefore absent from the server-rendered markup. The handler now runs the
same showFullView decision as preFetch and reads back whichever child query
was prefetched.

AD-475
The component carried its own status-to-label map, written the day before the
API gained a statusLabel field, and the two had since drifted: reviewed,
inactiveExpired and defaulted all displayed text the API no longer agreed
with. The borrower profile queries now request statusLabel and pass it down,
and the map, the currency-loss branch and the delinquent branch are gone since
getHumanizedStatus covers all three server-side.

AD-475
@emuvente
emuvente requested a review from a team September 2, 2026 00:54
@emuvente
emuvente merged commit 6911d57 into main Sep 2, 2026
5 checks passed
@emuvente
emuvente deleted the feature/AD-475-loan-status-label branch September 2, 2026 16:59
@kiva-robot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.92.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@kiva-robot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.92.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants