Skip to content

chore: Add missing error state to ModerationConsoleTable#38969

Open
smirk-dev wants to merge 2 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 2 commits into
RocketChat:developfrom
smirk-dev:fix/moderation-console-table-error-state

Conversation

@smirk-dev
Copy link
Copy Markdown
Contributor

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

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.
@smirk-dev smirk-dev requested a review from a team as a code owner February 24, 2026 09:59
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Feb 24, 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 targeting the wrong base branch. It should target 8.6.0, but it targets 8.5.0

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

⚠️ No Changeset found

Latest commit: 37fa782

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

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.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.84%. Comparing base (eb3ad21) to head (37fa782).
⚠️ Report is 243 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38969      +/-   ##
===========================================
- Coverage    70.93%   69.84%   -1.10%     
===========================================
  Files         3209     3298      +89     
  Lines       113886   119292    +5406     
  Branches     20646    21937    +1291     
===========================================
+ Hits         80788    83321    +2533     
- Misses       31048    32671    +1623     
- Partials      2050     3300    +1250     
Flag Coverage Δ
e2e 59.72% <ø> (-0.78%) ⬇️
e2e-api 46.23% <ø> (-3.00%) ⬇️
unit 70.61% <ø> (-0.92%) ⬇️

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
Contributor 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 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
Contributor 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
Contributor Author

@dougfabris status?

@dougfabris
Copy link
Copy Markdown
Member

dougfabris commented May 4, 2026

@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
Contributor 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
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.

3 participants