Skip to content

fix: show guest self profiles without roster access - #160503

Merged
shakkernerd merged 6 commits into
mainfrom
fix/guest-self-profile
Sep 28, 2026
Merged

shakkernerd merged 6 commits into
mainfrom
fix/guest-self-profile

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #160498.

What Problem This Solves

Authenticated guests with only operator.sessions.write can 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 existing users.self API 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.self when 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.

  • Final remote proof passes all 16 identity regressions, all 13 Profile/guest/sidebar browser cases, UI production types, the affected test type graph, and formatting/lint/line/assertion guards. The fresh matched capture shows three self reads, zero roster reads, zero profile mutation requests, and zero browser exceptions.
  • The wider frozen-candidate run passed 424 unit cases and 73 browser cases. The final two-file partial-presence correction reruns its owner and affected browser paths; unchanged coverage and eight other passing type graphs are retained. The one historical board-fixture clock mismatch is already repaired on the target by cbc0f01aa24; it is unrelated to this patch. The earlier daemon export-collision baseline failure is also repaired upstream by 385ac289.
  • The pending-display regression was observed failing before its repair for broad readers, then passed without weakening its email/identity assertions. Existing reconnect, stale-response, account-switch, avatar, forbidden-read, and readonly-edit controls remain intact. Independent review is clean through P2, and ClawSweeper rates this exact head Platinum with no findings.

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

Before After
Guest sees the OpenClaw agent and a no-personal-profile message Guest sees Test Person and test@example.test with profile editing disabled

Exact-head Appearance to Profile navigation

proof.webm

Visual verification

  • Baseline: 7ceb563
  • Exact head: 540c8cd4ae1c1693085b0eb20a90c9196871bc19
  • Scenario: Open Profile with only operator.sessions.write, an empty presence roster, and the synthetic Test Person profile. Navigate through Appearance back to Profile; verify own identity remains visible with editing disabled.
  • Runtime/build: Maintained Control UI source E2E server; Linux Chromium 153.0.8010.12; exact tested tree 49b3c6cfb7652342f6423524c7846333607dbdb1
  • Own identity: OpenClaw / @main → Test Person / [email protected]
  • users.self requests: Before 0; after 3 over the complete navigation flow
  • users.list requests: 0 before and after
  • Recorded profile update/upload calls: 0 before and after
  • Write controls: Display name and Save disabled; avatar upload absent
  • Browser exceptions: 0 before and after
  • Same Linux browser version, viewport, theme, route, fixture and screenshot framing
  • Exact tested tree and all 38 changed-file hashes match the published head
  • Final owner regression: 16 passed; affected Profile/guest/sidebar browser cases: 13 passed
  • Final UI production and changed test type graph passed; other eight validated type graphs retained for unchanged inputs
  • Expanded prior-head proof: 424 unit cases and 73 browser cases passed; independent board clock assertion already repaired on main
  • Original-resolution screenshots and all 225 frames of the 9-second recording inspected; navigation trigger and settled outcome are visible
  • Both full-resolution screenshots and all 225 recording frames inspected; clear input cue and settled result, synthetic data only

@clawsweeper

clawsweeper Bot commented Sep 28, 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.

@shakkernerd shakkernerd self-assigned this Sep 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: L labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 1:43 PM ET / 17:43 UTC (Revision 8).

ClawSweeper review

What this changes

The 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
Reviewed head: 540c8cd4ae1c1693085b0eb20a90c9196871bc19

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Direct visual proof and focused browser coverage support a coherent repair with no blocking finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The inspected before/after Chromium screenshots show the guest Profile changing from unidentified to a named, read-only self profile; the PR’s browser scenario covers its Gateway requests and controls. Video inspection was unavailable because ffprobe is absent, without negating the screenshot proof. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The inspected before/after Chromium screenshots show the guest Profile changing from unidentified to a named, read-only self profile; the PR’s browser scenario covers its Gateway requests and controls. Video inspection was unavailable because ffprobe is absent, without negating the screenshot proof. No stored-data contract changes.
Evidence reviewed 9 items Current main retains the defect: Fetched main still derives selfUser from presence and only loads Profile identity when canWrite is true; it has no store-owned self-profile request.
Existing Gateway read contract: The Gateway classifies users.self as a session read, accepts session read or its implied write scope, and requires an authenticated user before returning that user’s profile.
Introduced request owner: The new store owner shares pending users.self reads and checks client, Hello, connection phase, and request identity before publishing the result.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +204, Tests +326, Docs +2. Total +532 across 38 files.

View PR surface stats
Area Files Added Removed Net
Source 10 255 51 +204
Tests 27 618 292 +326
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 38 875 343 +532

Review metrics

Metric Value Why it matters
Production and test LOC production +204, tests +326, docs +2 The shared request owner accounts for the production growth; the added coverage exercises browser behavior and request lifecycle risks.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #160498
Summary: This PR’s closing reference and code target the open guest Profile report.

Members:

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

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The patch repairs a limited Control UI identity display failure for authenticated session-only guests.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The inspected before/after Chromium screenshots show the guest Profile changing from unidentified to a named, read-only self profile; the PR’s browser scenario covers its Gateway requests and controls. Video inspection was unavailable because ffprobe is absent, without negating the screenshot proof. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected before/after Chromium screenshots show the guest Profile changing from unidentified to a named, read-only self profile; the PR’s browser scenario covers its Gateway requests and controls. Video inspection was unavailable because ffprobe is absent, without negating the screenshot proof. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The inspected before/after Chromium screenshots show the guest Profile changing from unidentified to a named, read-only self profile; the PR’s browser scenario covers its Gateway requests and controls. Video inspection was unavailable because ffprobe is absent, without negating the screenshot proof. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: 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.

History

Review history (7 earlier review cycles)
  • reviewed 2026-09-28T15:04:21.401Z sha 114bdfb :: blocked before merge. :: [P2] Preserve sender attribution while the self read is pending
  • reviewed 2026-09-28T15:42:08.031Z sha c297d27 :: blocked before merge. :: none
  • reviewed 2026-09-28T15:58:00.273Z sha c297d27 :: blocked before merge. :: none
  • reviewed 2026-09-28T16:13:24.529Z sha 698ab47 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T16:31:17.133Z sha c696a85 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T17:12:40.830Z sha 13ee045 :: blocked before merge. :: none
  • reviewed 2026-09-28T17:25:34.452Z sha 540c8cd :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 28, 2026
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 28, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 28, 2026
@shakkernerd
shakkernerd merged commit de8dcfa into main Sep 28, 2026
108 of 109 checks passed
@shakkernerd
shakkernerd deleted the fix/guest-self-profile branch September 28, 2026 17:46
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: session-only guests can view and refresh their own Control UI profile while profile editing remains restricted.

roboclaw-bot added a commit that referenced this pull request Sep 28, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
Restore authenticated guest self-profile loading and refresh in the Control UI while preserving roster privacy and profile editing permissions.

Fixes openclaw#160498.
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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

[Bug]: Session-only guests cannot see their own Control UI profile

1 participant