Skip to content

test(ui): Add enhanced mentions docs screenshots #2778

Open
VelikovPetar wants to merge 5 commits into
masterfrom
feature/add_enhanced_mentions_docs_screenshots
Open

test(ui): Add enhanced mentions docs screenshots #2778
VelikovPetar wants to merge 5 commits into
masterfrom
feature/add_enhanced_mentions_docs_screenshots

Conversation

@VelikovPetar

@VelikovPetar VelikovPetar commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Adds docs screenshots for enhanced mentiones

Screenshots / Videos

See the goldens

Summary by CodeRabbit

  • Tests
    • Added visual regression tests for mention autocomplete behavior with mention types and channel capabilities
    • Added visual regression tests for message list view with various mention types (channel, user, role, group, and here mentions)

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Two new golden tests are added for documentation screenshots: one validates mention autocomplete with mention types by mocking channel capabilities, members, watchers, and a role search response; the other adds a message fixture builder covering multiple mention kinds and a golden test rendering the message list view.

Changes

Mention-related docs golden tests

Layer / File(s) Summary
Mention autocomplete golden test with role/capability mock
docs/docs_screenshots/test/message_input/autocomplete_triggers_test.dart
Adds docsGoldenTest for autocomplete_trigger_mention_types with mocked ownCapabilities, member list, empty watchers, client.searchRoles('c') returning a customer-success role, and StreamMentionAutocompleteOptions/StreamMessageComposer rendered with Hello @c``.
Message list mentions fixture and golden test
docs/docs_screenshots/test/message_list/message_list_view_test.dart
Adds _buildMentionMessages() returning Message fixtures with mentionedChannel, mentionedHere, mentionedRoles, mentionedGroups, and mentionedUsers fields, and a docsGoldenTest for message list view with mentions using the mock client/channel scaffold.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop hop, the tests appear,
Mentions of roles and channels cheer,
Golden screenshots, crisp and bright,
Autocomplete works just right.
The warren's docs shine tonight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding enhanced mentions documentation screenshots to the repository.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add_enhanced_mentions_docs_screenshots

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 and usage tips.

@VelikovPetar VelikovPetar marked this pull request as ready for review June 22, 2026 17:40

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/docs_screenshots/test/message_list/message_list_view_test.dart (1)

71-71: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Use single quotes for this string literal.

Line 71 uses double quotes; please switch to single quotes to match the Dart style rule in this repo.

Suggested diff
-      text: "`@engineering` let's sync on the API changes",
+      text: '`@engineering` let\'s sync on the API changes',

As per coding guidelines, "Prefer const constructors and final locals; use single quotes for strings".

🤖 Prompt for 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.

In `@docs/docs_screenshots/test/message_list/message_list_view_test.dart` at line
71, The string literal assigned to the text parameter uses double quotes instead
of single quotes, which violates the Dart style guidelines for this repository.
Change the double quotes around the string "`@engineering` let's sync on the API
changes" to single quotes to match the preferred style rule for string literals.

Source: Coding guidelines

🤖 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.

Nitpick comments:
In `@docs/docs_screenshots/test/message_list/message_list_view_test.dart`:
- Line 71: The string literal assigned to the text parameter uses double quotes
instead of single quotes, which violates the Dart style guidelines for this
repository. Change the double quotes around the string "`@engineering` let's sync
on the API changes" to single quotes to match the preferred style rule for
string literals.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: df33c1fd-e607-4c74-b505-2755d87db6bb

📥 Commits

Reviewing files that changed from the base of the PR and between 9605679 and 7c8621b.

⛔ Files ignored due to path filters (2)
  • docs/docs_screenshots/test/message_input/goldens/macos/autocomplete_trigger_mention_types.png is excluded by !**/*.png
  • docs/docs_screenshots/test/message_list/goldens/macos/message_list_view_mentions.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • docs/docs_screenshots/test/message_input/autocomplete_triggers_test.dart
  • docs/docs_screenshots/test/message_list/message_list_view_test.dart

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.59%. Comparing base (9605679) to head (7c8621b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2778   +/-   ##
=======================================
  Coverage   69.59%   69.59%           
=======================================
  Files         426      426           
  Lines       25675    25675           
=======================================
  Hits        17868    17868           
  Misses       7807     7807           

☔ 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.

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