Skip to content

feat: multi-user identity for workspace chat#408

Merged
zomux merged 2 commits into
developfrom
feature/multi-user-identity
May 25, 2026
Merged

feat: multi-user identity for workspace chat#408
zomux merged 2 commits into
developfrom
feature/multi-user-identity

Conversation

@zomux

@zomux zomux commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Identity dialog: When a user opens the workspace, a styled dialog prompts them for their name (cookie-persisted, no re-entry needed). Authenticated users (Google sign-in) skip the dialog entirely.
  • Sender metadata on messages: Each message now carries sender_id and sender_name in the event payload. Chat view shows actual names instead of "You" for all human messages.
  • Color-coded avatars: Each user gets a deterministic HSL color based on their identity, so users are visually distinguishable.
  • Online users sidebar: A new section shows who is currently in the workspace with green presence dots, powered by heartbeat events (15s interval, 45s staleness pruning).
  • Backend: POST /v1/events now returns payload in the response for consistency.

Differences from PR #380

This is an independent, cleaner implementation of the same feature:

Aspect PR #380 This PR
Name entry window.prompt() (blocking modal) Styled Radix Dialog
Storage localStorage Cookies (1-year, SameSite=Lax)
Language Chinese-only prompt text English
Empty name handling Infinite while loop Dialog stays open, input disabled
Scope Bundles Launcher/Kimi/daemon fixes Identity feature only
Backend changes Adds sender fields to request model Passes through payload as-is

Test plan

  • Open workspace without being logged in — identity dialog should appear
  • Enter name and submit — name persists in cookie, dialog closes
  • Send messages — messages show your name, other users' messages show their names
  • Open workspace in second browser/incognito — should prompt for name again, show as different user
  • Check sidebar — online users section shows who is connected
  • Close tab and reopen — name should be remembered from cookie
  • Sign in with Google — identity dialog should NOT appear, email/displayName used automatically
  • npx tsc --noEmit passes with no errors

🤖 Generated with Claude Code

nebukaga added 2 commits May 25, 2026 05:47
The dialog was only rendered inside ChatView, which is replaced by
MonitorGrid in monitor mode. Now the overlay also hosts the dialog.
Users must enter their name when opening the workspace. The name is
stored in a cookie so it persists across sessions. Messages now carry
sender_id and sender_name in the event payload, letting the chat view
show who said what instead of "You" for every human message.

- Cookie-based identity with styled dialog (replaces window.prompt)
- Color-coded user avatars based on name hash
- Online users section in sidebar with presence heartbeat
- Backend returns payload in POST /v1/events response
@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openagents-workspace Ready Ready Preview, Comment May 25, 2026 6:11am

Request Review

@zomux zomux merged commit c21b43d into develop May 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants