chore(mcp): Simplify chart preview response#40020
Conversation
Code Review Agent Run #ca749cActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #40020 +/- ##
=======================================
Coverage 63.83% 63.84%
=======================================
Files 2589 2589
Lines 137821 137802 -19
Branches 31928 31924 -4
=======================================
- Hits 87978 87973 -5
+ Misses 48327 48313 -14
Partials 1516 1516
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SUMMARY
The get_chart_preview response duplicates data — the same ASCII/table content appears in both content.ascii_content (or content.table_data) AND in flat top-level fields (ascii_chart, table_data). Both copies also get sanitized independently, wasting work.
Solution:
Remove the redundant flat fields (format, ascii_chart, table_data, width, height) from ChartPreview. Clients should read from the content discriminated union, which already has all of this data via ASCIIPreview, TablePreview, etc.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION