Skip to content

fix: keep login emails out of shared user labels - #191920

Merged
vincentkoc merged 7 commits into
mainfrom
fix/team-profile-privacy
Nov 3, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
fix/team-profile-privacy

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes private login emails appearing in shared presence, Activity links, and owner menus when a person has no display name.

User Impact

People keep their chosen display name, otherwise use their verified GitHub handle. Unresolved identities use a neutral label instead of their login email.

Why This Change Was Made

Resolve the fallback from the canonical profile and stop publishing authentication emails in presence. Shared UI labels and pickers no longer fall back to email; unnamed people keep the Activity unresolved grouping.

No schema, configuration, or dependency changes. Release-note context: prevent login emails from appearing as shared user labels and Activity slugs.

Evidence

  • Baseline regression reproduced the leak in both selected cases; the fixed presence test passes.
  • 129 backend and 105 UI cases covered across 10 focused files. Two stale expectations were corrected and their targeted retries passed; the final desktop/phone fixture also passes both cases. These are combined focused results, not a claimed one-shot full rerun.
  • Before/after browser E2E both pass using the real built UI with synthetic identities. Formatting and targeted lint pass.
  • Earlier committed-range autoreview of cc215ba3345114d7ebbd39cad01fb0a59923f40e against 66e2433288b23cb4c4fef5889f2fbcfcc19f9601 found no actionable P0–P2 findings. The subsequent sidebar assertion correction was independently reviewed and its focused case, formatting, and lint passed. Those results retain their original revision attribution.
  • Current head: 41d8e6dadf9d4f9ac9b1491ead6bb3ada7aea4da, based on budget repair 51e972fb4048c8e55b8449df1e48220fcf40d1ad. All seven rebased commits are signed; their complete patch is byte-identical to reviewed head 04728d4829c5aea00b533ff339b39ad42936c0a0, with no intervening changes to the touched files. Earlier CI exposed three stale assertions because presence snapshots now explicitly clear user with undefined; the two assertion sites require that exact value. The matcher contract was verified against installed Vitest 5.0.5.
  • A connected review finding is fixed: unnamed shared owners retain their established “Shared owner” label in Activity. The existing desktop/phone regression now covers resolved grouping and the phone label while preserving the two unresolved-identity privacy cases. This uses the existing shared-owner classification, with no new identity policy.
  • Independent review approved both follow-up changes and the final rebase. The final committed-range autoreview at 04728d4 was scoped-clean. Formatting and diff checks pass. Actual CI UI shard 3 passed all 21 Activity cases, including the updated desktop and phone privacy regressions. That run failed on inherited test-budget debt and two unrelated About-page fixtures; all three causes are repaired in the new base. The final exact-head hosted review is clean, with no findings or remaining rank-up moves. Exact-head CI completed with one inherited root failure: five Channels save assertions select the status header instead of the existing footer after #191432. The entire Channels owner/test tree and relevant harness, locale and dependency inputs are unchanged by this PR. The baseline ratchet, lint, other UI shards, PostgreSQL and every remaining applicable job passed. Landing uses the documented inherited-failure route for that UI job; the failed CI is not represented as green. No inherited-failure exception is requested.
  • Production delta: −13 lines; tests: +96, matched by the allocation. Canonical profile projection owns the GitHub fallback; authenticated presence owns removal of private principals. No schema, configuration, or dependency changes.

Synthetic screenshots: the email disappears from shared labels and the generated Activity slug; the known public handle remains unchanged. Both rendered PR images were fetched and byte-verified.

Before After
Before: synthetic login email appears in shared identity labels After: safe labels and unresolved identity grouping

@vincentkoc vincentkoc self-assigned this Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: S labels Nov 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 3, 2026 13:24
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 41d8e6dadf9d4f9ac9b1491ead6bb3ada7aea4da
  • Maintainer: @vincentkoc
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/authenticated-presence-user.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

Please review final head cc215ba3345114d7ebbd39cad01fb0a59923f40e, especially canonical profile name fallback, authenticated presence privacy, and Activity/owner-picker labels. Focused regression results and verified synthetic before/after screenshots are in the PR body.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces login-email fallbacks in shared user labels with verified handles, opaque profile IDs, or neutral labels.

Example: An unnamed person signs in as [email protected].

  • Before: Shared presence and Activity labels display [email protected].
  • After: Shared labels display Person or an opaque identity, while verified public handles remain visible.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused privacy repair with inspected visual evidence, distinct regression coverage, and no remaining actionable finding.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected synthetic before/after screenshots exercise the built Control UI sidebar and Activity people picker, showing the private email removed and the public handle preserved; backend publication is supported by focused source-level regressions rather than a live Gateway snapshot.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Private login emails appear to other users as shared identity labels and Activity link text.
Reason: The maintainer-authored direction removes unintended disclosure while preserving chosen names, verified handles, and the established shared-owner distinction.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a concrete privacy leak still present on main. No actionable defects remain in the reviewed patch; exact-head CI is pending.

Priority: P2
Reviewed head: 41d8e6dadf9d4f9ac9b1491ead6bb3ada7aea4da

Before merge

None.

Findings

None.

Agent review details

How this fits together

The profile catalog projects durable identity facts into Gateway presence and session directories, which the Control UI renders as people, assignment choices, and Activity links.

flowchart LR
  A[Authenticated login] --> B[Canonical profile catalog]
  B --> C[Display projection]
  C --> D[Gateway presence]
  C --> E[Session directory]
  D --> F[Shared UI labels]
  E --> F
  F --> G[Activity links]
Loading

Technical review

Best possible solution:

Keep private login principals inside authentication and use the existing canonical display projection for shared identity surfaces.

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

Current main publishes the authenticated email and uses it when a shared identity lacks a name; the supplied before screenshot demonstrates that visible result with synthetic data.

Is this the best way to solve the issue?

The patch fixes disclosure at the presence producer and reuses existing profile and label owners, with no new state or parallel identity mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 902faa3e5226.

Provenance checked

  • Authenticated presence changes intended behavior with a stated reason (c44b016: Refresh saved display names and revisioned avatars across live browser connections.)
  • Canonical profile display projection keeps the original intent (65e49fa: Separate display projection from current identity and authority facts for requester-bound publication.)
  • Directory-backed owner choices changes intended behavior with a stated reason (fix(ui): show registered teammates in session assignment #136978: Offer registered teammates independently of presence and session filters, retaining canonical assignment identities.)
  • Shared-owner labels keeps the original intent (b6e6c2f: Distinguish shared-secret connections from individually signed-in people.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit b6e6c2f adds ui/src/lib/presence-users.ts:97 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b6e6c2fd0a66; files: ui/src/lib/presence-users.ts)
  • Colin Johnson: Raw commit c44b016 adds src/gateway/authenticated-presence-user.ts:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: c44b01614d40; files: src/gateway/authenticated-presence-user.ts)
  • Shakker: Raw commit 65e49fa adds src/state/user-profiles-internal.ts:292 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 65e49fa2008c; files: src/state/user-profiles-internal.ts)

PR surface

Source -13, Tests +96, Other +2. Total +85 across 18 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 15 28 -13
Tests 11 127 31 +96
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 18 144 59 +85

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +15/-28; tests and support +127/-31. Production shrinks by 13 lines; the 96-line regression increase covers presence disclosure, directory labels, Activity grouping, and generated links.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.

Label justifications:

  • P2: The patch fixes unintended login-email disclosure across shared identity displays without changing authentication or permissions.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (4 earlier review cycles)
  • reviewed 2026-11-03T13:33:54.472Z sha cc215ba :: needs maintainer review before merge. :: none
  • reviewed 2026-11-03T13:46:56.972Z sha 681fbbb :: needs maintainer review before merge. :: none
  • reviewed 2026-11-03T15:19:45.191Z sha 3b9ad42bc6439a65d4a85b796ec1cabbd8570875 :: needs changes before merge. :: [P3] Preserve the recognized shared owner in Activity
  • reviewed 2026-11-03T15:41:39.544Z sha 04728d4829c5aea00b533ff339b39ad42936c0a0 :: needs maintainer review before merge. :: none

Reviewed November 3, 2026, 11:04 AM ET / 16:04 UTC (Revision 5).

@vincentkoc
vincentkoc enabled auto-merge (squash) November 3, 2026 13:36
@vincentkoc
vincentkoc disabled auto-merge November 3, 2026 13:39
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Final head: 681fbbb. Since the prior reviewed head, only a stale sidebar tooltip assertion changed to the neutral Person label. The email-only fixture input is preserved; its focused test, formatting, lint, and independent delta review pass. The PR body contains the updated evidence.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Nov 3, 2026
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@vincentkoc
vincentkoc force-pushed the fix/team-profile-privacy branch from 04728d4 to 41d8e6d Compare November 3, 2026 15:58
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 41d8e6dadf9d4f9ac9b1491ead6bb3ada7aea4da. The shared-owner finding is fixed through the existing canonical classification. Actual UI CI passed all 21 Activity cases, including both desktop/phone privacy regressions. Final committed-range review of 04728d4 was scoped-clean; the new signed rebase preserves its complete patch byte-for-byte and has no touched-file base overlap. Main now includes the separately approved zero-slack test-budget reconciliation and both unrelated About fixture repairs. Fresh exact-head CI is pending; no inherited-failure exception is requested.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@vincentkoc
vincentkoc merged commit 1248bee into main Nov 3, 2026
164 of 167 checks passed
@vincentkoc
vincentkoc deleted the fix/team-profile-privacy branch November 3, 2026 16:39
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
* fix: keep login emails out of shared user labels

* test: align privacy regression line allocation

* test: align presence assertions with private identity labels

* test: preserve media query methods in privacy fixture

* test: align sidebar tooltip with private identity label

* test: assert explicit deferred identity clears

* fix: preserve shared owner labels in activity
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 gateway Gateway runtime 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. security-sensitive-changed 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.

1 participant