Skip to content

Conversation

@artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Nov 6, 2025

Part of #2892

Stand: https://nda.ya.ru/t/tNojZU0Y7MWKUx
You could see changes if you turn on 3G in browser network and change sorting in top queries table

Before - no data instead of loader on sort column change in TopQueries:
Screenshot 2025-11-06 at 11 43 13

After - proper loading state on sort column change in TopQueries:
Screenshot 2025-11-06 at 11 43 23

CI Results

Test Status: ❌ FAILED

📊 Full Report

Total Passed Failed Flaky Skipped
378 373 2 1 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: 🔺

Current: 47.22 MB | Main: 47.15 MB
Diff: +0.07 MB (0.14%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the ResizeableDataTable component to support distinct loading states with clearer semantics. The component now distinguishes between initial loading (isLoading) and data fetching (isFetching), following patterns commonly used in RTK Query.

Key changes:

  • Renamed the loading prop to isLoading and isFetching to distinguish between initial load and subsequent data fetches
  • Added isLoading support to show TableSkeleton when table structure/columns aren't ready
  • Added isFetching support to show inline skeleton rows while preserving table headers during data fetches
  • Wrapped computed values in useMemo hooks for better performance

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/components/ResizeableDataTable/ResizeableDataTable.tsx Refactored to support isLoading and isFetching states with memoized columns, data, and settings; added TableSkeleton for initial loading
src/containers/Tenant/Diagnostics/TopQueries/QueriesTableWithDrawer.tsx Updated to use isFetching prop instead of deprecated loading prop
src/containers/Tenant/Diagnostics/Partitions/Partitions.tsx Removed manual loading check and TableSkeleton rendering; updated to use isLoading prop
src/containers/Node/Threads/Threads.tsx Updated to use isLoading prop instead of deprecated loading prop
Comments suppressed due to low confidence (1)

src/containers/Tenant/Diagnostics/Partitions/Partitions.tsx:134

  • The condition {partitionsData ? renderContent() : null} prevents the table from rendering during initial load when isLoading is true. This means the TableSkeleton in ResizeableDataTable will never be shown. The logic should render content when either partitionsData exists OR when loading is true to show the skeleton state properly.
                {partitionsData ? renderContent() : null}

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@artemmufazalov artemmufazalov marked this pull request as ready for review November 6, 2025 09:12
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 6, 2025

Skipped: This PR does not contain any of your configured keywords: (greptile-review)

@artemmufazalov artemmufazalov added this pull request to the merge queue Nov 6, 2025
Merged via the queue into main with commit 11848f5 Nov 6, 2025
6 of 7 checks passed
@artemmufazalov artemmufazalov deleted the rework-table-loading branch November 6, 2025 15:37
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.

3 participants