Skip to content

fix(ui): identify the signed-in user in owner filters - #126052

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
openclaw/show-current-user-as-first-row
Aug 18, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
openclaw/show-current-user-as-first-row

Conversation

@clawsweeper

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where authenticated users opening the session owner filter could not identify their own row. The signed-in user stayed in the server-provided alphabetical order, or could be absent when they did not own a currently listed session.

Why This Change Was Made

The sidebar now joins the authoritative authenticated profile into its owner options, pins that profile ahead of the other avatar rows, and renders the localized label as Name (You). Identity data remains unchanged so avatar initials and profile pictures do not inherit the suffix. The shared projection covers both the global session filter and catalog filter without protocol, config, or storage changes.

AI-assisted. Production LOC: +37/-12 (net +25) for the authenticated-profile join and the two shared menu consumers. Tests: +50/-0.

User Impact

People can immediately recognize themselves in the owner picker. Their own profile is the first avatar row and is explicitly labeled, while all existing owner and “Involving me” filters keep their current behavior.

Evidence

Before

Owner filter before

After

Owner filter after

  • Pre-fix regression reproduced: the focused sidebar test failed because profile-patrick was missing before the owner-facet repair.
  • node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts ui/src/components/app-sidebar-session-navigation-logic.test.ts — 299 passed.
  • AWS Crabbox browser proof run_bd24c37bc4a0 — focused Playwright owner-filter scenario passed; screenshot inspected; lease released.
  • node scripts/check-changed.mjs -- <changed UI files> — formatting, i18n, core-test/UI typechecks, lint, dependency guards, and repository ratchets passed.
  • .agents/skills/autoreview/scripts/autoreview --mode uncommitted --stream-engine-output — clean, no accepted/actionable findings.

Pin the authenticated profile first and label it as Name (You) in the shared session owner menus.
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper
clawsweeper marked this pull request as ready for review August 18, 2026 22:16
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 18, 2026
@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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 18, 2026, 6:24 PM ET / 22:24 UTC.

ClawSweeper review

What this changes

The PR adds the authenticated profile to shared session-owner filter options, places it first, and labels it “(You)” in session and catalog menus.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep open: a valid Gateway agent/profile ID collision makes this PR label an agent row as the signed-in user in both owner menus.

Priority: P2
Reviewed head: a9267862a8260b880075d894d11c196fcf80317a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Submitted focused browser evidence and regression coverage support the goal, but the agent/profile collision is a merge-blocking correctness gap.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-labeled PR is exempt from the external-contributor proof gate; its body nevertheless supplies before/after attachments and a cited browser run.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-labeled PR is exempt from the external-contributor proof gate; its body nevertheless supplies before/after attachments and a cited browser run.
Evidence reviewed 5 items Current-main behavior: Current main uses only the server owner facet, so an authenticated profile absent from that facet cannot appear in the owner menu.
Shared projection and callers: The PR centralizes profile insertion in the sidebar projection and both menu consumers receive the same projected options.
Authoritative collision contract: Gateway owner facets intentionally retain an agent over a human for an ID-only collision, so the raw authenticated ID is not sufficient to identify a human menu row.
Findings 1 actionable finding [P2] Avoid labeling a colliding agent as the signed-in user
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/e2e/session-ownership.e2e.test.ts

Result: FAIL (partial) — step 2 expect_output session-ownership.e2e.test.ts: expected terminal output was not visible within 30 seconds: "session-ownership.e2e.test.ts"

node scripts/run-vitest.mjs ui/src/e2e/session-ownership.e2e.test.ts
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-126052-GnrMXt/target$ node scripts/run-vitest.mjs ui/src/e2e/session-ownership.e2e.test.ts
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
node scripts/run-vitest.mjs ui/src/e2e/session-ownership.e2e.test.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-126052-GnrMXt/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126052-GnrMXt/target






























Assertions:

  • FAIL expect_output: session-ownership.e2e.test.ts

How this fits together

The Control UI combines the Gateway’s session-owner facet with the authenticated profile to build owner filters. Those options drive both the session sidebar and catalog view menus.

flowchart LR
  A[Gateway owner facet] --> C[Sidebar owner projection]
  B[Authenticated profile] --> C
  C --> D[Shared owner menu]
  D --> E[Session filter]
  D --> F[Catalog filter]
Loading

Decision needed

Question Recommendation
Should this protected maintainer PR take the focused agent/profile-collision repair and rerun the failed UI E2E shard before merge? Repair the collision and revalidate: Require a human owner before applying the signed-in-user label, add focused collision coverage, and rerun the affected UI E2E checks.

Why: The maintainer label requires explicit human handling, while the remaining code change is mechanical but merge-blocking.

Before merge

  • Avoid labeling a colliding agent as the signed-in user (P2) - This compares only IDs, but the Gateway intentionally keeps a configured agent when a human profile and agent share an ID. That agent reaches both menus and is rendered as “(You)”; require a human owner (or pass the validated self owner) and cover the collision.
  • Resolve merge risk (P1) - This bug-fix PR has production +25 lines; the added projection is justified by the missing profile join, but the collision repair should keep the identity rule centralized.
  • Resolve merge risk (P1) - The supplied check context has one failed UI E2E shard and other checks still running; its log was not available because GitHub DNS failed in this review environment.
  • Complete next step (P2) - The protected maintainer label and one mechanical P2 finding require owner handling rather than automated repair dispatch.

Findings

  • [P2] Avoid labeling a colliding agent as the signed-in user — ui/src/components/app-sidebar-session-menu-renderers.ts:91-93
Agent review details

Security

None.

PR surface

Source +61, Tests +14. Total +75 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 6 73 12 +61
Tests 1 14 0 +14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 87 12 +75

Review metrics

Metric Value Why it matters
Production versus test LOC production +25, tests +50 The added shared projection and menu plumbing solve a visible owner-filter gap, but the positive production delta needs the collision repair before merge.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-ownership.e2e.test.ts, serialized state: ui/src/test-helpers/app-sidebar-cases/session-ownership.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the centralized profile projection, require the “(You)” label to match a human owner, add collision coverage, then clear exact-head UI E2E.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the centralized profile projection, require the “(You)” label to match a human owner, add collision coverage, then clear exact-head UI E2E.

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

Yes, source-reproducible: current main excludes the authenticated profile from the facet-only projection, and the PR’s ID-only label predicate demonstrably mislabels the Gateway’s tested agent/profile collision state.

Is this the best way to solve the issue?

No. Centralizing profile insertion is the right layer, but the label must be limited to a validated human owner rather than a raw matching ID.

Full review comments:

  • [P2] Avoid labeling a colliding agent as the signed-in user — ui/src/components/app-sidebar-session-menu-renderers.ts:91-93
    This compares only IDs, but the Gateway intentionally keeps a configured agent when a human profile and agent share an ID. That agent reaches both menus and is rendered as “(You)”; require a human owner (or pass the validated self owner) and cover the collision.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: The patch causes an incorrect signed-in-user label in a valid owner-filter state, with limited UI blast radius.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-labeled PR is exempt from the external-contributor proof gate; its body nevertheless supplies before/after attachments and a cited browser run.

Label justifications:

  • P2: The patch causes an incorrect signed-in-user label in a valid owner-filter state, with limited UI blast radius.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-labeled PR is exempt from the external-contributor proof gate; its body nevertheless supplies before/after attachments and a cited browser run.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current owner-filter boundary and the earlier people-sorting feature across the affected sidebar files. (role: feature-history owner and recent area contributor; confidence: high; commits: ef2241098530, e0262e6aa4a6, 7e25a84484e2; files: ui/src/components/app-sidebar-session-navigation-logic.ts, ui/src/components/app-sidebar-session-menu-renderers.ts, ui/src/components/session-owner-chip.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Require a human owner before applying “(You)” and add the collision regression case.
  • Rerun and inspect the exact-head UI E2E result after the repair.

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.

@Patrick-Erichsen
Patrick-Erichsen merged commit d39a24c into main Aug 18, 2026
192 of 195 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the openclaw/show-current-user-as-first-row branch August 18, 2026 22:49
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
Pin the authenticated profile first and label it as Name (You) in the shared session owner menus.

Co-authored-by: RoboClaw <[email protected]>
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants