Skip to content

Show shared chat speaker labels#22

Merged
TraderSamwise merged 1 commit into
masterfrom
feat/multi-user-chat-ui-labels
May 24, 2026
Merged

Show shared chat speaker labels#22
TraderSamwise merged 1 commit into
masterfrom
feat/multi-user-chat-ui-labels

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • type actor/share metadata in app chat events
  • render speaker labels on user bubbles when shared history includes actor metadata
  • add unit coverage for speaker-label normalization

Verification

Summary by CodeRabbit

  • New Features
    • Messages now display speaker names above content for better identification in conversations.
    • Extended support for multi-user chat scenarios with speaker information.
    • Messages now include metadata for enhanced conversation context and sharing capabilities.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 42a10a0f-d237-439d-8cfa-aa4d3f07ff11

📥 Commits

Reviewing files that changed from the base of the PR and between 4aa6bd9 and 5a63113.

📒 Files selected for processing (3)
  • app/components/MessageBlock.test.ts
  • app/components/MessageBlock.tsx
  • app/lib/events.ts

📝 Walkthrough

Walkthrough

This PR adds speaker label support to chat messages by introducing actor metadata types, extracting normalized display names from actors, rendering them above message content, and testing the normalization logic across types, component implementation, and unit tests.

Changes

Speaker Labels for Chat Messages

Layer / File(s) Summary
Chat actor and message type contracts
app/lib/events.ts
Introduces ChatActor interface with userId, displayName, optional email, and optional role ("owner" or "guest"). Extends ChatMessage with optional actor, shareId, and chatMode fields to carry conversational metadata.
Speaker label extraction and rendering
app/components/MessageBlock.tsx
Exports messageSpeakerLabel helper that normalizes actor displayName by trimming and collapsing whitespace (returns null if absent). MessageBlock computes the label for user messages and conditionally renders it as a small bold text element above message content.
Speaker label normalization tests
app/components/MessageBlock.test.ts
Adds test suite verifying messageSpeakerLabel normalizes whitespace in actor displayName and returns null when actor metadata is missing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • TraderSamwise/aimux#18: Extends the new ChatMessage actor and sharing metadata with multi-user session support and actor display name sanitization for shared chat contexts.

Poem

🐰 A speaker steps up with their name on display,
Trimmed, collapsed, just the right way.
Actor metadata flows through the chat,
Labels adorn each message—how neat is that!
Shared sessions now know who's who in the fray. 🎙️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Show shared chat speaker labels' directly and clearly describes the main change: adding speaker label rendering to messages in shared chats, which is the primary objective across all modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/multi-user-chat-ui-labels

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

app/components/MessageBlock.test.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

app/components/MessageBlock.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

app/lib/events.ts

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.


Comment @coderabbitai help to get the list of available commands and usage tips.

@TraderSamwise
TraderSamwise merged commit f5a42f9 into master May 24, 2026
1 check passed
@TraderSamwise
TraderSamwise deleted the feat/multi-user-chat-ui-labels branch May 24, 2026 09:44
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.

1 participant