Skip to content

PM-5407: Show preferred roles without rating#1982

Merged
jmgasper merged 1 commit into
devfrom
PM-5407
Jun 22, 2026
Merged

PM-5407: Show preferred roles without rating#1982
jmgasper merged 1 commit into
devfrom
PM-5407

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken
Preferred roles lived inside the profile rating card, and the entire card was hidden when the stats API did not return a usable rating.

Root cause (if identifiable)
MemberRatingCard returned an empty fragment whenever getProfileRating(memberStats) was undefined, so both saved roles and the owner edit action were skipped for unrated members.

What was changed
Decoupled card visibility from rating availability. The rating summary still renders only when a rating exists, while the preferred roles list and owner edit action render independently.

Any added/updated tests
Updated MemberRatingCard specs to cover saved preferred roles and the owner edit action when rating data is unavailable.

Validation run:
yarn lint passed.
yarn run build passed with existing project warnings.
yarn test:no-watch MemberRatingCard.spec.tsx --runInBand passed.
yarn test:no-watch src/apps/profiles/src --runInBand passed.
yarn test:no-watch --runInBand was run and currently fails in unrelated wallet/work suites, including PaymentAgreementBanner icon rendering, assignment payment helper mocks, engagement assignment detail validation, and existing module-resolution failures outside Profiles.

What was broken
Preferred roles lived inside the profile rating card, and the entire card was hidden when the stats API did not return a usable rating.

Root cause (if identifiable)
MemberRatingCard returned an empty fragment whenever getProfileRating(memberStats) was undefined, so both saved roles and the owner edit action were skipped for unrated members.

What was changed
Decoupled card visibility from rating availability. The rating summary still renders only when a rating exists, while the preferred roles list and owner edit action render independently.

Any added/updated tests
Updated MemberRatingCard specs to cover saved preferred roles and the owner edit action when rating data is unavailable.
@jmgasper jmgasper requested a review from kkartunov as a code owner June 22, 2026 20:50
@jmgasper jmgasper merged commit ed3839b into dev Jun 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant