bito-code-review[bot] commented on code in PR #41341:
URL: https://github.com/apache/superset/pull/41341#discussion_r3460607718


##########
superset-frontend/plugins/preset-chart-deckgl/src/utilities/tooltipUtils.tsx:
##########
@@ -87,8 +87,12 @@ function extractValue(
   fieldName: string,
   checkPoints = true,
 ): any {
+  // Tooltip fields can come from transformed feature props, extraProps, or
+  // metric maps depending on chart path, so check all canonical containers.
   let value =
     o.object?.[fieldName] ||
+    o.object?.extraProps?.[fieldName] ||
+    o.object?.metrics?.[fieldName] ||
     o.object?.properties?.[fieldName] ||
     o.object?.data?.[fieldName] ||
     '';

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing unit tests for modified functions</b></div>
   <div id="fix">
   
   Add unit tests for `extractValue`, `buildFieldBasedTooltipItems`, and 
`processTooltipContentItem`. Rule [6262] requires tests that verify actual 
business logic—these functions were modified (empty-string sentinel, extra 
container lookups, geojson polygon metric fallback) but have no coverage. 
Create `tooltipUtils.test.tsx` and test each behavioral path introduced by this 
diff.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #28e110</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: [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