GeezerVison is showing github.com — feat(profile): save the own avatar through PATCH /users/data (#1240) by Shirloin · Pull Request #1365 · OpenResilienceInitiative/ORISO-UserService
Conversation
Shirloin
commented
Oct 7, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
People can see an avatar grid in their app profile, but nothing they pick is saved: counsellors get their avatar only through the admin form, and an advice seeker's animal is stored nowhere.
Fix
PATCH /users/data takes two optional fields: avatarKind (ICON or INITIALS, counsellors) and avatarId (the lower-case file stem such as magpie; an empty string clears). The id must match ^([a-z0-9-]{1,40})?$, so a URL or a path is rejected with 400.
- Counsellors: the pair goes through
ConsultantAvatars.apply, the rule the admin form already uses, so Admin shows the same choice. An id sent without a kind means ICON.
- Advice seekers: new nullable column
user.avatar_id (Liquibase 20261007_user_avatar_1240), returned as avatarId in /users/data.
- Only the caller's own account is patched, so nobody can change another person's avatar.
- Contains the build fix from fix(test): sign the inactivity tests in with the service client #1366; merge that PR first.
Tests
- New:
UserServiceMapperTest 5, UserDtoMapperTest 2, UserControllerE2EIT 3 (advice seeker stores and clears, counsellor stores and clears, a URL gets 400). Affected classes 148/148.
- Without the new patch logic, 4 of them fail.
Verified where
Locally (H2 and Redis). The MariaDB migration runs in the MariaDB contract job.
Reviewer test plan (on Dev, together with the Frontend PR)
- As a counsellor, pick a motif in the profile and reload: the same motif is selected, and Admin shows it too.
- As an advice seeker, pick an animal and reload: the same animal is shown in the profile and next to your messages.
- Pick the default tile: the default avatar comes back.
Refs #1240
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
#1175's new deletion tests still set the technical user's username and
password and stub only the human login. #1358 replaced both with a client
id and secret and a loginService grant, so the test sources no longer
compiled and the dev build stopped publishing UserService images.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Counsellors and advice seekers can now store the avatar they pick in their
app profile. PATCH /users/data takes an optional avatarKind (ICON or
INITIALS, consultants) and avatarId (the lower-case file stem, e.g.
"magpie"); an empty id clears the choice. Consultants go through
ConsultantAvatars.apply, so Admin shows the same pick. Advice seekers get a
new nullable user.avatar_id column, returned as avatarId in /users/data.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Oct 7, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
⚙️ Run configuration
- Configuration used: Repository: OpenResilienceInitiative/ORISO-UserService/.coderabbit.yaml
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
bd0859ea-fcd7-4a9e-85ac-013f1b09b8c7
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
#1175 reads the tenant's inactivity policy while an account registers,
and moved the sibling scheduler ITs to permitWithTenantLookup. #1247's new
DeleteTemporaryAccountsSchedulerIT landed at the same time and still
allowed only the AVV lookup, so all six registration-based tests failed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Shirloin
changed the title
fix(test): sign the inactivity tests in with the service client
feat(profile): save the own avatar through PATCH /users/data (#1240)
Oct 7, 2026
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 7, 2026
Reviewers
shazia-k
shazia-k approved these changes
Storypapst
Awaiting requested review from Storypapst
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|