Skip to content

Conversation

@aminghadersohi
Copy link
Contributor

SUMMARY

Change the default behavior of the MCP generate_chart tool to create preview-only charts by default (save_chart=False), requiring explicit save_chart=True to permanently save charts in Superset.

This enables a safer, more iterative workflow where LLM agents can preview charts before deciding to save them, reducing clutter from temporary or experimental visualizations.

Changes:

  • Changed save_chart default from True to False in GenerateChartRequest schema
  • Updated docstring in generate_chart.py to reflect the new default behavior
  • Updated corresponding unit test to verify the new default

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A - This is a behavioral default change with no UI changes.

TESTING INSTRUCTIONS

  1. Call the MCP generate_chart tool without specifying save_chart
  2. Verify that the chart is NOT saved to the database (preview-only mode)
  3. Call with save_chart=True and verify the chart IS saved
  4. Run MCP unit tests: pytest tests/unit_tests/mcp_service/ -v

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

🤖 Generated with Claude Code

Change the default behavior of the MCP generate_chart tool to create
preview-only charts by default (save_chart=False), requiring explicit
save_chart=True to permanently save charts in Superset.

This enables a safer, more iterative workflow where LLM agents can
preview charts before deciding to save them, reducing clutter from
temporary or experimental visualizations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@codeant-ai-for-open-source
Copy link
Contributor

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 ·
Reddit ·
LinkedIn

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 6, 2026

Code Review Agent Run #a4ea08

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: f2cdd6f..f2cdd6f
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/tool/generate_chart.py
    • tests/unit_tests/mcp_service/chart/tool/test_generate_chart.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

Bito Usage Guide

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 documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@codeant-ai-for-open-source
Copy link
Contributor

💡 Enhance Your PR Reviews

We noticed that 3 feature(s) are not configured for this repository. Enabling these features can help improve your code quality and workflow:

🚦 Quality Gates

Status: Quality Gates are not enabled at the organization level
Learn more about Quality Gates

🎫 Jira Ticket Compliance

Status: Jira credentials file not found. Please configure Jira integration in your settings
Learn more about Jira Integration

⚙️ Custom Rules

Status: No custom rules configured. Add rules via organization settings or .codeant/review.json in your repository
Learn more about Custom Rules


Want to enable these features? Contact your organization admin or check our documentation for setup instructions.

@netlify
Copy link

netlify bot commented Jan 6, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit f2cdd6f
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/695d9d719cfe3f0008c2ea09
😎 Deploy Preview https://deploy-preview-36935--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.17%. Comparing base (9aff89c) to head (58f1e6a).
⚠️ Report is 17 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #36935       +/-   ##
===========================================
+ Coverage        0   68.17%   +68.17%     
===========================================
  Files           0      639      +639     
  Lines           0    47657    +47657     
  Branches        0     5204     +5204     
===========================================
+ Hits            0    32491    +32491     
- Misses          0    13886    +13886     
- Partials        0     1280     +1280     
Flag Coverage Δ
hive 43.09% <ø> (?)
mysql 66.18% <ø> (?)
postgres 66.23% <ø> (?)
presto 46.69% <ø> (?)
python 68.14% <ø> (?)
sqlite 65.94% <ø> (?)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Address review feedback by adding a validator that ensures at least one
of save_chart or generate_preview is True. This prevents no-op requests
where both flags are False.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 7, 2026
@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #1bcb43

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: f2cdd6f..58f1e6a
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/tool/generate_chart.py
    • tests/unit_tests/mcp_service/chart/tool/test_generate_chart.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

Bito Usage Guide

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 documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@sadpandajoe sadpandajoe added the review:checkpoint Last PR reviewed during the daily review standup label Jan 8, 2026
@sadpandajoe sadpandajoe merged commit 0473606 into apache:master Jan 8, 2026
74 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:checkpoint Last PR reviewed during the daily review standup size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants