You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "robjuffermans (via GitHub)" <gi...@apache.org> on 2025/12/28 13:00:37 UTC

[PR] feat(chart): add default row/column expansion depth to Pivot Table [superset]

robjuffermans opened a new pull request, #36849:
URL: https://github.com/apache/superset/pull/36849

   Add controls to configure how deeply rows and columns are expanded by default when a Pivot Table chart loads. This allows charts to start with deeper hierarchy levels collapsed for better overview.
   
   - Add defaultRowExpansionDepth and defaultColExpansionDepth controls
   - Controls only appear when subtotals are enabled and depth > 1
   - Add computeCollapsedMap helper function for initial state seeding
   - Apply initial collapse in componentDidMount (not render) to avoid React anti-pattern
   - Add unit tests for computeCollapsedMap helper
   
   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### 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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3694785706

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3792513126

   🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) deployed environment on [GHA](https://github.com/apache/superset/actions/runs/21301168296) for [93cd8b8](https://github.com/apache/superset/commit/93cd8b8)
   
   • **Environment:** http://18.246.217.180:8080 (admin/admin)
   • **Lifetime:** 48h auto-cleanup
   • **Updates:** New commits create fresh environments automatically


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3739696687

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 93cd8b87d45f5529dbf99aac7afc838be13152ed |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/69652fe072055c0008ad349c |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-36849--superset-docs-preview.netlify.app](https://deploy-preview-36849--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTM2ODQ5LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.eNB7bZKtACX3920iHUFpMtZ4Wi7ilSHWlnM0WAq7gkY)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-36849--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #36849:
URL: https://github.com/apache/superset/pull/36849#discussion_r2649691764


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -23,6 +23,26 @@ import PropTypes from 'prop-types';
 import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
+/**
+ * Computes the initial collapsed state map for a given set of keys and depth.
+ * Keys at the specified depth will be marked as collapsed, hiding their children.
+ * @param {Array<Array>} keys - Array of key arrays (e.g., rowKeys or colKeys)
+ * @param {number} depth - The depth at which to collapse (1-based). Keys at this depth will be collapsed.
+ * @returns {Object} A map of flatKey => true for all keys that should be collapsed
+ */
+export function computeCollapsedMap(keys, depth) {
+  if (!depth || depth <= 0) {
+    return {};
+  }
+  const collapsed = {};
+  keys
+    .filter(k => k.length === depth)
+    .forEach(k => {
+      collapsed[flatKey(k)] = true;

Review Comment:
   **Suggestion:** Logic bug: `computeCollapsedMap` only marks entire keys whose length exactly equals `depth`, but row/col keys are typically full leaf paths — to collapse nodes at a given depth you must compute the unique prefix of length `depth` for each key and mark those prefixes collapsed. The current implementation will usually return empty and not collapse anything unless some keys already happen to be exactly `depth` long. [logic error]
   
   **Severity Level:** Minor ⚠️
   ```suggestion
   export function computeCollapsedMap(keys = [], depth) {
     const d = Number(depth);
     if (!Number.isInteger(d) || d <= 0) {
       return {};
     }
     const collapsed = {};
     const seen = new Set();
     keys.forEach(k => {
       if (!Array.isArray(k) || k.length < d) {
         return;
       }
       const prefix = k.slice(0, d);
       const keyStr = flatKey(prefix);
       if (!seen.has(keyStr)) {
         seen.add(keyStr);
         collapsed[keyStr] = true;
       }
   ```
   <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-pivot-table/src/react-pivottable/TableRenderers.jsx
   **Line:** 33:41
   **Comment:**
   	*Logic Error: Logic bug: `computeCollapsedMap` only marks entire keys whose length exactly equals `depth`, but row/col keys are typically full leaf paths — to collapse nodes at a given depth you must compute the unique prefix of length `depth` for each key and mark those prefixes collapsed. The current implementation will usually return empty and not collapse anything unless some keys already happen to be exactly `depth` long.
   
   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.
   ```
   </details>



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx:
##########
@@ -585,6 +587,8 @@ export default function PivotTableChart(props: PivotTableProps) {
           namesMapping={verboseMap}
           onContextMenu={handleContextMenu}
           allowRenderHtml={allowRenderHtml}
+          defaultRowExpansionDepth={defaultRowExpansionDepth}
+          defaultColExpansionDepth={defaultColExpansionDepth}

Review Comment:
   **Suggestion:** The values passed into the `PivotTable` should be validated/coerced to safe non-negative integers; passing `undefined`, `NaN`, negative numbers or non-integer values may lead to runtime errors or unexpected expansion behavior—coerce and clamp to a 0+ integer when passing props. [type error]
   
   **Severity Level:** Minor ⚠️
   ```suggestion
             defaultRowExpansionDepth={Number.isFinite(defaultRowExpansionDepth) ? Math.max(0, Math.trunc(defaultRowExpansionDepth)) : 0}
             defaultColExpansionDepth={Number.isFinite(defaultColExpansionDepth) ? Math.max(0, Math.trunc(defaultColExpansionDepth)) : 0}
   ```
   <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-pivot-table/src/PivotTableChart.tsx
   **Line:** 590:591
   **Comment:**
   	*Type Error: The values passed into the `PivotTable` should be validated/coerced to safe non-negative integers; passing `undefined`, `NaN`, negative numbers or non-integer values may lead to runtime errors or unexpected expansion behavior—coerce and clamp to a 0+ integer when passing props.
   
   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.
   ```
   </details>



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/types.ts:
##########
@@ -88,6 +88,8 @@ interface PivotTableCustomizeProps {
   time_grain_sqla?: TimeGranularity;
   granularity_sqla?: string;
   allowRenderHtml?: boolean;
+  defaultRowExpansionDepth?: number;
+  defaultColExpansionDepth?: number;

Review Comment:
   **Suggestion:** Compatibility bug: codebase and form data in this repository use both camelCase and snake_case property names (see other fields like `timeGrainSqla` and `time_grain_sqla`); adding only `defaultRowExpansionDepth` (camelCase) can cause consumers that populate props using snake_case form data to never receive this value. Add the snake_case equivalent `default_row_expansion_depth` to preserve backwards/interop compatibility. [possible bug]
   
   **Severity Level:** Critical 🚨
   ```suggestion
     default_row_expansion_depth?: number;
   ```
   <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-pivot-table/src/types.ts
   **Line:** 92:92
   **Comment:**
   	*Possible Bug: Compatibility bug: codebase and form data in this repository use both camelCase and snake_case property names (see other fields like `timeGrainSqla` and `time_grain_sqla`); adding only `defaultRowExpansionDepth` (camelCase) can cause consumers that populate props using snake_case form data to never receive this value. Add the snake_case equivalent `default_row_expansion_depth` to preserve backwards/interop compatibility.
   
   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.
   ```
   </details>



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts:
##########
@@ -107,6 +107,8 @@ export default function transformProps(chartProps: ChartProps<QueryFormData>) {
     timeGrainSqla,
     currencyFormat,
     allowRenderHtml,
+    defaultRowExpansionDepth,
+    defaultColExpansionDepth,

Review Comment:
   **Suggestion:** Missing sensible defaults: `defaultRowExpansionDepth` and `defaultColExpansionDepth` are destructured from `formData` without defaults, so if the keys are absent they will be `undefined`. Downstream code that expects numbers (e.g., arithmetic/comparison) can misbehave; provide numeric default values during destructuring. [possible bug]
   
   **Severity Level:** Critical 🚨
   ```suggestion
       defaultRowExpansionDepth = 0,
       defaultColExpansionDepth = 0,
   ```
   <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-pivot-table/src/plugin/transformProps.ts
   **Line:** 110:111
   **Comment:**
   	*Possible Bug: Missing sensible defaults: `defaultRowExpansionDepth` and `defaultColExpansionDepth` are destructured from `formData` without defaults, so if the keys are absent they will be `undefined`. Downstream code that expects numbers (e.g., arithmetic/comparison) can misbehave; provide numeric default values during destructuring.
   
   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.
   ```
   </details>



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts:
##########
@@ -181,5 +183,7 @@ export default function transformProps(chartProps: ChartProps<QueryFormData>) {
     onContextMenu,
     timeGrainSqla,
     allowRenderHtml,
+    defaultRowExpansionDepth,
+    defaultColExpansionDepth,

Review Comment:
   **Suggestion:** Type coercion issue: the returned props currently pass `defaultRowExpansionDepth` and `defaultColExpansionDepth` through as-is; if those values come as strings (common in form payloads) consumers expecting numbers will get incorrect types. Coerce to numbers in the returned object and fallback to 0 when coercion fails. [type error]
   
   **Severity Level:** Minor ⚠️
   ```suggestion
       defaultRowExpansionDepth:
         Number.isFinite(Number(defaultRowExpansionDepth)) && defaultRowExpansionDepth !== ''
           ? Number(defaultRowExpansionDepth)
           : 0,
       defaultColExpansionDepth:
         Number.isFinite(Number(defaultColExpansionDepth)) && defaultColExpansionDepth !== ''
           ? Number(defaultColExpansionDepth)
           : 0,
   ```
   <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-pivot-table/src/plugin/transformProps.ts
   **Line:** 186:187
   **Comment:**
   	*Type Error: Type coercion issue: the returned props currently pass `defaultRowExpansionDepth` and `defaultColExpansionDepth` through as-is; if those values come as strings (common in form payloads) consumers expecting numbers will get incorrect types. Coerce to numbers in the returned object and fallback to 0 when coercion fails.
   
   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.
   ```
   </details>



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx:
##########
@@ -183,6 +183,8 @@ export default function PivotTableChart(props: PivotTableProps) {
     onContextMenu,
     timeGrainSqla,
     allowRenderHtml,
+    defaultRowExpansionDepth,
+    defaultColExpansionDepth,

Review Comment:
   **Suggestion:** Missing default values for the new props: if `defaultRowExpansionDepth` or `defaultColExpansionDepth` are omitted they will be `undefined` and could be forwarded to the PivotTable component which may expect numeric values; provide safe defaults during destructuring to avoid undefined being used later. [possible bug]
   
   **Severity Level:** Critical 🚨
   ```suggestion
       defaultRowExpansionDepth = 0,
       defaultColExpansionDepth = 0,
   ```
   <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-pivot-table/src/PivotTableChart.tsx
   **Line:** 186:187
   **Comment:**
   	*Possible Bug: Missing default values for the new props: if `defaultRowExpansionDepth` or `defaultColExpansionDepth` are omitted they will be `undefined` and could be forwarded to the PivotTable component which may expect numeric values; provide safe defaults during destructuring to avoid undefined being used later.
   
   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.
   ```
   </details>



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -84,6 +104,57 @@ export class TableRenderer extends Component {
     this.clickHandler = this.clickHandler.bind(this);
   }
 
+  componentDidMount() {
+    // Apply initial collapse based on defaultRowExpansionDepth and defaultColExpansionDepth
+    const { defaultRowExpansionDepth, defaultColExpansionDepth } = this.props;
+
+    // Only apply if at least one depth is configured
+    if (!defaultRowExpansionDepth && !defaultColExpansionDepth) {

Review Comment:
   **Suggestion:** Robustness bug: the initial check uses truthiness (`if (!defaultRowExpansionDepth && !defaultColExpansionDepth)`) which treats non-positive or non-integer values incorrectly; explicitly validate depths as positive integers before proceeding so invalid or zero values are treated as "disabled" and other invalid inputs don't accidentally proceed. [possible bug]
   
   **Severity Level:** Critical 🚨
   ```suggestion
       // Only apply if at least one positive integer depth is configured
       const rowDepth = Number(defaultRowExpansionDepth);
       const colDepth = Number(defaultColExpansionDepth);
       if ((Number.isNaN(rowDepth) || rowDepth <= 0) && (Number.isNaN(colDepth) || colDepth <= 0)) {
   ```
   <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-pivot-table/src/react-pivottable/TableRenderers.jsx
   **Line:** 111:112
   **Comment:**
   	*Possible Bug: Robustness bug: the initial check uses truthiness (`if (!defaultRowExpansionDepth && !defaultColExpansionDepth)`) which treats non-positive or non-integer values incorrectly; explicitly validate depths as positive integers before proceeding so invalid or zero values are treated as "disabled" and other invalid inputs don't accidentally proceed.
   
   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.
   ```
   </details>



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -84,6 +104,57 @@ export class TableRenderer extends Component {
     this.clickHandler = this.clickHandler.bind(this);
   }
 
+  componentDidMount() {
+    // Apply initial collapse based on defaultRowExpansionDepth and defaultColExpansionDepth
+    const { defaultRowExpansionDepth, defaultColExpansionDepth } = this.props;
+
+    // Only apply if at least one depth is configured
+    if (!defaultRowExpansionDepth && !defaultColExpansionDepth) {
+      return;
+    }
+
+    const {
+      rowKeys,
+      colKeys,
+      rowAttrs,
+      colAttrs,
+      rowSubtotalDisplay,
+      colSubtotalDisplay,
+    } = this.getBasePivotSettings();
+
+    const updates = {};
+
+    // Apply row collapse if subtotals are enabled and we have enough depth
+    if (
+      defaultRowExpansionDepth &&
+      rowSubtotalDisplay.enabled &&
+      rowAttrs.length > 1 &&
+      defaultRowExpansionDepth < rowAttrs.length
+    ) {
+      updates.collapsedRows = computeCollapsedMap(
+        rowKeys,
+        defaultRowExpansionDepth,
+      );
+    }
+
+    // Apply column collapse if subtotals are enabled and we have enough depth
+    if (
+      defaultColExpansionDepth &&
+      colSubtotalDisplay.enabled &&
+      colAttrs.length > 1 &&
+      defaultColExpansionDepth < colAttrs.length
+    ) {
+      updates.collapsedCols = computeCollapsedMap(
+        colKeys,
+        defaultColExpansionDepth,
+      );
+    }
+
+    if (Object.keys(updates).length > 0) {
+      this.setState(updates);

Review Comment:
   **Suggestion:** Logic bug: the component calls setState whenever any key exists on the `updates` object, even if the computed `collapsedRows`/`collapsedCols` maps are empty objects (no collapsed keys). This will trigger an unnecessary state update and may overwrite existing collapse state; only apply state updates when the collapsed maps actually contain entries. [logic error]
   
   **Severity Level:** Minor ⚠️
   ```suggestion
       const collapsedRows = updates.collapsedRows || {};
       const collapsedCols = updates.collapsedCols || {};
       const hasCollapsedRows = Object.keys(collapsedRows).length > 0;
       const hasCollapsedCols = Object.keys(collapsedCols).length > 0;
       if (hasCollapsedRows || hasCollapsedCols) {
         const stateUpdate = {};
         if (hasCollapsedRows) stateUpdate.collapsedRows = collapsedRows;
         if (hasCollapsedCols) stateUpdate.collapsedCols = collapsedCols;
         this.setState(stateUpdate);
   ```
   <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-pivot-table/src/react-pivottable/TableRenderers.jsx
   **Line:** 153:154
   **Comment:**
   	*Logic Error: Logic bug: the component calls setState whenever any key exists on the `updates` object, even if the computed `collapsedRows`/`collapsedCols` maps are empty objects (no collapsed keys). This will trigger an unnecessary state update and may overwrite existing collapse state; only apply state updates when the collapsed maps actually contain entries.
   
   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.
   ```
   </details>



-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #36849:
URL: https://github.com/apache/superset/pull/36849#discussion_r2649735751


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -23,6 +23,26 @@ import PropTypes from 'prop-types';
 import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
+/**
+ * Computes the initial collapsed state map for a given set of keys and depth.
+ * Keys at the specified depth will be marked as collapsed, hiding their children.
+ * @param {Array<Array>} keys - Array of key arrays (e.g., rowKeys or colKeys)
+ * @param {number} depth - The depth at which to collapse (1-based). Keys at this depth will be collapsed.
+ * @returns {Object} A map of flatKey => true for all keys that should be collapsed
+ */
+export function computeCollapsedMap(keys, depth) {

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Convert JS to TS</b></div>
   <div id="fix">
   
   This file is written in JavaScript, but the Superset development standards require converting all JavaScript files to TypeScript as part of ongoing modernization. The added computeCollapsedMap function and componentDidMount logic should be typed for better safety and maintainability.
   </div>
   
   
   </div>
   
   <details>
   <summary><b>Citations</b></summary>
   <ul>
   
   <li>
   Rule Violated: <a href="https://github.com/apache/superset/blob/33d0ebe/.cursor/rules/dev-standard.mdc#L17">dev-standard.mdc:17</a>
   </li>
   
   </ul>
   </details>
   
   
   
   
   <small><i>Code Review Run #8e0549</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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3694730167

   CodeAnt AI is reviewing your PR.
   
   ---
   
   ### Thanks for using CodeAnt! 🎉
   
   We're free for open-source projects. if you're enjoying it, help us grow by sharing.
   
   [Share on X](https://twitter.com/intent/tweet?text=Just%20tried%20%40CodeAntAI%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A&url=https%3A//codeant.ai) ·
   [Reddit](https://www.reddit.com/submit?title=Check%20out%20CodeAnt%20for%20automated%20code%20review&text=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A%20https%3A//codeant.ai) ·
   [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeant.ai&mini=true&title=Check%20out%20CodeAnt%20for%20automated%20code%20review&summary=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos)
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3792444830

   🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/21301168296) for [93cd8b8](https://github.com/apache/superset/commit/93cd8b8)


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-4699520974

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3694730241

   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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3699329763

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3739926879

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3694732668

   ## Nitpicks 🔍
   
   <table>
   <tr><td>🔒&nbsp;<strong>No security issues identified</strong></td></tr>
   <tr><td>⚡&nbsp;<strong>Recommended areas for review</strong><br><br>
   
   - [ ] <a href='https://github.com/apache/superset/pull/36849/files#diff-12adcc0dab4417a345f763565aee3cd0f657eece6142615492172abe69cfd3bdR33-R44'><strong>Input Validation</strong></a><br>The new helper `computeCollapsedMap` accepts `keys` and `depth` but does not validate that `keys` is an array of arrays nor that `depth` is a positive integer. Unexpected inputs (null, non-array keys, non-integer or out-of-range depth) could lead to no-op behavior or inadvertent state mutations. Consider validating inputs and normalizing `depth`.<br>
   
   - [ ] <a href='https://github.com/apache/superset/pull/36849/files#diff-380ab7f1cfa9e06b6c86b781ab6bd0f65be79a8a40125415363e270690e5a9d1R110-R111'><strong>Missing validation</strong></a><br>The new `defaultRowExpansionDepth` and `defaultColExpansionDepth` values are passed through directly from `formData` with no normalization or clamping. If these values are undefined, non-numeric, negative, or excessively large, downstream code that uses them to seed initial expanded/collapsed state may behave unexpectedly or suffer performance issues.<br>
   
   - [ ] <a href='https://github.com/apache/superset/pull/36849/files#diff-380ab7f1cfa9e06b6c86b781ab6bd0f65be79a8a40125415363e270690e5a9d1R186-R187'><strong>Potential performance impact</strong></a><br>Unbounded expansion depth values could cause heavy initial work when computing collapse/expand maps (e.g., iterating very deep trees). It's safer to cap the depth to a reasonable maximum (or to the available hierarchy depth) before returning the props.<br>
   
   - [ ] <a href='https://github.com/apache/superset/pull/36849/files#diff-12adcc0dab4417a345f763565aee3cd0f657eece6142615492172abe69cfd3bdR33-R44'><strong>Implicit-parent collapse</strong></a><br>The current implementation of `computeCollapsedMap` only collapses keys whose length exactly equals `depth` (it filters with `k.length === depth`). If parent keys are implicit (not present in `keys`) but only deeper child keys exist (e.g., only ['A','X','1'] and ['A','X','2']), the parent key ['A','X'] will not be collapsed even though the UI probably expects it to be. Add tests and/or update the function to derive parent keys from longer keys (slice first `depth` elements) so implicit parents are collapsed.<br>
   
   - [ ] <a href='https://github.com/apache/superset/pull/36849/files#diff-12adcc0dab4417a345f763565aee3cd0f657eece6142615492172abe69cfd3bdR107-R156'><strong>Initial state application</strong></a><br>`componentDidMount` calls `this.getBasePivotSettings()` which constructs a new `PivotData` and computes keys. This duplicates work done in render/caching and could be expensive. Also, `setState(updates)` may write empty `{}` collapsed maps when `computeCollapsedMap` returns empty objects — this can overwrite any prior state unintentionally. Consider reusing cached settings (if present) and only set state when collapsed maps are non-empty.<br>
   
   </td></tr>
   </table>
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3694733667

   CodeAnt AI finished reviewing your 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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3699731796

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3699164153

   CodeAnt AI is running Incremental review
   
   ---
   
   ### Thanks for using CodeAnt! 🎉
   
   We're free for open-source projects. if you're enjoying it, help us grow by sharing.
   
   [Share on X](https://twitter.com/intent/tweet?text=Just%20tried%20%40CodeAntAI%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A&url=https%3A//codeant.ai) ·
   [Reddit](https://www.reddit.com/submit?title=Check%20out%20CodeAnt%20for%20automated%20code%20review&text=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A%20https%3A//codeant.ai) ·
   [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeant.ai&mini=true&title=Check%20out%20CodeAnt%20for%20automated%20code%20review&summary=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos)
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "SBIN2010 (via GitHub)" <gi...@apache.org>.
SBIN2010 commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3792551923

   Superset uses Git pre-commit hooks courtesy of [pre-commit](https://pre-commit.com/). To install run the following:
   
   pip3 install -r requirements/development.txt
   pre-commit install
   A series of checks will now run when you make a git commit.
   
   Alternatively it is possible to run pre-commit by running pre-commit manually:
   
   pre-commit run --all-files
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3792432909

   Running CI 🤞 
   
   @yousoph is anyone at Preset still tracking Pivot table issues that might be able to review?


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "robjuffermans (via GitHub)" <gi...@apache.org>.
robjuffermans commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3694812545

   Thanks for the feedback! You're correct that the project is modernizing to TypeScript. However, converting the entire TableRenderers.jsx file (~950 lines) to TypeScript is a significant refactoring effort that's beyond the scope of this feature PR.
   
   I'd prefer to keep this PR focused on the new functionality. The TypeScript conversion of the react-pivottable folder would be better suited as a separate modernization PR.
   
   Would you be okay with merging this as-is and addressing the TS conversion in a follow-up?


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-3739685426

   CodeAnt AI is running Incremental review
   
   ---
   
   ### Thanks for using CodeAnt! 🎉
   
   We're free for open-source projects. if you're enjoying it, help us grow by sharing.
   
   [Share on X](https://twitter.com/intent/tweet?text=Just%20tried%20%40CodeAntAI%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A&url=https%3A//codeant.ai) ·
   [Reddit](https://www.reddit.com/submit?title=Check%20out%20CodeAnt%20for%20automated%20code%20review&text=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A%20https%3A//codeant.ai) ·
   [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeant.ai&mini=true&title=Check%20out%20CodeAnt%20for%20automated%20code%20review&summary=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos)
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-4738132378

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/36849?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `49.29577%` with `36 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 64.27%. Comparing base ([`b05fe48`](https://app.codecov.io/gh/apache/superset/commit/b05fe4857e50bd28332f80ab8e881bd92b7b3fd1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`587a978`](https://app.codecov.io/gh/apache/superset/commit/587a978a903a337faf3528bf6f4d0238a7d901c9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 126 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/36849?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...ivot-table/src/react-pivottable/TableRenderers.tsx](https://app.codecov.io/gh/apache/superset/pull/36849?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-pivot-table%2Fsrc%2Freact-pivottable%2FTableRenderers.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtcGl2b3QtdGFibGUvc3JjL3JlYWN0LXBpdm90dGFibGUvVGFibGVSZW5kZXJlcnMudHN4) | 64.70% | [18 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/36849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ugin-chart-pivot-table/src/plugin/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/36849?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-pivot-table%2Fsrc%2Fplugin%2FcontrolPanel.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtcGl2b3QtdGFibGUvc3JjL3BsdWdpbi9jb250cm9sUGFuZWwudHN4) | 0.00% | [16 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/36849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...s/plugin-chart-pivot-table/src/PivotTableChart.tsx](https://app.codecov.io/gh/apache/superset/pull/36849?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-pivot-table%2Fsrc%2FPivotTableChart.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtcGl2b3QtdGFibGUvc3JjL1Bpdm90VGFibGVDaGFydC50c3g=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/36849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #36849      +/-   ##
   ==========================================
   - Coverage   64.28%   64.27%   -0.02%     
   ==========================================
     Files        2659     2659              
     Lines      144304   144375      +71     
     Branches    33260    33294      +34     
   ==========================================
   + Hits        92773    92802      +29     
   - Misses      49902    49944      +42     
     Partials     1629     1629              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/36849/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/36849/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.22% <49.29%> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/36849?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-4738092886

   <!-- translation-regression-bot -->
   ## ⚠️ Translation Regression Detected
   
   A source change in this PR renamed or reworded strings, invalidating existing translations (they are now `#, fuzzy`) in `de`, `fi`, `th`. Please resolve the affected `.po` files before merging.
   
   _Note: intentionally **deleting** a translatable string is not a regression and is not flagged here — only translations invalidated by a renamed/reworded source string are._
   
   | Language | Fuzzy before | Fuzzy after | New |
   |----------|-------------:|------------:|----:|
   | `de` | 0 | 997 | +997 |
   | `fi` | 4817 | 4823 | +6 |
   | `th` | 4817 | 4823 | +6 |
   
   ### How to fix
   
   **1. Install dependencies** (if not already set up):
   
   ```bash
   pip install -r superset/translations/requirements.txt
   sudo apt-get install gettext   # or: brew install gettext
   ```
   
   **2. Re-extract strings and sync `.po` files:**
   
   ```bash
   ./scripts/translations/babel_update.sh
   ```
   
   This rewrites `superset/translations/messages.pot` from the current source files and merges the changes into every `.po` file. Strings whose `msgid` changed will be marked `#, fuzzy`.
   
   **3. Resolve the fuzzy entries** in the affected language files (`de`, `fi`, `th`):
   
   ```bash
   grep -n '#, fuzzy' superset/translations/<lang>/LC_MESSAGES/messages.po
   ```
   
   For each fuzzy entry, either rewrite the `msgstr` to match the new string and remove the `#, fuzzy` line, or clear the `msgstr` to `""` if you cannot provide a translation.
   
   **4. Commit your changes to the `.po` files.**
   


-- 
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] feat(chart): add default row/column expansion depth to Pivot Table [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #36849:
URL: https://github.com/apache/superset/pull/36849#issuecomment-5040142641

   Confirmed in the current diff: `didApplyInitialCollapse.current` in `TableRenderers.tsx` only lets the collapse-seeding effect run once, so bumping the depth controls in Explore after the initial render does nothing until you reload the page. Can you make the renderTrigger controls actually take effect live? Also, `babel-extract` is failing on this branch, might just need a rebase. Happy to jump in if you'd like help on this one...


-- 
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