Repository navigation
fix: profile saves leave stale sidebar identity - #120791
Conversation
7e6953a to
e1d1f43
Compare
There was a problem hiding this comment.
Pull request overview
Fixes a Control UI bug where saving a user profile (display name/avatar) could leave the sidebar showing stale identity data, by refreshing live connection metadata and broadcasting an updated presence snapshot.
Changes:
- Add a gateway request-context hook to refresh matching connected clients’ authenticated profile metadata and upsert/broadcast presence.
- Call that refresh hook after successful
users.setDisplayNameandusers.setAvatarmutations. - Extend regression coverage with gateway unit tests and a UI E2E assertion that the sidebar identity updates live.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/e2e/profile-page.e2e.test.ts | Updates E2E expectations to assert the sidebar name/initials reflect the refreshed presence identity. |
| src/gateway/server-request-context.ts | Adds refreshConnectedUserProfile to update live client auth profile state and broadcast a new presence snapshot. |
| src/gateway/server-request-context.test.ts | Adds unit coverage for refreshing multiple connections and removing avatar URLs when avatars are removed. |
| src/gateway/server-methods/users.ts | Invokes the new refresh hook after successful display name and avatar mutations. |
| src/gateway/server-methods/users.test.ts | Adjusts handler harness to pass context and asserts the refresh hook is called after mutations. |
| src/gateway/server-methods/shared-types.ts | Extends shared gateway types with presenceKey and the new refreshConnectedUserProfile context method. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1d1f43cca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 12:50 AM ET / 04:50 UTC. ClawSweeper reviewWhat this changesRefreshes live authenticated gateway connections and presence snapshots after a profile name or avatar save so the Control UI sidebar updates without reload. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessThe PR is the correct active repair for the linked sidebar-identity bug: current main retains connection-time profile data after a save, while this branch refreshes the live owner and presence projection. No patch defect remains, but protected maintainer handling and failed exact-head CI require human review before merge. Priority: P2 Review scores
Verification
How this fits togetherControl UI profile saves call gateway user methods that persist profile data, while gateway presence snapshots feed the sidebar identity card. The PR connects those paths by refreshing the live connection projection after a successful save. flowchart LR
A[Profile settings save] --> B[Gateway user method]
B --> C[Profile display data]
C --> D[Live gateway connections]
D --> E[Presence snapshot]
E --> F[Control UI sidebar]
Decision needed
Why: The patch is correct, but this PR carries a maintainer label and required CI has not reached a clean terminal state. Before merge
Agent review detailsSecurityNone. PR surfaceSource +80, Tests +270. Total +350 across 9 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared authenticated-presence projection, land it only after exact-head CI and assigned maintainer review are complete, then let the linked issue close through the merged fix. Do we have a high-confidence way to reproduce the issue? Yes, from current source: profile mutations update durable state while the connection-time presence projection remains unchanged until reconnect. The PR adds focused gateway and browser regression coverage for that path. Is this the best way to solve the issue? Yes. Refreshing the gateway-owned live connection and presence state is preferable to retaining stale backend facts and compensating only in the Control UI. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 34062ead2047. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
0b453e0 to
faf2572
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d7ffc70 to
a7055e7
Compare
a7055e7 to
20fb9ea
Compare
|
Merged using squash. What changed after review:
Verification:
Landed on
Thanks @Solvely-Colin! |
Profile identity changes now refresh immediately across connected browsers, including revisioned avatar URLs that avoid stale cached images. Fixes openclaw#120784 Prepared head SHA: 20fb9ea Co-authored-by: Colin Johnson <[email protected]> Co-authored-by: Shakker <[email protected]> Reviewed-by: @shakkernerd
Closes #120784
Note
AI-assisted change. The implementation and focused proof were reviewed locally before submission.
What Problem This Solves
Fixes an issue where users changing their Control UI display name or avatar could continue seeing the old identity in the bottom-left sidebar. Avatar updates could also briefly flash the previous cached image.
Why This Change Was Made
Profile saves now refresh the authenticated profile attached to every matching live connection, update its presence entry with a revisioned avatar URL, and broadcast one fresh presence snapshot. The refresh is limited to connections for the changed profile; it does not change the gateway protocol or persisted profile schema.
User Impact
After saving a new name or avatar, users immediately see the new identity in the sidebar without reloading and without falling back to the stale cached avatar.
Evidence
Motion proof
The recording starts with Test Person in the bottom-left sidebar and shows it updating in place to Updated Person after the presence refresh.
Before / after stills
Validation logs