Skip to content

Conversation

@mtrezza
Copy link
Member

@mtrezza mtrezza commented Dec 1, 2025

New Pull Request Checklist

Issue Description

Info panel may show stale data of unrelated objects when navigating between classes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved panel refresh behavior to immediately clear and reset panel state when refreshing while a panel is visible.
    • Fixed UI state management to automatically clear selections and loading indicators when data changes or becomes unavailable.
    • Ensured a consistent "No object selected" display when multi-panel views have no items.
  • Enhancements

    • Render an aggregation panel with an explicit empty state in multi-panel mode to avoid blank areas.

✏️ Tip: You can customize this high-level summary in your review settings.

@parse-github-assistant
Copy link

parse-github-assistant bot commented Dec 1, 2025

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

@parseplatformorg
Copy link
Contributor

parseplatformorg commented Dec 1, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Updates DataBrowser to proactively clear aggregation panel UI/state when className changes or data becomes null, simplifies handleRefresh to clear panel/cache and reset selection state, and ensures multi-panel mode shows an explicit "No object selected" aggregation panel when no objects are displayed.

Changes

Cohort / File(s) Change Summary
DataBrowser panel & multi-panel behavior
src/dashboard/Data/Browser/DataBrowser.react.js
Adds reactive panel-clearing in componentDidUpdate for className changes and when data becomes null (clears aggregation panel data, disables loading info, resets selection, multi-panel data, and displayed IDs). Modifies handleRefresh to clear aggregation panel data and loading state immediately when visible, remove per-object cache/refresh calls in favor of unified cache/UI reset (clearing selectedObjectId, displayedObjectIds, multiPanelData, prefetchCache and setting showAggregatedData). Adjusts multi-panel render so an AggregationPanel is rendered with empty data and showAggregatedData=true when displayedObjectIds is empty to show a "No object selected" state.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Files to scrutinize:
    • componentDidUpdate conditional branches for className/data-null handling
    • handleRefresh changes that remove per-object invalidation and perform bulk UI/cache resets
    • Multi-panel render branch that renders an AggregationPanel for empty displayedObjectIds

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing stale data in the info panel when refreshing or navigating between classes, which aligns with the summary of changes.
Description check ✅ Passed The description follows the required template structure with checklist items and issue description, though the 'Approach' and 'TODOs before merging' sections are missing or incomplete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e53295 and 1e2c9a2.

📒 Files selected for processing (1)
  • src/dashboard/Data/Browser/DataBrowser.react.js (3 hunks)

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.

@mtrezza mtrezza changed the title fix: Info panel may show stale data of unrelated objects fix: Info panel may show stale data of previous objects when refreshing the data table or navigating between classes Dec 1, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 18d291c and 2e53295.

📒 Files selected for processing (1)
  • src/dashboard/Data/Browser/DataBrowser.react.js (5 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-31T06:12:17.707Z
Learnt from: mtrezza
Repo: parse-community/parse-dashboard PR: 2957
File: src/dashboard/Data/Browser/BrowserTable.react.js:584-597
Timestamp: 2025-07-31T06:12:17.707Z
Learning: In Parse Dashboard's data browser selection logic (src/dashboard/Data/Browser/BrowserTable.react.js), the `selection['*']` pattern is used to handle global operations that pass `{ '*': true }` to indicate all items are selected, particularly for bulk operations like delete. This is not dead code but serves as compatibility layer for global operations that don't go through normal individual row selection workflows.

Applied to files:

  • src/dashboard/Data/Browser/DataBrowser.react.js
🧬 Code graph analysis (1)
src/dashboard/Data/Browser/DataBrowser.react.js (1)
src/components/AggregationPanel/AggregationPanel.js (1)
  • AggregationPanel (15-223)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Docker linux/amd64
🔇 Additional comments (6)
src/dashboard/Data/Browser/DataBrowser.react.js (6)

144-144: LGTM! Clear flag for tracking panel refresh state.

The pendingPanelRefresh flag is properly initialized and will help coordinate the refresh cycle for panel data.


267-281: LGTM! Proper cleanup when switching classes.

The immediate panel clearing when className changes prevents stale data from being displayed when navigating between classes, which directly addresses the reported issue.


283-299: LGTM! Handles panel clearing on data transitions.

Clearing panels when data becomes null (e.g., during filter changes) prevents stale data display. The condition correctly checks for existing selections before clearing.


301-314: LGTM! Consistent panel state management.

Keeping showAggregatedData true ensures the "No object selected" message is displayed, providing consistent UX feedback.


469-503: Good UX: immediate panel clearing during refresh.

The immediate clearing of panel data when refresh is triggered provides good user feedback by showing "No object selected" rather than displaying stale data. The cache invalidation ensures fresh data is fetched.

Note: The pendingPanelRefresh mechanism is currently non-functional due to the issue flagged in lines 353-385, but the immediate clearing behavior itself is correct.


1621-1638: LGTM! Consistent empty state for multi-panel mode.

Displaying a single "No object selected" panel when displayedObjectIds is empty provides clear user feedback and prevents a confusing blank panel area.

@mtrezza mtrezza merged commit 2565f0e into parse-community:alpha Dec 1, 2025
10 of 11 checks passed
@mtrezza mtrezza deleted the fix/panel-refresh branch December 1, 2025 13:37
parseplatformorg pushed a commit that referenced this pull request Dec 1, 2025
# [8.1.0-alpha.11](8.1.0-alpha.10...8.1.0-alpha.11) (2025-12-01)

### Bug Fixes

* Info panel may show stale data of previous objects when refreshing the data table or navigating between classes ([#3036](#3036)) ([2565f0e](2565f0e))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.1.0-alpha.11

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants