codeant-ai-for-open-source[bot] commented on code in PR #41907:
URL: https://github.com/apache/superset/pull/41907#discussion_r3559092786


##########
superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/transformProps.ts:
##########
@@ -335,6 +335,7 @@ export default function transformProps(
     groupby,
     selectedValues,
     onContextMenu,
+    onDrillDown,

Review Comment:
   **Suggestion:** This adds drill-down callback plumbing, but Box Plot still 
has no `drilldown_hierarchy` control in its control panel, so users cannot 
configure a hierarchy and the host will never provide this callback in normal 
UI flows. Add `sections.drilldownHierarchySection` to the Box Plot control 
panel (like Pie/Funnel/Gauge) so this path is reachable. [incomplete 
implementation]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Box Plot charts cannot configure drill-down hierarchy.
   - ⚠️ Dashboard drill-down inconsistent across supported ECharts charts.
   - ⚠️ Box Plot drill-down plumbing remains unreachable in normal flows.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Create a Box Plot chart in Explore using the Box Plot plugin registered in
   `superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/index.ts:21-68`, 
which wires
   `controlPanel` from `src/BoxPlot/controlPanel.ts` (read at lines 2-140) into 
the chart
   configuration.
   
   2. Inspect the Box Plot control panel configuration in 
`src/BoxPlot/controlPanel.ts:2-140`
   and note that `controlPanelSections` only includes the "Query" section,
   `sections.titleControls`, and a "Chart Options" section; unlike
   Pie/Gauge/Funnel/Timeseries control panels (e.g. 
`src/Pie/controlPanel.tsx:11`,
   `src/Funnel/controlPanel.tsx:15`, `src/Gauge/controlPanel.tsx:21`,
   `src/Timeseries/Regular/Bar/controlPanel.tsx:317`) there is no
   `sections.drilldownHierarchySection`, so users have no way in the UI to set 
the
   `drilldown_hierarchy` form-data field for Box Plot.
   
   3. Add the Box Plot chart to a dashboard so it is rendered through 
`Chart.tsx`, which
   wraps charts in `DrillDownHost` 
(`superset-frontend/src/components/Chart/Chart.tsx:359`);
   `DrillDownHost` calls `useDrillDownState` and derives `hierarchy` from
   `drilldown_hierarchy` (`useDrillDownState.ts:47-15`) and computes 
`hasHierarchy`
   (`useDrillDownState.ts:35-39`). Because the Box Plot control panel never 
populates
   `drilldown_hierarchy`, `hierarchy` is an empty array and `hasHierarchy` is 
false, so
   `drillEnabled` is false (`DrillDownHost.tsx:44-48`) and `onDrillDown` 
remains `undefined`,
   with the host taking the pass-through path that returns 
<ChartRendererComponent
   {...rendererProps} /> without an `onDrillDown` prop 
(`DrillDownHost.tsx:173-175).
   
   4. When the dashboard user clicks a Box Plot data point, the ECharts renderer
   `EchartsBoxPlot` (`src/BoxPlot/EchartsBoxPlot.tsx:23-37`) calls 
`allEventHandlers(props)`
   to wire interactions based on the transformed props from `transformProps`
   (`src/BoxPlot/transformProps.ts:7-22, 288-302), where `hooks` is 
destructured as `{
   setDataMask = () => {}, onContextMenu, onDrillDown }` and `onDrillDown` is 
always
   `undefined` in normal UI flows. As a result, no drill-down callback is 
invoked, no
   breadcrumb is rendered (because `DrillDownHost` never enabled drilling), and 
the newly
   added `onDrillDown` plumbing for Box Plot remains unreachable, making 
drill-down
   effectively unusable for this chart type.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=90c1becb9955485fbf44ad2a0107366e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=90c1becb9955485fbf44ad2a0107366e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/transformProps.ts
   **Line:** 338:338
   **Comment:**
        *Incomplete Implementation: This adds drill-down callback plumbing, but 
Box Plot still has no `drilldown_hierarchy` control in its control panel, so 
users cannot configure a hierarchy and the host will never provide this 
callback in normal UI flows. Add `sections.drilldownHierarchySection` to the 
Box Plot control panel (like Pie/Funnel/Gauge) so this path is reachable.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41907&comment_hash=4287bc7150949fc2ed810d2f14a954624bd88805fcc4ff62d204475db2838368&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41907&comment_hash=4287bc7150949fc2ed810d2f14a954624bd88805fcc4ff62d204475db2838368&reaction=dislike'>👎</a>



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to