bito-code-review[bot] commented on code in PR #43770:
URL: https://github.com/apache/superset/pull/43770#discussion_r3906690314
##########
superset/mcp_service/chart/chart_utils.py:
##########
@@ -1065,6 +1066,155 @@ def map_histogram_config(config:
"HistogramChartConfig") -> Dict[str, Any]:
return form_data
+def _bullet_token_list(values: Sequence[str | float]) -> str:
+ """Serialize typed Bullet controls to the frontend's comma-separated
form."""
+ return ",".join(
+ format(value, "g") if isinstance(value, float) else value for value in
values
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Float precision loss</b></div>
<div id="fix">
`format(value, "g")` rounds floats to 6 significant digits (e.g.
`123456.789` → `'123457'`). The frontend `tokenizeToNumericArray` in
`Bullet/utils.ts` parses these tokens back with `Number(token)`, so bullet
range/marker thresholds are silently altered. Use `str(value)` to preserve
precision.
</div>
</div>
<small><i>Code Review Run #658aec</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]