You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "amaannawab923 (via GitHub)" <gi...@apache.org> on 2026/03/04 09:30:10 UTC
[PR] fix(ag-grid): persist AG Grid column filters in explore permalinks [superset]
amaannawab923 opened a new pull request, #38393:
URL: https://github.com/apache/superset/pull/38393
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
AG Grid table filters were not being preserved when sharing Explore permalinks. A user could apply column filters, copy the permalink, but anyone opening that
link would see the chart with no filters applied. This already worked correctly in dashboard permalinks — only Explore was missing this behavior.
Fixed by extending the Explore permalink to also store the chart's filter state when a permalink is created, and restoring it when the permalink is opened.
This follows the same approach that dashboards already use. Old permalinks without this data continue to work as before.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ag-grid): persist AG Grid column filters in explore permalinks [superset]
Posted by "amaannawab923 (via GitHub)" <gi...@apache.org>.
amaannawab923 merged PR #38393:
URL: https://github.com/apache/superset/pull/38393
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ag-grid): persist AG Grid column filters in explore permalinks [superset]
Posted by "amaannawab923 (via GitHub)" <gi...@apache.org>.
amaannawab923 commented on PR #38393:
URL: https://github.com/apache/superset/pull/38393#issuecomment-4034111903
> Can we get some before/after recordings. Code looks good to me but the blast radius is really large for this
Thanks , have attatched the recordings , yes i agree the code coverage is pretty huge but its thoroughly tested
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ag-grid): persist AG Grid column filters in explore permalinks [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38393:
URL: https://github.com/apache/superset/pull/38393#issuecomment-4033702808
## **Sequence Diagram**
This PR updates the Explore permalink flow so that table-like chart state (such as AG Grid column filters and sorting) is saved when generating a permalink and restored when the permalink is opened.
```mermaid
sequenceDiagram
participant User
participant ExploreUI
participant ReduxStore
participant Backend
User->>ExploreUI: Adjust table filters and sorting
ExploreUI->>ReduxStore: Update stored chart state for chart
User->>ExploreUI: Share or copy Explore link
ExploreUI->>Backend: Request permalink with form data and chart state
Backend-->>ExploreUI: Return permalink URL
User->>ExploreUI: Open Explore permalink URL
ExploreUI->>Backend: Load Explore data by permalink key
Backend-->>ExploreUI: Return form data and saved chart state
ExploreUI->>ReduxStore: Hydrate explore state with chart state
ExploreUI-->>User: Render table with restored filters and sorting
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ag-grid): persist AG Grid column filters in explore permalinks [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38393:
URL: https://github.com/apache/superset/pull/38393#issuecomment-3996318900
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ag-grid): persist AG Grid column filters in explore permalinks [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #38393:
URL: https://github.com/apache/superset/pull/38393#discussion_r2882830078
##########
superset-frontend/src/explore/actions/exploreActions.ts:
##########
@@ -153,6 +153,19 @@ export function setForceQuery(force: boolean) {
};
}
+export const UPDATE_EXPLORE_CHART_STATE = 'UPDATE_EXPLORE_CHART_STATE';
+export function updateExploreChartState(
+ chartId: number,
+ chartState: Record<string, unknown>,
+) {
+ return {
+ type: UPDATE_EXPLORE_CHART_STATE,
+ chartId,
+ chartState,
+ lastModified: Date.now(),
+ };
+}
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing Action Export</b></div>
<div id="fix">
The newly added updateExploreChartState action follows the correct Redux pattern but is missing from the exploreActions object. This inconsistency could prevent the action from being available when importing from exploreActions, potentially causing runtime errors if code relies on that export.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
- updateChartTitle,
- createNewSlice,
+ updateChartTitle,
+ updateExploreChartState,
+ createNewSlice,
```
</div>
</details>
</div>
<small><i>Code Review Run #a38ff4</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ag-grid): persist AG Grid column filters in explore permalinks [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38393:
URL: https://github.com/apache/superset/pull/38393#issuecomment-3996324566
## **Sequence Diagram**
Shows how Explore permalinks now include chart-level state (table filters) when created, and how that state is restored and kept in the Redux store while the chart updates propagate back to the store. This is the minimal success path introduced by the PR.
```mermaid
sequenceDiagram
participant User
participant ExploreUI as Explore UI
participant PermalinkAPI as Permalink API
participant Backend as Backend (GET /explore)
participant Store as Redux Store
participant Chart as ChartContainer
User->>ExploreUI: Copy/Share permalink
ExploreUI->>PermalinkAPI: getChartPermalink(formData, chartState) // includes table column filters
PermalinkAPI-->>ExploreUI: Permalink saved (key/url)
User->>ExploreUI: Open permalink URL
ExploreUI->>Backend: fetchExploreData(permalink_key)
Backend-->>ExploreUI: Explore payload (form_data, chartState)
ExploreUI->>Store: dispatch hydrateExplore(..., chartStates)
Store-->>ExploreUI: explore state populated (chartStates available)
ExploreUI->>Chart: render with merged ownState (includes restored chartState)
Chart-->>ExploreUI: onChartStateChange(newState)
ExploreUI->>Store: dispatch updateExploreChartState(chartId, newState)
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org