Skip to content

feat(llc): add teams to user#124

Merged
Brazol merged 5 commits into
mainfrom
feat/add-teams-to-user
Jun 30, 2026
Merged

feat(llc): add teams to user#124
Brazol merged 5 commits into
mainfrom
feat/add-teams-to-user

Conversation

@Brazol

@Brazol Brazol commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • User profiles now include team membership via a teams field.
    • User record comparisons now include team membership to keep equality/hash behavior consistent.
  • API Changes
    • User.guest now accepts an optional display name (User.guest(userId, {name})) instead of always using the userId as the name.
  • Documentation
    • Added an “Upcoming” → “✨ Features” entry to the changelog for team membership support.

@Brazol
Brazol requested a review from a team as a code owner June 30, 2026 11:28
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Brazol, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 712247b1-f85d-4a1e-9131-ab7343eb85ff

📥 Commits

Reviewing files that changed from the base of the PR and between 95201e7 and 29fa6dc.

📒 Files selected for processing (1)
  • packages/stream_core/lib/src/user/user.dart
📝 Walkthrough

Walkthrough

User now carries a teams list, includes it in equality, and allows User.guest to take an optional display name. The changelog adds an Upcoming feature note for the new field.

Changes

User teams field

Layer / File(s) Summary
User teams field and equality
packages/stream_core/lib/src/user/user.dart
The User constructor accepts teams, the teams field is declared, and Equatable props include teams.
Guest factory and changelog
packages/stream_core/lib/src/user/user.dart, packages/stream_core/CHANGELOG.md
User.guest becomes a factory with an optional name, and the changelog adds an Upcoming Features entry for the teams field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hop with teams both near and far,
My guest name shines like a little star.
Lists and props now bounce in tune,
In changelog moonlight, new notes bloom soon.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is empty, so the required template sections like Linear, CLA, and change summary are missing. Fill in the template with a Linear ticket, CLA checklist, a description of the change and testing, and screenshots or videos if relevant.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: adding teams to the User model.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-teams-to-user

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.26%. Comparing base (d80ce32) to head (29fa6dc).

Files with missing lines Patch % Lines
packages/stream_core/lib/src/user/user.dart 0.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #124   +/-   ##
=======================================
  Coverage   37.26%   37.26%           
=======================================
  Files         175      175           
  Lines        6986     6986           
=======================================
  Hits         2603     2603           
  Misses       4383     4383           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/stream_core/lib/src/user/user.dart`:
- Around line 19-20: The User value object is storing a caller-provided teams
list that can still be mutated after construction, which can break
Equatable-based equality and lookups; update the User constructor and any
related copy/serialization paths in user.dart so teams is defensively copied
into an immutable collection before assignment, and keep the User/teams handling
consistent wherever the field is created or compared.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1cc7e15d-ba50-42ae-811d-0e081fa1dd90

📥 Commits

Reviewing files that changed from the base of the PR and between d80ce32 and 4a8de18.

📒 Files selected for processing (2)
  • packages/stream_core/CHANGELOG.md
  • packages/stream_core/lib/src/user/user.dart

Comment thread packages/stream_core/lib/src/user/user.dart

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/stream_core/lib/src/user/user.dart`:
- Around line 23-31: `User.guest` in the `User` class has been changed from a
const-compatible API to a factory, which breaks existing `const User.guest(...)`
call sites. Update the `User.guest` constructor to remain const-compatible by
using a delegating const constructor pattern inside `User`, while still
supporting the optional `name` parameter and preserving the existing
`User.guest` symbol for callers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0b8bbc52-1809-4d2e-884f-306d14cbac07

📥 Commits

Reviewing files that changed from the base of the PR and between 4a8de18 and 95201e7.

📒 Files selected for processing (1)
  • packages/stream_core/lib/src/user/user.dart

Comment thread packages/stream_core/lib/src/user/user.dart Outdated
@Brazol
Brazol merged commit 31ca84f into main Jun 30, 2026
10 of 11 checks passed
@Brazol
Brazol deleted the feat/add-teams-to-user branch June 30, 2026 18:49
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