Skip to content

Conversation

@Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented Jul 14, 2025

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
354 349 0 3 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: 85.12 MB | Main: 85.12 MB
Diff: 0.28 KB (-0.00%)

✅ Bundle size unchanged.

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

@astandrik astandrik requested a review from Copilot July 14, 2025 15:04
@Raubzeug Raubzeug enabled auto-merge July 14, 2025 15:04
@astandrik
Copy link
Collaborator

bugbot run

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 partition-change flow so that TopicDataControls delegates filter resets to its parent, ensuring filters are cleared whenever the user selects a new partition.

  • Introduce a new handlePartitionChange prop on TopicDataControls and remove its internal reset logic.
  • Implement handlePartitionChange in TopicData to update the selected partition and call resetFilters().
  • Wire the new handler through the component tree.

Reviewed Changes

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

File Description
src/containers/Tenant/Diagnostics/TopicData/TopicDataControls/TopicDataControls.tsx Added handlePartitionChange prop, removed internal partition change logic, updated Select.onUpdate
src/containers/Tenant/Diagnostics/TopicData/TopicData.tsx Defined handlePartitionChange callback calling handleSelectedPartitionChange and resetFilters
Comments suppressed due to low confidence (3)

src/containers/Tenant/Diagnostics/TopicData/TopicDataControls/TopicDataControls.tsx:44

  • The handlePartitionChange prop is marked optional, but the partition select always calls it. Consider making this prop required (remove the ?) or providing a no-op default to avoid potential runtime errors when it's not passed.
    handlePartitionChange?: (value: string[]) => void;

src/containers/Tenant/Diagnostics/TopicData/TopicData.tsx:202

  • Add unit tests to verify that selecting a new partition triggers resetFilters() and clears offsets/timestamps as expected.
    const handlePartitionChange = React.useCallback(

src/containers/Tenant/Diagnostics/TopicData/TopicDataControls/TopicDataControls.tsx:74

  • [nitpick] For consistency with other handlers like handleSelectedColumnsUpdate, consider renaming handlePartitionChange to handleSelectedPartitionChange to make the naming pattern clearer.
                onUpdate={handlePartitionChange}

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Missing Dependency Causes Stale Closures

The renderControls useCallback is missing handlePartitionChange from its dependency array. handlePartitionChange is passed as a prop to TopicDataControls within renderControls, violating React's exhaustive deps rule. This can lead to stale closures.

src/containers/Tenant/Diagnostics/TopicData/TopicData.tsx#L261-L273

);
}, [
columnsToSelect,
controlsKey,
endOffset,
partitions,
partitionsError,
partitionsLoading,
scrollToOffset,
setColumns,
startOffset,
truncated,
]);

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@Raubzeug Raubzeug added this pull request to the merge queue Jul 14, 2025
Merged via the queue into main with commit 848f754 Jul 14, 2025
5 checks passed
@Raubzeug Raubzeug deleted the ydb-topic-filters branch July 14, 2025 15:49
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