Skip to content

Conversation

SagarRajput-7
Copy link
Contributor

@SagarRajput-7 SagarRajput-7 commented Oct 12, 2025

📄 Summary

Issue - #7523

Was already fixed with - #8029

Issue - what is happening here with the export dashboard flow:

  • On export, when we go through a new widget creation flow, the newDashboard boolean is correctly set to true first, but here, as we get from the export panel action, a put call for an empty widget is made, which, once resolved, adds the new widget to the dashboard data.
  • so now that the widget is present in the dashboard data, the array is sliced from within according to the index, but as the boolean newDashboard never got updated, hence the update is still made like this - [all - (that is empty in this case), new widget] so eventually we make a update call with only single widget, which mean deleting others.

To fix this, this PR - #8029 - removed the useUpdateDashboard call creates the empty widget.

Working flow -

Screen.Recording.2025-10-13.at.4.56.25.AM.mov

Test cases added -

  • Export Modal Tests

    • Export modal opens when "Add to Dashboard" is clicked
    • Dashboard selection dropdown works correctly
    • "New Dashboard" and "Export" buttons function properly
  • onExport Callback Tests

    • onExport called with correct parameters for new dashboard creation
    • onExport called with existing dashboard when selecting from the dropdown
  • Export Flow Test

    • Tests the handleExport function with generateExportToDashboardLink
    • Verifies correct URL generation with widgetId and compositeQuery
    • Asserts useUpdateDashboard is NOT called

✅ Changes

  • Feature: Brief description
  • Bug fix: Brief description

🏷️ Required: Add Relevant Labels

⚠️ Manually add appropriate labels in the PR sidebar
Please select one or more labels (as applicable):

ex:

  • frontend
  • backend
  • devops
  • bug
  • enhancement
  • ui
  • test

👥 Reviewers

Tag the relevant teams for review:

  • frontend / backend / devops

🧪 How to Test

  1. ...
  2. ...
  3. ...

🔍 Related Issues


📸 Screenshots / Screen Recording (if applicable / mandatory for UI related changes)


📋 Checklist

  • Dev Review
  • Test cases added (Unit/ Integration / E2E)
  • Manually tested the changes

👀 Notes for Reviewers

@github-actions github-actions bot added the bug Something isn't working label Oct 12, 2025
@SagarRajput-7 SagarRajput-7 marked this pull request as ready for review October 12, 2025 23:42
@SagarRajput-7 SagarRajput-7 requested review from a team and YounixM as code owners October 12, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants