fix: 'No History' state displayed incorrectly when `calendar-events.list` fails by nazabucciarelli · Pull Request #42971 · RocketChat/Rocket.Chat · GitHub
Skip to content

fix: 'No History' state displayed incorrectly when calendar-events.list fails - #42971

Open
nazabucciarelli wants to merge 198 commits into
feat/outlook-server-to-server-integration-phase-3from
fix/no-history-displayed-incorrectly
Open

nazabucciarelli wants to merge 198 commits into
feat/outlook-server-to-server-integration-phase-3from
fix/no-history-displayed-incorrectly

Conversation

@nazabucciarelli

@nazabucciarelli nazabucciarelli commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes (including videos or screenshots)

Modified the condition to display the 'No history' state. It must show up when the request was successful and there were no events.

Issue(s)

OS2S-74 Outlook calendar panel shows “Something went wrong” and “No history” states at the same time when offline.

Steps to test or reproduce

  1. Enable Settings -> Microsoft Exchange -> Enabled to activate the Outlook calendar panel.
  2. Create a custom calendar event in the rocketchat_calendar_events collection for your user.
  3. Open devtools and block the request to calendar-events.list.
  4. After that, go to any room, open the kebab menu and open 'Outlook calendar'.

Expected: It should display 'Something went wrong' instead of 'Something went wrong' with 'No history'.

Further comments

View guided diff

Summary by CodeRabbit

  • Bug Fixes
    • Improved calendar loading behavior so the empty-calendar message appears only after a successful query confirms that no events are available.

@dionisio-bot

dionisio-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5a9d007

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

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3bcac420-beec-4924-b00c-2d4a929529a5
📥 Commits

Reviewing files that changed from the base of the PR and between f766ba2 and 5a9d007.

📒 Files selected for processing: 1
  • apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.spec.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 3
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments: 1
apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.spec.tsx: 1

14-14: 🎯 Functional Correctness

The retry concern is refuted. MockedAppRootBuilder configures QueryClient with queries: { retry: false }, so the failed query reaches isError without TanStack Query retries. No test change is needed.

Walkthrough

The Outlook calendar empty state now renders only after a successful query returns zero events. Tests cover failed and empty calendar-event responses.

Changes

Outlook calendar empty state

Layer / File(s) Summary
Empty-state condition and outcome tests
apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.tsx, apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.spec.tsx
The empty-state condition now requires query success and zero events. Tests verify that failed queries show only the error state and empty successful responses show only the empty state.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested labels: type: bug

Suggested reviewers: juliajforesti

Merge Risk: ⚪ Minimal · up to 5a9d0

Failed calendar requests show the error state without “No history.” No actionable merge-blocking risk remains after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: preventing the 'No History' state from appearing when calendar-events.list fails.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Errors were encountered while retrieving linked issues.

Errors: 1
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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.

@nazabucciarelli
nazabucciarelli changed the base branch from develop to feat/outlook-server-to-server-integration-phase-3 October 20, 2026 21:01
@nazabucciarelli
nazabucciarelli marked this pull request as ready for review October 20, 2026 21:01
@nazabucciarelli
nazabucciarelli requested a review from a team as a code owner October 20, 2026 21:01

@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

View guided diff | Re-trigger cubic

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.31%. Comparing base (8d2664c) to head (5a9d007).

Additional details and impacted files

Impacted file tree graph

@@                                  Coverage Diff                                  @@
##           feat/outlook-server-to-server-integration-phase-3   #42971      +/-   ##
=====================================================================================
- Coverage                                              71.35%   71.31%   -0.04%     
=====================================================================================
  Files                                                   5461     5467       +6     
  Lines                                                 235750   236131     +381     
  Branches                                               42701    42636      -65     
=====================================================================================
+ Hits                                                  168217   168395     +178     
- Misses                                                 62232    62438     +206     
+ Partials                                                5301     5298       -3     
Flag Coverage Δ
e2e 58.95% <ø> (-0.02%) ⬇️
e2e-api 45.94% <ø> (-0.25%) ⬇️
unit 71.89% <100.00%> (-0.04%) ⬇️

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.

@nazabucciarelli
nazabucciarelli force-pushed the feat/outlook-server-to-server-integration-phase-3 branch from 8d2664c to ebb0437 Compare October 21, 2026 13:49
@nazabucciarelli
nazabucciarelli requested review from a team as code owners October 21, 2026 13:49
@nazabucciarelli
nazabucciarelli force-pushed the feat/outlook-server-to-server-integration-phase-3 branch from ebb0437 to bb801ea Compare October 21, 2026 19:06

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants