Skip to content

chore: Add missing error state to ModerationConsoleTable#38969

Open
smirk-dev wants to merge 3 commits into
RocketChat:developfrom
smirk-dev:fix/moderation-console-table-error-state
Open

chore: Add missing error state to ModerationConsoleTable#38969
smirk-dev wants to merge 3 commits into
RocketChat:developfrom
smirk-dev:fix/moderation-console-table-error-state

Conversation

@smirk-dev

@smirk-dev smirk-dev commented Feb 24, 2026

Copy link
Copy Markdown

Summary

Add error state handling to the ModerationConsoleTable component when the API query fails.

Changes

  • Import States components from @rocket.chat/fuselage
  • Extract isError and refetch from the useQuery hook
  • Display error UI with warning icon and retry button when query fails

Before

The component only handled loading and success states. If the API request failed, users would see nothing (no feedback).

After

Users see a clear error message with "Something went wrong" and a "Reload page" button to retry.

Resolves the TODO comment that was in the component.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced error handling in the moderation console with visual feedback and a reload option when data retrieval fails.

Task: COMM-160

Add error handling UI when the moderation reports query fails:
- Display warning icon with 'Something went wrong' message
- Add 'Reload page' button that triggers refetch

Resolves TODO comment in the component.
@dionisio-bot

dionisio-bot Bot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

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 targeting the wrong base branch. It should target 8.7.0, but it targets 8.6.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Feb 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 864c00f

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 Feb 24, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The ModerationConsoleTable component now includes error state handling. Query return values were extended to include isError and refetch. A new error UI block renders conditionally when an error occurs, displaying a warning state with a reload action. A related TODO comment was removed.

Changes

Cohort / File(s) Summary
Error State Handling
apps/meteor/client/views/admin/moderation/ModerationConsoleTable.tsx
Added fuselage UI component imports (States, StatesIcon, StatesTitle, StatesActions, StatesAction) for error display. Extended useQuery hook to destructure isError and refetch. Implemented conditional error state rendering with reload functionality. Removed TODO comment about missing error state.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A table once lacked error's warning call,
Now States display when queries fall,
With Reload button, fresh as morning dew,
The console shines with proper UI true! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'fix(moderation): add missing error state to ModerationConsoleTable' accurately and concisely describes the main change: adding error state handling to a specific component.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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


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.

@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

@codecov

codecov Bot commented Feb 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.12%. Comparing base (855c5c2) to head (864c00f).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38969      +/-   ##
===========================================
- Coverage    70.16%   70.12%   -0.05%     
===========================================
  Files         3360     3360              
  Lines       129668   129668              
  Branches     22412    22509      +97     
===========================================
- Hits         90988    90928      -60     
- Misses       35368    35423      +55     
- Partials      3312     3317       +5     
Flag Coverage Δ
e2e 59.32% <ø> (-0.12%) ⬇️
e2e-api 46.28% <ø> (-0.08%) ⬇️
unit 70.04% <ø> (-0.03%) ⬇️

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.

@smirk-dev

Copy link
Copy Markdown
Author

Hi RocketChat team, just a gentle ping — this PR has been open for about 3 weeks. Would someone be able to take a look when time allows? Happy to address any feedback. Thanks!

@dougfabris

Copy link
Copy Markdown
Member

Hello @smirk-dev and thank you so much for your contribution 🚀

My honest apologies, but we're receiving tons of contributions and our team just can't handle all of them.

I can understand how frustrating can be do not receive any feedback, so I hope you can understand our situation and keep helping us.

@dougfabris dougfabris reopened this Apr 30, 2026
@dougfabris dougfabris added the valid A valid contribution where maintainers will review based on priority label Apr 30, 2026
@dougfabris

Copy link
Copy Markdown
Member

/jira COMM

dougfabris
dougfabris previously approved these changes Apr 30, 2026
@dougfabris dougfabris added this to the 8.5.0 milestone Apr 30, 2026
@dougfabris dougfabris changed the title fix(moderation): add missing error state to ModerationConsoleTable chore: Add missing error state to ModerationConsoleTable Apr 30, 2026
@smirk-dev

Copy link
Copy Markdown
Author

@dougfabris so are you merging it or is just added to milestone, did you add this to the queue

@dougfabris

Copy link
Copy Markdown
Member

@smirk-dev its a valid contribution and its on our radar.
After all reviews if it passes it will be merged, I hope you can understand that theres a process.

@smirk-dev

Copy link
Copy Markdown
Author

@dougfabris status?

@dougfabris

dougfabris commented May 4, 2026

Copy link
Copy Markdown
Member

@smirk-dev Your PR is triaged so it will be included in our next release.

For now just sit down, relax and enjoy the trip

@smirk-dev

Copy link
Copy Markdown
Author

@dougfabris its been 3 months since this pr was opened, can i get a timeline of whether or when it will be merged?

@scuciatto scuciatto modified the milestones: 8.5.0, 8.6.0 May 20, 2026
@smirk-dev

Copy link
Copy Markdown
Author

@dougfabris @scuciatto status? Just close it at this point, its been 3 months, RocketChat used to be a reputed open source organization, now we are just playing milestones with each other

@scuciatto scuciatto removed this from the 8.6.0 milestone Jun 18, 2026
@dougfabris dougfabris reopened this Jun 22, 2026
@dougfabris dougfabris added this to the 8.7.0 milestone Jun 22, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ dougfabris
❌ smirk


smirk seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dougfabris

Copy link
Copy Markdown
Member

@smirk-dev can u sign our CLA please?

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

Labels

community valid A valid contribution where maintainers will review based on priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants