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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx:
##########
@@ -161,6 +163,26 @@ const parseLabel = (value: unknown): string | number => {
   return String(value);
 };
 
+/**
+ * Whether a row prefix is collapsed. An explicit toggle wins. Otherwise the
+ * prefix follows the default. The empty prefix is always expanded, because the
+ * ancestor walk visits it for every key.
+ */
+function isEffectivelyCollapsed(
+  key: string[],
+  collapsed: Record<string, boolean>,
+  collapseByDefault: boolean,
+): boolean {
+  if (key.length === 0) {
+    return false;
+  }
+  const keyId = flatKey(key);
+  if (keyId in collapsed) {
+    return Boolean(collapsed[keyId]);
+  }

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and 
marked this thread resolved** as of `262e8f9`.
   
   The explicit-collapse check now uses `Object.hasOwn(collapsed, keyId)`, so 
inherited properties such as `constructor` and `toString` are ignored.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it 
open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



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