Skip to content

regression: DM sidebar tooltip shows empty while presence loads#41107

Merged
dionisio-bot[bot] merged 2 commits into
release-8.6.0from
regression/dm-sidebar-tooltip-empty-presence
Jul 1, 2026
Merged

regression: DM sidebar tooltip shows empty while presence loads#41107
dionisio-bot[bot] merged 2 commits into
release-8.6.0from
regression/dm-sidebar-tooltip-empty-presence

Conversation

@ricardogarim

@ricardogarim ricardogarim commented Jun 29, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Hovering a DM in the sidebar while the partner's presence was still loading showed an empty tooltip. useUserStatusTooltip opened the tooltip with a static <UserStatusText> snapshot, and while presence was undefined that snapshot rendered nothing.

The hook now opens a small self-subscribing component (UserStatusTooltipContent) that:

  • shows a Skeleton while presence is loading, then
  • live-updates in place to the real status once it resolves (and keeps reflecting later changes while the tooltip stays open).

Since the tooltip renders above UserPresenceProvider, the hook bridges UserPresenceContext into the tooltip so the content's useUserPresence resolves inside the portal. The whole fix is contained in useUserStatusTooltip.tsx; no shared components were touched.

Regression introduced by #40469.

Issue(s)

Steps to test or reproduce

  1. Open RC with several DMs in the sidebar.
  2. Throttle/slow the network (or block /v1/users.presence) so presence loads slowly.
  3. Reload, then hover a DM row before its presence resolves.

Before: tooltip appears empty, only showing the status after a re-hover.
After: tooltip shows a loading spinner, then live-updates to the status (e.g. "Offline") in place — no re-hover.

Further comments

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved the user status tooltip to show a loading state when presence information isn’t available, and automatically display the latest status details once loaded.
    • Made tooltip behavior more consistent by preserving and reusing status data throughout the tooltip content.
    • Tooltip content now stays in sync with the latest available presence, reducing flicker during updates.

@dionisio-bot

dionisio-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 196b9d1

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

@ricardogarim ricardogarim added this to the 8.6.0 milestone Jun 29, 2026
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7eb0016f-9e63-45f5-9a5c-8ff1c1f0c531

📥 Commits

Reviewing files that changed from the base of the PR and between 958f451 and 196b9d1.

📒 Files selected for processing (1)
  • apps/meteor/client/hooks/useUserStatusTooltip.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/hooks/useUserStatusTooltip.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
⚠️ CI failures not shown inline (4)

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

Walkthrough

The tooltip hook now renders its content through an internal component that reads presence from context, fetches user presence inside the tooltip body, and updates the hover callback to provide userPresence to that subtree.

Changes

Tooltip presence context refactor

Layer / File(s) Summary
UserStatusTooltipContent component and hook wiring
apps/meteor/client/hooks/useUserStatusTooltip.tsx
Adds an internal component that fetches presence via useUserPresence and renders a Skeleton or UserStatusText; updates onMouseEnter to render it within UserPresenceContext.Provider and changes the callback dependency to userPresence.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: type: bug

Suggested reviewers: dougfabris

🚥 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 clearly matches the main change: fixing the DM sidebar tooltip while presence data is still loading.
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.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2359: Request failed with status code 401

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 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 38.88889% with 11 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-8.6.0@d71ef2f). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             release-8.6.0   #41107   +/-   ##
================================================
  Coverage                 ?   70.16%           
================================================
  Files                    ?     3371           
  Lines                    ?   130435           
  Branches                 ?    22652           
================================================
  Hits                     ?    91522           
  Misses                   ?    35597           
  Partials                 ?     3316           
Flag Coverage Δ
e2e 59.48% <40.00%> (?)
e2e-api 46.18% <ø> (?)
unit 70.10% <33.33%> (?)

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 marked this pull request as ready for review June 30, 2026 12:13
@ricardogarim ricardogarim requested a review from a team as a code owner June 30, 2026 12:13

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Re-trigger cubic

Comment thread apps/meteor/client/hooks/useUserStatusTooltip.tsx
Comment thread apps/meteor/client/hooks/useUserStatusTooltip.tsx Outdated
@ricardogarim ricardogarim force-pushed the regression/dm-sidebar-tooltip-empty-presence branch from db7a19a to 958f451 Compare July 1, 2026 18:33
@ricardogarim ricardogarim force-pushed the regression/dm-sidebar-tooltip-empty-presence branch from 958f451 to 196b9d1 Compare July 1, 2026 19:27
@ricardogarim ricardogarim requested a review from dougfabris July 1, 2026 20:11
@ricardogarim ricardogarim added the stat: QA assured Means it has been tested and approved by a company insider label Jul 1, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 1, 2026
@ricardogarim ricardogarim removed the stat: QA assured Means it has been tested and approved by a company insider label Jul 1, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jul 1, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jul 1, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 1, 2026
@dionisio-bot dionisio-bot Bot merged commit 576fb70 into release-8.6.0 Jul 1, 2026
47 checks passed
@dionisio-bot dionisio-bot Bot deleted the regression/dm-sidebar-tooltip-empty-presence branch July 1, 2026 21:49
@dougfabris dougfabris changed the title fix: DM sidebar tooltip shows empty while presence loads regression: DM sidebar tooltip shows empty while presence loads Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants