Skip to content

Conversation

@MartinSchoeler
Copy link
Member

@MartinSchoeler MartinSchoeler commented Dec 31, 2025

Proposed changes (including videos or screenshots)

Issue(s)

CORE-1599

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Refactor
    • Improved Omnichannel contact-route navigation so switching between directory and active chats consistently opens the Contacts tab with appropriate context, leading to more predictable navigation behavior across the app.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 31, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Dec 31, 2025

⚠️ No Changeset found

Latest commit: 36670f3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

Walkthrough

Expanded the contact-route hook's early-return condition to also treat omnichannel-current-chats like omnichannel-directory, returning navigation with tab: 'contacts' and merged params; added a TODO to map all routes using this hook for proper handling.

Changes

Cohort / File(s) Summary
Contact Route Navigation Logic
apps/meteor/client/views/omnichannel/hooks/useContactRoute.ts
Early-return condition now includes currentRouteName === 'omnichannel-current-chats' alongside omnichannel-directory; navigation still returns name: currentRouteName with merged params (ensuring tab: 'contacts' and id fallback). Added TODO to map all routes using this hook.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • tassoevan

Poem

🐰 I hopped through routes both near and far,
Found a missing path — now fixed the bar.
No more lost contacts in contextual view,
I stitched the params so they show true. ✨

Pre-merge checks and finishing touches

✅ 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 describes the regression issue: an empty contextual bar when creating a new contact from omnichannel admin, which matches the core problem in the changeset.
Linked Issues check ✅ Passed The code change extends navigation handling to include 'omnichannel-current-chats' route, directly addressing the regression where the contextual bar fails to display newly created contacts CORE-1599.
Out of Scope Changes check ✅ Passed All changes are scoped to the useContactRoute hook navigation logic, directly related to fixing the contact display regression in the omnichannel contact center.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch regression/contact-center

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.

@MartinSchoeler MartinSchoeler added this to the 8.0.0 milestone Dec 31, 2025
@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.65%. Comparing base (3c20c42) to head (36670f3).
⚠️ Report is 1 commits behind head on release-8.0.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-8.0.0   #38033      +/-   ##
=================================================
- Coverage          70.68%   70.65%   -0.04%     
=================================================
  Files               3145     3145              
  Lines             108720   108726       +6     
  Branches           19501    19546      +45     
=================================================
- Hits               76852    76821      -31     
- Misses             29874    29904      +30     
- Partials            1994     2001       +7     
Flag Coverage Δ
e2e 60.15% <100.00%> (+<0.01%) ⬆️
e2e-api 47.52% <ø> (+0.02%) ⬆️
unit 71.77% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 31, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.1GiB 0B +1.1GiB
rocketchat 355MiB 0B +355MiB
omnichannel-transcript-service 132MiB 0B +132MiB
queue-worker-service 132MiB 0B +132MiB
ddp-streamer-service 126MiB 0B +126MiB
account-service 113MiB 0B +113MiB
authorization-service 111MiB 0B +111MiB
presence-service 111MiB 0B +111MiB

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/29 19:01", "12/30 20:52", "01/02 15:15 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
Loading

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.4GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.1GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-38033
  • Baseline: develop
  • Timestamp: 2026-01-02 15:15:54 UTC
  • Historical data points: 30

Updated: Fri, 02 Jan 2026 15:15:54 GMT

@MartinSchoeler MartinSchoeler marked this pull request as ready for review December 31, 2025 17:02
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner December 31, 2025 17:02
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

tassoevan
tassoevan previously approved these changes Dec 31, 2025
@tassoevan tassoevan dismissed their stale review December 31, 2025 21:34

There are corner cases.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/meteor/client/views/omnichannel/hooks/useContactRoute.ts (1)

16-17: Addition of omnichannel-current-chats route looks correct for the regression fix.

The expanded condition properly handles navigation from the current chats view to ensure the contacts tab is selected. However, the TODO indicates this is a partial solution.

Would you like me to help identify other routes that might need similar handling, or create an issue to track the comprehensive route mapping mentioned in the TODO?

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 005b3de and 36670f3.

📒 Files selected for processing (1)
  • apps/meteor/client/views/omnichannel/hooks/useContactRoute.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/views/omnichannel/hooks/useContactRoute.ts
🧠 Learnings (2)
📚 Learning: 2025-12-18T15:18:31.688Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37773
File: apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx:24-34
Timestamp: 2025-12-18T15:18:31.688Z
Learning: In apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx, for internal call history items, the item.contactId is guaranteed to always match either the caller.id or callee.id in the call data, so the contact resolution in getContact will never result in undefined.

Applied to files:

  • apps/meteor/client/views/omnichannel/hooks/useContactRoute.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`

Applied to files:

  • apps/meteor/client/views/omnichannel/hooks/useContactRoute.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (1)
apps/meteor/client/views/omnichannel/hooks/useContactRoute.ts (1)

18-26: The code already passes the new contact's id to handleNavigate after creation.

The contact creation flow in useCreateContact.ts explicitly passes the newly created contact's id (returned as contactId from the API response) when calling handleNavigate({ context: 'details', id: contactId }) in the onSuccess callback (line 18). The fallback logic in useContactRoute.ts line 23 (id || currentParams.id) is a defensive measure for other scenarios but is not relied upon for newly created contacts. The implementation correctly ensures the new contact id is always provided during navigation after creation.

Likely an incorrect or invalid review comment.

@tassoevan tassoevan merged commit a1f7b9e into release-8.0.0 Jan 2, 2026
76 of 80 checks passed
@tassoevan tassoevan deleted the regression/contact-center branch January 2, 2026 16:04
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.

3 participants