Skip to content

feat: presence sync engine integrations#40557

Draft
ricardogarim wants to merge 4 commits into
feat/presence-expiration-uifrom
feat/presence-sync-integrations
Draft

feat: presence sync engine integrations#40557
ricardogarim wants to merge 4 commits into
feat/presence-expiration-uifrom
feat/presence-sync-integrations

Conversation

@ricardogarim
Copy link
Copy Markdown
Member

@ricardogarim ricardogarim commented May 15, 2026

Proposed changes

Integrates the presence sync engine into calendar, voice call, and video conference services, replacing direct DB status updates with the unified Presence.setActiveState() / Presence.endActiveState() API.

Voice calls

  • Listens to callActivated / callEnded events from CallDirector to set/clear busy presence
  • Sets "On a call" status text with statusSource: 'internal' (highest priority)
  • Adds callActivated and callEnded event types to MediaCallServerEvents

Video conferences

  • Sets "In a meeting" busy status when a user joins a video conference
  • Clears presence state when the conference ends
  • Uses statusSource: 'internal' (highest priority)

Calendar

  • Replaces the entire applyStatusChange flow and previousStatus tracking with a single Presence.setActiveState() call using statusSource: 'external'
  • Removes end-time scheduling — the engine handles expiration via statusExpiresAt
  • Deletes applyStatusChange.ts and related test files (~550 lines removed)
  • Removes previousStatus field from ICalendarEvent

Issue(s)

Steps to test or reproduce

See the use case matrix for the full set of scenarios.

Further comments

Depends on #40469 (frontend) and #40274 (backend engine).

This is the final PR in the stack. After this, all presence writers (manual, calendar, voice, video) go through the unified engine, and direct DB writes for status are fully eliminated.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented May 15, 2026

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

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

⚠️ No Changeset found

Latest commit: 05b4e89

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
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a03666d-c3f1-485e-b883-c5f424571f3f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.57%. Comparing base (242cc8e) to head (05b4e89).

Additional details and impacted files

Impacted file tree graph

@@                       Coverage Diff                       @@
##           feat/presence-expiration-ui   #40557      +/-   ##
===============================================================
- Coverage                        69.59%   69.57%   -0.02%     
===============================================================
  Files                             3330     3330              
  Lines                           123257   123220      -37     
  Branches                         21943    21965      +22     
===============================================================
- Hits                             85779    85731      -48     
- Misses                           34132    34141       +9     
- Partials                          3346     3348       +2     
Flag Coverage Δ
unit 70.28% <80.00%> (-0.01%) ⬇️

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.

@ricardogarim ricardogarim force-pushed the feat/presence-expiration-ui branch from 807228e to a62ad69 Compare May 15, 2026 15:59
@ricardogarim ricardogarim force-pushed the feat/presence-sync-integrations branch from cbd523c to ef46ca9 Compare May 15, 2026 15:59
@ricardogarim ricardogarim force-pushed the feat/presence-expiration-ui branch from a62ad69 to 9ad1e60 Compare May 15, 2026 16:01
@ricardogarim ricardogarim force-pushed the feat/presence-sync-integrations branch from ef46ca9 to 64b2bb2 Compare May 15, 2026 16:01
@ricardogarim ricardogarim changed the title Feat/presence sync integrations feat: presence sync integrations May 15, 2026
@ricardogarim ricardogarim changed the title feat: presence sync integrations feat: presence sync engine integrations May 15, 2026
@ricardogarim ricardogarim force-pushed the feat/presence-expiration-ui branch from 9ad1e60 to c283812 Compare May 15, 2026 17:13
@ricardogarim ricardogarim force-pushed the feat/presence-sync-integrations branch from 64b2bb2 to e566701 Compare May 15, 2026 17:13
@ricardogarim ricardogarim force-pushed the feat/presence-sync-integrations branch from 061cf4c to 05b4e89 Compare May 15, 2026 20: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