feat(profile): profile settings modal (name + avatar) and move dev ports to 400x - #308
Merged
Conversation
Add a Profile/Settings modal (opened from the sidebar user entry) that
lets a user change their display name and upload an avatar.
Backend:
- user:setProfile and user:setAvatar commands, broadcasting {type:"user"}
- PATCH /api/profile and PUT /api/profile/avatar (raw image stream),
both returning the user via serializeUser so secrets never leak
- setAvatar removes the previous blob best-effort
Frontend:
- ProfileSettings organism + Storybook story
- AppModel updateProfile/uploadAvatar actions and API client methods
- UserModel.patch now also applies avatarFileId/alias/status so avatar
changes render live via SSE
- Modal lifted into the Sidebar organism to respect atomic-design imports
Email is shown read-only (changing it is a separate crypto-migration).
Adds profile endpoint tests.
Frontend dev server 3000->4000, backend 3001->4001, Storybook 6006->4006, to avoid a collision on port 3000. Updates the vite proxy target, backend PORT/baseUrl defaults, the mobile-config dev-URL rewrite, capacitor config, and docs. The PORT env override (e.g. Docker's 8080) is unchanged.
Add user setProfile/setAvatar commands and the profile/ route module to ARCHITECTURE.md, and mark v4-scope section 6 (avatar + name uploads) done.
Merged
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.
Summary
Adds a Profile Settings modal so users can change their display name and upload an avatar, re-adding avatar support that was dropped during the files-root-entity work — decoupled from channel
Fileentities so profile assets never pollute the channel Files view. Also moves the local dev ports into the 400x range to avoid a collision on port 3000.Changes
Profile settings (feature)
Backend
user:setProfileanduser:setAvatarcommands, each broadcasting{type:"user"}over the existing SSE pipeline.PATCH /api/profile(name) andPUT /api/profile/avatar(raw image stream →core.storage.upload), mounted on the existing profile router.serializeUser, sosecrets/password hash never leak;setAvatarbest-effort removes the previous blob.storagedirectly — no channelFileentity created.Frontend
ProfileSettingsorganism (opened from the sidebar user entry) + Storybook story.AppModel.updateProfile/uploadAvataractions and API client methods.UserModel.patchnow also appliesavatarFileId/alias/status, so avatar changes render live via SSE (previously it only patchedname).Sidebarorganism to respect the atomic-design import hierarchy (molecules must not import organisms).Dev ports (chore)
3000→4000, backend3001→4001, Storybook6006→4006./apiproxy target, backendPORT/baseUrldefaults, mobile-config dev-URL rewrite, capacitor config, and docs. ThePORTenv override (e.g. Docker's8080) is unchanged.Docs
ARCHITECTURE.md: add the newuser/commands and theprofile/route module.CLAUDE.mdanddocs/mobile-app.md.Testing
denoroute tests for the profile endpoints (auth, name update, empty-name rejection, avatar set, non-image rejection, blob replacement, plus assertions that responses don't leak secrets) — 9/9 pass.deno check/deno lint/deno fmtclean; frontendpnpm typesshows no new errors; ESLint clean on changed files;build-storybookcompiles with the new story.