Repository navigation
fix: show guest self profiles without roster access - #160503
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 1:43 PM ET / 17:43 UTC (Revision 8). ClawSweeper reviewWhat this changesThe Control UI reads a guest’s own Gateway profile without People roster access, displays it read-only in Profile and shared identity views, and adds documentation and regression coverage. Merge readiness✅ Ready for maintainer review Current main still has the reported guest Profile defect. The reviewed head addresses the earlier sender-attribution finding, and no blocking defect was found. The paired issue remains open. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI receives connection identity and permissions from the Gateway, then reads the authenticated user’s profile for display. That identity feeds Profile, the sidebar, and local chat attribution; the Gateway remains responsible for authorizing requests. flowchart LR
A[Gateway handshake] --> C[Self identity store]
B[Presence updates] --> C
C --> D{Own profile needed?}
D --> E[Gateway self profile]
E --> C
C --> F[Profile and sidebar]
C --> G[Local chat attribution]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +204, Tests +326, Docs +2. Total +532 across 38 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. Technical reviewBest possible solution: Use the Gateway’s existing self-profile request as the shared UI identity source, with connection-scoped invalidation and existing Profile write guards. Do we have a high-confidence way to reproduce the issue? Yes. The supplied matched Chromium baseline shows the unidentified guest Profile, and fetched main still contains the presence and write-access gates that cause it. Is this the best way to solve the issue? Yes. The patch reuses the Gateway’s existing authorized self-profile request and keeps profile mutations behind the established write guard. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1d62e67628c1. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
|
Fixed: session-only guests can view and refresh their own Control UI profile while profile editing remains restricted. |
Integrate main to repair the CI merge-result type failure from #160503. Exercise explicit-null self identity through the session-viewer projection while keeping the Online roster payload-only and inclusive. Co-authored-by: VACInc <[email protected]>
Restore authenticated guest self-profile loading and refresh in the Control UI while preserving roster privacy and profile editing permissions. Fixes openclaw#160498.
Closes #160498.
What Problem This Solves
Authenticated guests with only
operator.sessions.writecan open the Control UI but see an unidentified Profile page. The UI relies on the restricted presence roster for its own identity and requires broad write access before reading Profile. The existingusers.selfAPI already supports the guest's narrower read permission.User Impact
Guests can see and refresh their own name, linked email, and profile details without roster or editing access. Shared identity also reaches the sidebar and local message attribution. Existing name, avatar, preference, and model-account mutation gates remain unchanged. Profile image downloads retain their separate HTTP permission, so session-only users may see initials.
Why This Change Was Made
The Gateway store uses
users.selfwhen Hello does not already identify this connection. Profile uses the same request owner for its detailed read and manual refresh. Concurrent reads share the pending request; client, Hello, connection, and request ownership prevent stale results from restoring retired identity.Already identified connections retain immediate chat attribution and their existing live presence updates, including account changes. A new attached identity retires a pending self read. Session-only guests use the canonical self response and the existing profile-change notification without requiring presence access. Reconnect can retire an in-flight read; profile writes still prevent reconnect while saving.
No permissions, settings, protocol fields, dependencies, or stored identity records change. Live Team, sign-in configuration, and avatar transport are outside this repair.
Evidence
Exact head:
540c8cd4ae1c1693085b0eb20a90c9196871bc19.cbc0f01aa24; it is unrelated to this patch. The earlier daemon export-collision baseline failure is also repaired upstream by385ac289.Measured final remote costs: owner file 2.979 s; 13 browser cases 45.079 s; affected test types 11.244 s; UI production types 9.148 s. The retained 424-test batch took 15.919 s. The newly expanded access file passes locally in 2.05 s. Browser coverage exercises the actual routes, Gateway requests, and visible permission state.
Visual evidence
Exact-head Appearance to Profile navigation
proof.webm
Visual verification
540c8cd4ae1c1693085b0eb20a90c9196871bc19