Skip to content

fix(ui): profile shows the assistant instead of the signed-in user - #138670

Closed
roboclaw-bot wants to merge 1 commit into
mainfrom
roboclaw/profile-primary-user-136736
Closed

roboclaw-bot wants to merge 1 commit into
mainfrom
roboclaw/profile-primary-user-136736

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #136736

What Problem This Solves

Fixes an issue where users opening Settings → Profile on a signed-in, multi-agent Gateway would see the default assistant’s name and avatar instead of their own identity. A remote display-name clear must also remove the old name immediately rather than revive a cached profile value.

Why This Change Was Made

This maintainer replacement adapts Jacqueline Henriksen’s contribution in #136736 to current main’s shared profile-hero component without rewriting the contributor branch. The existing hero template and badge now render the authenticated live user through the shared avatar component; unidentified connections retain the agent preview. It preserves the newer connected-account behavior.

It also completes real-Gateway CI registration and ownership coverage, removes the indexed-fixture type error, and avoids a duplicated raw-copy badge.

User Impact

Signed-in users see their own name, email, and avatar. Renames and name clears from another connected browser tab update the hero. Long email addresses wrap at narrow widths without clipping the badge. Unidentified connections keep their existing agent preview.

Evidence

  • The original failure was reproduced before repair: the hero showed the agent instead of the authenticated person.
  • The saved candidate passed 30 focused unit tests, 33 ownership tests, 11 browser tests including an isolated real-Gateway two-tab rename/clear flow, the production UI build/performance gate, and changed-file checks.
  • After rebasing onto current main, the independent review is clean for P0/P1/P2. Fresh tests, browser proof, and exact-head CI are being verified before landing; current results and sanitized screenshots will be attached below.
  • Production delta: +43/-4 (net +39), for the authenticated avatar/identity path and narrow layout. One shared hero template/badge avoids duplicated rendering. No baseline, suppression, dependency, or database changes.

Original contribution

Original implementation and regression coverage by Jacqueline Henriksen (@jjjhenriksen) in #136736, preserved with Git co-author credit at her public GitHub noreply address. This replacement keeps the original PR intact until the fix lands.


View the OpenClaw team session

Adapt the authenticated-user hero from #136736 to the current shared hero
component. Honor live name clearing, preserve unidentified agent previews,
and cover shared avatars and narrow email layout. Register the real-Gateway
two-client regression in CI and its ownership inventory.

Original implementation and regression coverage by Jacqueline Henriksen
(@jjjhenriksen) in #136736; preserved in this maintainer replacement.

Co-authored-by: Jacqueline Henriksen <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 4, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 4, 2026 22:25
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 7:52 PM ET / 23:52 UTC.

ClawSweeper review

What this changes

The PR makes Settings → Profile show the connected user’s live name, email, and shared avatar, preserves the agent preview for unidentified connections, and adds browser coverage and CI registration.

Merge readiness

✅ Ready for maintainer review

Still needed: the reviewed main revision continues to show the default agent in the Profile header. No blocking introduced defect was identified. This maintainer replacement preserves the original contribution while adapting it to the current shared component.

Priority: P2
Reviewed head: 7cd7cdfcf387d0dac9588cccc063cbdab57a34c5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with relevant regression coverage and no blocking source finding; execution results were not independently reproduced.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this bot-authored maintainer replacement. Its new real-Gateway test exercises profile rendering and two-tab rename/clear behavior, but source inspection and the reported earlier run are not independently verified execution of this head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this bot-authored maintainer replacement. Its new real-Gateway test exercises profile rendering and two-tab rename/clear behavior, but source inspection and the reported earlier run are not independently verified execution of this head.
Evidence reviewed 10 items Pinned introduction and merge ownership: Raw commit records confirm the original head’s parent and the test merge’s ordered base/head parents. The test-merge delta contains only the nine introduced paths; the unrelated base-only documentation and helper changes are not PR removals.
Current main still needs the repair: The fetched main hero derives its name, handle, and avatar exclusively from the agent. Its hero and page blobs exactly match the pinned merge-base versions, whose caller supplies the default agent without the connected user.
Live identity owner and caller: The page already subscribes to the Gateway snapshot and resolves its current self user. The patch passes that existing state into the hero rather than creating another profile lookup or reviving a cached users.self display name after a clear.
Findings None None.
Security None None.

How this fits together

The Profile page receives the connected user’s identity from Gateway presence and uses profile RPCs for editing. Its header now renders that live identity through the avatar component already used elsewhere in the Control UI.

flowchart TD
  A[Gateway connection and presence] --> B[Current user snapshot]
  B --> C{User identity available?}
  C -->|Yes| D[Live user name and shared avatar]
  E[Default agent identity] --> F[Agent preview]
  C -->|No| F
  D --> G[Profile header]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +39, Tests +205, Config +1. Total +245 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 3 43 4 +39
Tests 5 237 32 +205
Docs 0 0 0 0
Config 1 1 0 +1
Generated 0 0 0 0
Other 0 0 0 0
Total 9 281 36 +245

Review metrics

Metric Value Why it matters
Production versus test growth Production +39 net lines; tests and test support +205 net lines; CI registration +1 line Production growth adds the missing user-rendering branch and responsive layout while retaining the requested agent preview, without duplicating the avatar loader or overall hero template.

Root-cause cluster

Relationship: canonical
Canonical: #138670
Summary: The body explicitly identifies this as the maintainer replacement for the same profile-header defect; neither branch is proven merged.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep one shared hero template driven by live Gateway identity, reuse the existing authenticated avatar owner, and retain the explicitly supported unidentified-agent preview.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: connect as a named user to a Gateway with a differently named default agent and open Settings → Profile; current main unconditionally renders that agent in the header. This review did not execute the scenario.

Is this the best way to solve the issue?

Yes. Supplying the existing live self-user snapshot at the rendering boundary is preferable to another profile fetch or a cached-name fallback, and reusing the shared avatar component preserves its established loading behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c7dc2c68e246.

Labels

Label changes:

  • add P2: This repairs a bounded Profile identity-display defect without evidence of blocked onboarding, lost data, or changed authorization.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this bot-authored maintainer replacement. Its new real-Gateway test exercises profile rendering and two-tab rename/clear behavior, but source inspection and the reported earlier run are not independently verified execution of this head.

Label justifications:

  • P2: This repairs a bounded Profile identity-display defect without evidence of blocked onboarding, lost data, or changed authorization.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this bot-authored maintainer replacement. Its new real-Gateway test exercises profile rendering and two-tab rename/clear behavior, but source inspection and the reported earlier run are not independently verified execution of this head.

Evidence

What I checked:

  • Pinned introduction and merge ownership: Raw commit records confirm the original head’s parent and the test merge’s ordered base/head parents. The test-merge delta contains only the nine introduced paths; the unrelated base-only documentation and helper changes are not PR removals. (0cc441175637)
  • Current main still needs the repair: The fetched main hero derives its name, handle, and avatar exclusively from the agent. Its hero and page blobs exactly match the pinned merge-base versions, whose caller supplies the default agent without the connected user. (ui/src/pages/profile/profile-hero.ts:47, c7dc2c68e246)
  • Live identity owner and caller: The page already subscribes to the Gateway snapshot and resolves its current self user. The patch passes that existing state into the hero rather than creating another profile lookup or reviving a cached users.self display name after a clear. (ui/src/pages/profile/profile-page.ts:445, 7cd7cdfcf387)
  • Existing avatar implementation reused: The hero uses the existing viewer-avatar component. Its callee retains canonical Gateway-route validation, authenticated shared blob loading, credential-context invalidation, and image-error fallback; those owners are unchanged. (ui/src/pages/profile/profile-hero.ts:28, 7cd7cdfcf387)
  • Focused behavior and sibling coverage: Inspected assertions cover read-only viewers, same-profile rename and name clearing, unidentified-agent avatars, shared authenticated user-avatar blobs, and narrow email layout. The real-Gateway test uses two browser tabs to exercise a rename followed by a clear. These are source-inspected tests, not reviewer-executed results. (ui/src/e2e/profile-page.real-gateway.e2e.test.ts:120, 7cd7cdfcf387)
  • CI scheduling and security scope: The new real-Gateway test is registered in the existing serial test inventory and explicit real-Gateway workflow command. The workflow change does not alter permissions, action pins, credentials, or dependency installation. (.github/workflows/ci.yml:2733, 7cd7cdfcf387)

Likely related people:

  • Colin Johnson: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • scoootscooob: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Superseded by #136736, merged at b938c5c (fix(ui): show primary user in multi-agent profile hero), which fixes the same defect at the same owner (profile hero now consumes live identity, keeps editor drafts, and shares avatar ownership). Closing this duplicate; nothing from this branch was needed on top of the landed change.

@steipete steipete closed this Sep 5, 2026
@RomneyDa
RomneyDa deleted the roboclaw/profile-primary-user-136736 branch October 22, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants