Repository navigation
Conversation
Code Review Agent Run #f91087Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Code Review Agent Run #2288cbActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #39528 +/- ##
==========================================
+ Coverage 85.65% 85.66% +0.01%
==========================================
Files 3108 3111 +3
Lines 214739 214953 +214
Branches 50791 50915 +124
==========================================
+ Hits 183927 184142 +215
+ Misses 27393 27392 -1
Partials 3419 3419
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
A few things to address here:
|
|
Thanks @guptapuja, the fix itself seems right, but some things from my last pass are still open so we can't merge as-is.
Still no test covering the new callback / |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #bb20bcActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
Thanks @guptapuja! As mentioned, a small test covering the |
- Added refreshKey state to trigger re-fetch of activity data - Added onActivityRefresh callback prop to DashboardTable and ChartTable - Activity section now updates automatically after delete operations Fixes apache#39435
Co-Authored-By: Claude Opus 4.8 <[email protected]>
8e709d2 to
1c8572e
Compare
Code Review Agent Run #3f728aActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
- DashboardTable: only fire onActivityRefresh once the delete actually succeeds and triggers a real refetch, instead of immediately alongside the fire-and-forget delete call (which could race ahead of the backend delete and refresh with stale data). - Home/Welcome: guard the recent-activity effect against out-of-order responses when refreshKey changes again before an in-flight refresh resolves, so an older response can no longer overwrite newer state. Addresses CodeAnt review feedback on PR apache#39528.
|
Heya @guptapuja, checking back in since it's been quiet a while. This has drifted out of sync with |
Code Review Agent Run #cae60eActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Resolve conflict in pages/Home/index.tsx: master moved the Charts tab behind the mobile consumption-mode guard; keep that structure and add onActivityRefresh to the relocated ChartTable. Co-Authored-By: Evan Rusackas <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
handleChartDelete refreshes the Favorite/Other tabs through getData, not refreshData, so wrap getData in ChartTable the same way DashboardTable does. This also puts both tables on one pattern for notifying Home. Add tests for the delete-callback wiring in ChartTable and DashboardTable (including that a failed chart delete does not notify) and for Home refetching recent activity when a table reports a delete. Co-Authored-By: Evan Rusackas <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Edited tab loads its own data in ActivityTable, so a delete from Home left the deleted item listed there until a reload. Pass refreshKey down and re-run that fetch when it changes. Co-Authored-By: Evan Rusackas <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Heya @guptapuja, I went ahead and pushed the last bit (09c6709): the Recents "Edited" tab now refetches when Since a good chunk of the recent code here is mine, it'd be good to get another committer's eyes on it before it merges. |
mikebridge
left a comment
There was a problem hiding this comment.
Approving. Thanks @guptapuja for the fix, and @rusackas for carrying it over the line. I read the full diff plus the delete handlers it hooks into, and this does what #39435 asks without side effects I could find.
What I checked
- The activity refresh only fires after a successful delete.
handleDashboardDeleteandhandleChartDeletecall exactly one ofrefreshData/getDatain their success branch (views/CRUD/utils.tsx:382-384and:425-428), so each delete bumpsrefreshKeyonce, and a failed delete never does. The new tests cover both sides. - No stale-state or race problems. The
isStalecleanup inpages/Home/index.tsxis tied to[otherTabFilters, refreshKey], andotherTabFiltersis a stable memo, so only a newer refresh (or unmount) discards an in-flight response.isFetchingActivityDataisn't re-entered on refresh, so the panels don't flash back to loading cards or remount the tables. - The Edited tab refetch in
ActivityTableclears its loading flag on both resolve and cleanup, so it can't get stuck. - The refetch actually removes the deleted item: the recent activity endpoint outer-joins dashboards/charts and drops rows whose title comes back empty, so a deleted (or soft-deleted) object falls out of the Viewed list.
- The new tests would fail without the change, which is what I want from a regression test.
Small, optional follow-ups (not blocking)
features/home/SavedQueries.tsx:178: the Recents "Created" tab also lists saved queries, but deleting a saved query from the Home page doesn't notify the activity feed, so it lingers there until reload. That's outside #39435's scope; the sameonActivityRefreshwiring would cover it in a follow-up if anyone is keen.pages/Home/index.tsx:320: each delete now re-runs the whole Home load (recent activity plus the editable-object lists), around 6 to 8 requests. That's fine for a user action behind a confirm dialog; just noting it in case Home grows more panels later.features/home/ChartTable.test.tsx:306: the "delete fails" test waits a fixed 50 ms before asserting the callback wasn't called. It works, but waiting on the danger toast instead would make it deterministic.
CI is green on the current head and the branch merges cleanly with master.
SUMMARY
After deleting a dashboard or chart, the Recent Activity section on the
Home page was not refreshing automatically. Users had to manually reload
the page to see updated activity.
Changes made:
refreshKeystate in Home page to trigger re-fetch of activity dataonActivityRefreshcallback prop toDashboardTableandChartTableBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION