Skip to content

fix: align moderation console skeleton columns with header#38716

Open
ScriptShah wants to merge 1 commit intoRocketChat:developfrom
ScriptShah:fix/moderation-console-skeleton-columns
Open

fix: align moderation console skeleton columns with header#38716
ScriptShah wants to merge 1 commit intoRocketChat:developfrom
ScriptShah:fix/moderation-console-skeleton-columns

Conversation

@ScriptShah
Copy link
Contributor

@ScriptShah ScriptShah commented Feb 15, 2026

Proposed changes (including videos or screenshots)

This PR fixes a UI inconsistency in Admin → Moderation → Console where the loading skeleton renders a different number of columns than the table header.

Previously, the skeleton used a hardcoded value:

{isLoading && <GenericTableLoadingTable headerCells={6} />}

However, the table header dynamically renders 5 columns, causing a visible layout shift and misalignment during loading.

This PR replaces the hardcoded value with the actual header length:

{isLoading && <GenericTableLoadingTable headerCells={headers.length} />}

This ensures the loading skeleton always matches the number of header columns and prevents UI misalignment.

📸 Screenshots :

  • Header row + skeleton row during loading
  • Column mismatch before fix
Screenshot from 2026-02-15 22-44-28
  • Proper alignment after fix
Screenshot from 2026-02-15 22-47-39

This is a minimal and safe change with no behavioral impact beyond correcting the loading state layout.


Issue(s)

Fixes #38714


Steps to test or reproduce

  1. Go to Admin → Moderation → Console
  2. Open DevTools → Network
  3. Set throttling to Slow 3G
  4. Refresh the page
  5. Observe the table while loading

Before fix:

  • Header displays 5 columns
  • Skeleton renders 6 columns
  • Visible layout shift/misalignment

After fix:

  • Skeleton renders the same number of columns as the header
  • No layout shift
  • Loading state visually aligned

Further comments

This is a small UI consistency fix that improves the perceived quality of the Admin console loading state.

No changeset is included as this does not introduce a user-facing feature or require a version bump.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the loading state display in the moderation console table to correctly show the appropriate number of column placeholders, ensuring the skeleton loader aligns with the actual table structure.

@ScriptShah ScriptShah requested a review from a team as a code owner February 15, 2026 18:54
@changeset-bot
Copy link

changeset-bot bot commented Feb 15, 2026

⚠️ No Changeset found

Latest commit: 0220af2

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 15, 2026

Walkthrough

The ModerationConsoleTable loading skeleton now uses the actual header array length instead of a hardcoded value of 6, ensuring the skeleton column count matches the rendered table header count and prevents UI misalignment during the loading state.

Changes

Cohort / File(s) Summary
Loading Skeleton Column Count
apps/meteor/client/views/admin/moderation/ModerationConsoleTable.tsx
Changed hardcoded headerCells={6} to dynamic headerCells={headers.length} in the loading table skeleton to align with actual table columns.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Hopping through the code so bright,
Six columns turned to headers' might,
No more mismatch, clean and tight,
Loading skeleton feels just right!

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The code change directly addresses issue #38714 by replacing the hardcoded headerCells value of 6 with headers.length to align skeleton columns with the actual header count.
Out of Scope Changes check ✅ Passed The change is minimal and focused solely on fixing the column mismatch in the loading skeleton, with no unrelated modifications present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop
Title check ✅ Passed The title 'fix: align moderation console skeleton columns with header' clearly and specifically describes the main change: aligning skeleton loading columns with the actual table header count.

✏️ 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.

@ScriptShah ScriptShah changed the title [chore](admin): align moderation console skeleton columns with header chore:admin align moderation console skeleton columns with header Feb 15, 2026
Copy link
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

@ScriptShah ScriptShah changed the title chore:admin align moderation console skeleton columns with header fix:admin align moderation console skeleton columns with header Feb 15, 2026
@ScriptShah ScriptShah changed the title fix:admin align moderation console skeleton columns with header Fix: admin align moderation console skeleton columns with header Feb 15, 2026
@ScriptShah ScriptShah changed the title Fix: admin align moderation console skeleton columns with header Fix(admin): align moderation console skeleton columns with header Feb 15, 2026
@ScriptShah ScriptShah changed the title Fix(admin): align moderation console skeleton columns with header fix: align moderation console skeleton columns with header Feb 15, 2026
@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.47%. Comparing base (11e1c51) to head (0220af2).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38716      +/-   ##
===========================================
- Coverage    70.49%   70.47%   -0.02%     
===========================================
  Files         3175     3175              
  Lines       111094   111094              
  Branches     20045    20017      -28     
===========================================
- Hits         78311    78292      -19     
- Misses       30738    30750      +12     
- Partials      2045     2052       +7     
Flag Coverage Δ
e2e 60.45% <ø> (-0.02%) ⬇️
e2e-api 47.71% <ø> (-0.06%) ⬇️
unit 71.45% <ø> (-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.

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.

[bug] Admin Moderation Console: Loading skeleton column count does not match table header

2 participants