Skip to content

feat(mcp): add Handlebars chart type support to MCP service - #38402

Merged
aminghadersohi merged 7 commits into
apache:masterfrom
aminghadersohi:amin/mcp-handlebars-chart
Mar 24, 2026
Merged

aminghadersohi merged 7 commits into
apache:masterfrom
aminghadersohi:amin/mcp-handlebars-chart

Conversation

@aminghadersohi

@aminghadersohi aminghadersohi commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

User description

SUMMARY

Add support for creating Handlebars template charts via the MCP service. Handlebars charts render query results using custom HTML templates, enabling fully flexible layouts like KPI cards, leaderboards, and formatted reports.

Changes:

  • schemas.py: Add HandlebarsChartConfig Pydantic schema supporting both aggregate (metrics/groupby) and raw (columns) query modes, with validation for required fields per mode
  • chart_utils.py: Add map_handlebars_config() for form_data mapping, _resolve_viz_type() helper to centralize viz_type resolution from config objects, and update generate_chart_name/analyze_chart_capabilities/analyze_chart_semantics for handlebars
  • schema_validator.py: Add _pre_validate_handlebars_config() with user-friendly error messages for missing template, wrong query mode fields, and non-string chart_type guard
  • app.py: Update default instructions to document the new chart_type="handlebars" option
  • Tests: 42 unit tests covering schema validation, form_data mapping, chart name generation, viz_type resolution, capabilities/semantics analysis, and pre-validation error codes

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A - Backend-only change (MCP service schemas and utilities)

TESTING INSTRUCTIONS

  1. Run pytest tests/unit_tests/mcp_service/chart/test_handlebars_chart.py -v to verify all 42 tests pass
  2. Run pytest tests/unit_tests/mcp_service/ -q to verify no regressions (691 tests)
  3. Verify handlebars chart creation via MCP tools with configs like:
    {
      "dataset_id": 1,
      "config": {
        "chart_type": "handlebars",
        "handlebars_template": "<ul>{{#each data}}<li>{{this.name}}: {{this.value}}</li>{{/each}}</ul>",
        "metrics": [{"name": "sales", "aggregate": "SUM"}],
        "groupby": [{"name": "region"}]
      }
    }

ADDITIONAL INFORMATION

  • Introduces new feature or API
  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration
  • Removes existing feature or API

MCP Testing Results (localhost, 2026-03-13)

Comprehensive testing via localhost MCP tools on branch amin/mcp-handlebars-chart:

Unit Tests

  • PR-specific tests: 46/46 passed (test_handlebars_chart.py)
  • Full MCP test suite: 841/841 passed (0 failures)

Live MCP Tool Testing

  • health_check → healthy
  • get_instance_info → 109 charts, 42 datasets, 18 dashboards
  • list_charts(viz_type=handlebars) → 0 results (expected, no handlebars charts in example data)
  • generate_chart (xy line) → chart preview generated with explore URL
  • list_dashboards → 18 dashboards listed correctly
  • All existing chart types (line, bar, pie, pivot_table, mixed_timeseries) → still working correctly

MCP Tool Testing Results (2026-03-13)

Tested against local Superset MCP service (port 5008) with all tools passing.

health_check

  • Request: health_check() (no params)
  • Response: {"status": "healthy", "service": "Superset OSS MCP Service", "version": "0.0.0-dev", "python_version": "3.12.11"}

get_instance_info

  • Request: get_instance_info({})
  • Response: Admin user (id=1), 18 dashboards, 109 charts, 42 datasets, 1 database (postgresql). current_user properly serialized with roles ["Admin"]. feature_availability.accessible_menus returns 25 menu items.

list_charts

  • Request: list_charts({"page": 1, "page_size": 3, "order_column": "changed_on", "order_direction": "desc"})
  • Response: 3 charts returned, total_count=109, pagination working correctly.

list_dashboards

  • Request: list_dashboards({"page": 1, "page_size": 3, "order_column": "changed_on", "order_direction": "desc"})
  • Response: 3 dashboards returned, total_count=18, pagination working correctly.

execute_sql

  • Request: execute_sql({"database_id": 1, "sql": "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' LIMIT 5"})
  • Response: 5 rows returned in 36ms, execution successful.

CodeAnt-AI Description

Add Handlebars chart support for custom HTML layouts

What Changed

  • Added a new chart type that renders query results with a Handlebars HTML template for custom layouts like KPI cards, leaderboards, and reports
  • Supports two modes: aggregate with metrics and optional groupings, or raw with selected columns
  • Shows clearer validation errors when the template is missing, empty, the query mode is invalid, or required fields for the chosen mode are not provided
  • Updated chart naming, chart guidance text, and chart descriptions to include the new chart type
  • Added unit tests for valid setups, invalid inputs, data mapping, naming, and validation messages

Impact

✅ Custom report layouts in MCP
✅ Fewer invalid Handlebars chart requests
✅ Clearer setup errors for template charts

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@bito-code-review

bito-code-review Bot commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #d6b303

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: 0fdd579..0fdd579
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

@dosubot dosubot Bot added the change:backend Requires changing the backend label Mar 4, 2026
@netlify

netlify Bot commented Mar 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 73de8f2
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/69c2632f4d51070008d118a7
😎 Deploy Preview https://deploy-preview-38402--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

codecov Bot commented Mar 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 18.68132% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.46%. Comparing base (7222327) to head (73de8f2).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
superset/mcp_service/chart/chart_utils.py 6.52% 43 Missing ⚠️
...t/mcp_service/chart/validation/schema_validator.py 0.00% 17 Missing ⚠️
superset/mcp_service/chart/schemas.py 50.00% 14 Missing ⚠️

❌ Your project status has failed because the head coverage (99.85%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #38402      +/-   ##
==========================================
- Coverage   65.54%   64.46%   -1.08%     
==========================================
  Files        1820     2533     +713     
  Lines       72868   130272   +57404     
  Branches    23339    30181    +6842     
==========================================
+ Hits        47758    83979   +36221     
- Misses      25110    44829   +19719     
- Partials        0     1464    +1464     
Flag Coverage Δ
hive 40.44% <18.68%> (?)
mysql 61.40% <18.68%> (?)
postgres 61.46% <18.68%> (?)
presto 40.45% <18.68%> (?)
python 63.07% <18.68%> (?)
sqlite 61.10% <18.68%> (?)
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.

@bito-code-review

bito-code-review Bot commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #79f2f2

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: 583ab27..583ab27
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

@bito-code-review bito-code-review Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #34ae1a

Actionable Suggestions - 1
  • superset/mcp_service/app.py - 1
    • Documentation error in Handlebars template syntax · Line 124-124
Additional Suggestions - 1
  • superset/mcp_service/chart/schemas.py - 1
    • Type Hint Correction · Line 555-555
      The model_validator method uses an incorrect return type annotation. Pydantic v2 requires @model_validator(mode='after') methods to return Self for accurate static type checking, rather than a string forward reference.
      Code suggestion
       @@ -25,2 +25,3 @@
      - from typing import Annotated, Any, Dict, List, Literal, Protocol
      - 
      + from typing import Annotated, Any, Dict, List, Literal, Protocol
      + from typing_extensions import Self
      + 
       @@ -554,3 +554,3 @@
      -    @model_validator(mode="after")
      -    def validate_query_fields(self) -> "HandlebarsChartConfig":
      -        """Validate that the right fields are provided for the query mode."""
      +    @model_validator(mode="after")
      +    def validate_query_fields(self: Self) -> Self:
      +        """Validate that the right fields are provided for the query mode."""
Review Details
  • Files reviewed - 5 · Commit Range: 89d088f..89d088f
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

- chart_type="handlebars": Custom HTML template chart (KPI cards, leaderboards, reports)
Requires handlebars_template with Handlebars HTML template string.
Supports query_mode="aggregate" (with metrics/groupby) or "raw" (with columns).
Data available as {{{{data}}}} array; helpers: dateFormat, formatNumber, stringify.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation error in Handlebars template syntax

The documentation shows {{{{data}}}} but Handlebars uses {{data}}. This appears to be a typo that could confuse users trying to use the handlebars template feature.

Code suggestion
Check the AI-generated fix before applying
Suggested change
Data available as {{{{data}}}} array; helpers: dateFormat, formatNumber, stringify.
Data available as {{data}} array; helpers: dateFormat, formatNumber, stringify.

Code Review Run #34ae1a


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The {{{{data}}}} syntax in the documentation is actually correct Handlebars — it's the triple-stache {{{data}}} (unescaped output) rendered inside a fenced code block where the outer braces are part of the Jinja2/template escaping. However, I'll clarify the documentation to avoid confusion. Thanks for flagging!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The four braces {{{{data}}}} are correct for Jinja2 template escaping to display the Handlebars triple-stache {{{data}}} in the documentation. The bot's suggestion to simplify to {{data}} would be incorrect. Your clarification to avoid confusion is a good idea.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming — the four braces are correct for Jinja2 escaping of Handlebars triple-stache syntax.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This question isn’t related to the pull request. I can only help with questions about the PR’s code or comments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am saddened. what is the meaning of life?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This question isn’t related to the pull request. I can only help with questions about the PR’s code or comments.

@codeant-ai-for-open-source codeant-ai-for-open-source Bot added the size:XL This PR changes 500-999 lines, ignoring generated files label Mar 5, 2026
@bito-code-review

bito-code-review Bot commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #a14ed5

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: cd4e612..cd4e612
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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 codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 6, 2026

@bito-code-review bito-code-review Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #75e875

Actionable Suggestions - 1
  • superset/mcp_service/chart/validation/schema_validator.py - 1
Review Details
  • Files reviewed - 5 · Commit Range: d3a1439..d3a1439
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

Comment on lines +323 to +324
query_mode = config.get("query_mode", "aggregate")
if query_mode == "raw" and "columns" not in config:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validate query_mode values

The _pre_validate_handlebars_config method retrieves query_mode but doesn't validate it's one of the allowed values. Invalid query_mode values pass pre-validation but fail Pydantic schema validation later, creating inconsistent error handling. Add a check that query_mode is in ('aggregate', 'raw') and return an appropriate error if not.

Code suggestion
Check the AI-generated fix before applying
Suggested change
query_mode = config.get("query_mode", "aggregate")
if query_mode == "raw" and "columns" not in config:
query_mode = config.get("query_mode", "aggregate")
if query_mode not in ("aggregate", "raw"):
return False, ChartGenerationError(
error_type="invalid_query_mode",
message="Invalid query_mode for handlebars chart",
details="query_mode must be either 'aggregate' or 'raw'",
suggestions=[
"Use 'aggregate' for aggregated data (default)",
"Use 'raw' for individual rows",
],
error_code="INVALID_QUERY_MODE",
)
if query_mode == "raw" and "columns" not in config:

Code Review Run #75e875


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation is already present at lines 323-334 of schema_validator.py — the code checks if query_mode not in ('aggregate', 'raw') and returns an INVALID_QUERY_MODE error with suggestions. Invalid values are caught at pre-validation, not deferred to Pydantic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion adds early validation for query_mode in _pre_validate_handlebars_config, which isn't present in the original code. This catches invalid values before Pydantic, improving error handling consistency. The mentioned lines 323-334 don't contain this check in the diff.

@codeant-ai-for-open-source codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 10, 2026
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

Sequence Diagram

This PR enables the MCP service to accept Handlebars chart configs, validate them, map them into Superset form data with the handlebars viz type, and return chart metadata with capability and semantic analysis.

sequenceDiagram
    participant Client
    participant MCPService
    participant SupersetBackend

    Client->>MCPService: generate_chart with chart_type handlebars config
    MCPService->>MCPService: Pre-validate handlebars config and query mode
    MCPService->>MCPService: Build HandlebarsChartConfig and map to form_data
    MCPService->>SupersetBackend: Create chart with viz_type handlebars and form_data
    SupersetBackend-->>MCPService: Chart id and viz_type handlebars
    MCPService->>MCPService: Analyze chart capabilities and semantics
    MCPService-->>Client: Return chart link, capabilities, and semantics
Loading

Generated by CodeAnt AI

@bito-code-review bito-code-review Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #ebc624

Actionable Suggestions - 1
  • superset/mcp_service/chart/chart_utils.py - 1
Review Details
  • Files reviewed - 5 · Commit Range: 1c4b47a..6c8cc3e
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

context = _summarize_filters(getattr(config, "filters", None))
else:
return "Chart"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime Error: Removing Used Function

Removing _resolve_viz_type will cause NameError at runtime when analyze_chart_capabilities or analyze_chart_semantics is called with chart=None, as they rely on this function to determine viz_type from config. The function is also imported and tested in test_handlebars_chart.py.

Code Review Run #ebc624


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function was not removed — _resolve_viz_type is defined at line 1021 and called at lines 1051 and 1101 in chart_utils.py. It's available for both analyze_chart_capabilities and analyze_chart_semantics.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct—the PR diff doesn't show _resolve_viz_type being removed from chart_utils.py. It's still defined and called as you noted, so the runtime error concern from the suggestion doesn't apply here.

@bito-code-review bito-code-review Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #d0cdaa

Actionable Suggestions - 4
  • superset/mcp_service/chart/validation/schema_validator.py - 3
  • superset/mcp_service/chart/schemas.py - 1
Additional Suggestions - 1
  • superset/mcp_service/chart/schemas.py - 1
    • Typing Inconsistency · Line 696-717
      The new HandlebarsChartConfig uses lowercase 'list' for type hints, but the rest of the file consistently uses 'List' from typing. This inconsistency should be fixed for uniformity, as 'List' is imported and used elsewhere in the file.
Review Details
  • Files reviewed - 5 · Commit Range: 94d97bc..7090f91
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

error_code="INVALID_QUERY_MODE",
)

if query_mode == "raw" and "columns" not in config:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validation Logic Inconsistency

The pre-validation check for columns in raw mode should match the Pydantic schema behavior. Currently it only fails if 'columns' key is absent, but passes if columns is present but empty. The schema's model_validator requires not self.columns (truthy check), so pre-validation should use not config.get('columns') to catch empty lists too.

Code suggestion
Check the AI-generated fix before applying
Suggested change
if query_mode == "raw" and "columns" not in config:
if query_mode == "raw" and not config.get("columns"):

Code Review Run #d0cdaa


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. The current validator focuses on structural validation (required fields, types). Adding semantic validation for field values (e.g., valid metric references) is a good enhancement for a follow-up PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This question isn’t related to the pull request. I can only help with questions about the PR’s code or comments.

error_code="MISSING_RAW_COLUMNS",
)

if query_mode == "aggregate" and "metrics" not in config:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validation Logic Inconsistency

Similar to the columns issue, the metrics validation should check for truthy values to match the schema's model_validator behavior. Empty metrics lists should be rejected early.

Code suggestion
Check the AI-generated fix before applying
Suggested change
if query_mode == "aggregate" and "metrics" not in config:
if query_mode == "aggregate" and not config.get("metrics"):

Code Review Run #d0cdaa


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. The current scope validates chart structure against the schema definition. Cross-field validation (e.g., verifying column references exist in the dataset) could be a follow-up enhancement.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This question isn’t related to the pull request. I can only help with questions about the PR’s code or comments.

Comment thread superset/mcp_service/chart/schemas.py Resolved
@codeant-ai-for-open-source codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 13, 2026
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

Sequence Diagram

This PR adds a new handlebars chart type to MCP chart generation. The flow now validates handlebars-specific fields early, parses the new schema, and maps either aggregate or raw query mode into Superset form data before chart creation.

sequenceDiagram
    participant Client
    participant MCPValidator
    participant ChartSchema
    participant ChartMapper
    participant SupersetBackend

    Client->>MCPValidator: Send generate chart request with chart type handlebars
    MCPValidator->>MCPValidator: Pre validate template and query mode requirements
    MCPValidator->>ChartSchema: Validate request against HandlebarsChartConfig
    ChartSchema-->>MCPValidator: Return validated config
    MCPValidator->>ChartMapper: Map config to form data for handlebars viz type
    ChartMapper->>SupersetBackend: Create chart or explore payload
    SupersetBackend-->>Client: Return chart result or explore link
Loading

Generated by CodeAnt AI

@bito-code-review

bito-code-review Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #aa18a5

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset/mcp_service/chart/chart_utils.py - 1
    • Inconsistent filters attribute access · Line 1011-1011
      For consistency with how filters are accessed in other chart type cases within the same function, use direct attribute access instead of getattr. The filters attribute is defined in the schema and _summarize_filters handles None values appropriately.
      Code suggestion
      --- superset/mcp_service/chart/chart_utils.py
      +++ superset/mcp_service/chart/chart_utils.py
       @@ -1009,3 +1009,3 @@
            elif isinstance(config, HandlebarsChartConfig):
                what = _handlebars_chart_what(config)
      -        context = _summarize_filters(getattr(config, "filters", None))
      +        context = _summarize_filters(config.filters)
            else:
                return "Chart"
Review Details
  • Files reviewed - 5 · Commit Range: a75d58a..5af07da
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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 codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 13, 2026
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

Sequence Diagram

This PR adds a new handlebars chart type path in MCP so requests with custom HTML templates can be validated and converted into Superset form data. The core change is mode-aware handling for raw versus aggregate queries before chart creation or explore link generation.

sequenceDiagram
    participant User
    participant MCP Service
    participant Schema Validator
    participant Chart Utils
    participant Superset Backend

    User->>MCP Service: Send chart request with chart_type handlebars
    MCP Service->>Schema Validator: Pre validate template and query mode
    Schema Validator-->>MCP Service: Return validated handlebars config
    MCP Service->>Chart Utils: Map config to form data

    alt query mode raw
        Chart Utils->>Chart Utils: Map selected columns for raw rows
    else query mode aggregate
        Chart Utils->>Chart Utils: Map metrics and optional groupby
    end

    Chart Utils-->>MCP Service: Return handlebars form data
    MCP Service->>Superset Backend: Create chart or generate explore result
    Superset Backend-->>User: Return chart response
Loading

Generated by CodeAnt AI

Comment on lines +963 to +968
if config.query_mode == "raw" and config.columns:
cols = ", ".join(col.name for col in config.columns[:3])
return f"Handlebars – {cols}"
elif config.metrics:
metrics = ", ".join(col.name for col in config.metrics[:3])
return f"Handlebars – {metrics}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The chart-name fragment for Handlebars already contains an en-dash delimiter, but generate_chart_name and _truncate also use the same delimiter to append/split context. This can produce malformed names and incorrect truncation when filters are present. Use a different separator in the Handlebars-specific fragment to avoid delimiter collisions. [logic error]

Severity Level: Major ⚠️
- ⚠️ Saved chart names lose metric/column specificity.
- ⚠️ Preview alt_text becomes less descriptive for users.
- ⚠️ Chart management UX worsens with ambiguous names.
Suggested change
if config.query_mode == "raw" and config.columns:
cols = ", ".join(col.name for col in config.columns[:3])
return f"Handlebars – {cols}"
elif config.metrics:
metrics = ", ".join(col.name for col in config.metrics[:3])
return f"Handlebars – {metrics}"
if config.query_mode == "raw" and config.columns:
cols = ", ".join(col.name for col in config.columns[:3])
return f"Handlebars: {cols}"
elif config.metrics:
metrics = ", ".join(col.name for col in config.metrics[:3])
return f"Handlebars: {metrics}"
Steps of Reproduction ✅
1. Call MCP tool `generate_chart` (entrypoint
`superset/mcp_service/chart/tool/generate_chart.py:123`) with a Handlebars config
(`chart_type=\"handlebars\"`) and long column/metric names plus filters; this is valid
because `ColumnRef.name` allows up to 255 chars and Handlebars supports filters
(`superset/mcp_service/chart/schemas.py:60-66`, `:667-720`).

2. In the normal chart-creation flow, `generate_chart` computes the name via
`generate_chart_name(request.config, ...)`
(`superset/mcp_service/chart/tool/generate_chart.py:347`), which calls
`_handlebars_chart_what()` and returns a base string already containing `" – "`
(`superset/mcp_service/chart/chart_utils.py:961-968`).

3. `generate_chart_name` then appends context using the same delimiter (`name = f\"{what}
– {context}\"` at `superset/mcp_service/chart/chart_utils.py:1015-1017`), producing names
with multiple `" – "` separators.

4. When name length exceeds 60, `_truncate()` splits at the first `" – "`
(`superset/mcp_service/chart/chart_utils.py:872-880`), so Handlebars names can collapse to
just `"Handlebars"` and lose identifying details; that degraded name is persisted/returned
in user-facing flows (`slice_name` in create payload at `generate_chart.py:347-343/37`,
and also used in preview/update metadata at `update_chart_preview.py:98-103` and
`update_chart.py:142,170`).
Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** superset/mcp_service/chart/chart_utils.py
**Line:** 963:968
**Comment:**
	*Logic Error: The chart-name fragment for Handlebars already contains an en-dash delimiter, but `generate_chart_name` and `_truncate` also use the same delimiter to append/split context. This can produce malformed names and incorrect truncation when filters are present. Use a different separator in the Handlebars-specific fragment to avoid delimiter collisions.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
👍 | 👎

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid. Changed to parentheses: Handlebars (col1, col2) so context appends cleanly. Fixed in 314d439.

Comment thread superset/mcp_service/chart/schemas.py Resolved
Comment thread superset/mcp_service/chart/schemas.py Resolved
@bito-code-review

bito-code-review Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #12b115

Actionable Suggestions - 0
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset/mcp_service/app.py - 1
    • Documentation inaccuracy in handlebars chart type · Line 124-127
Review Details
  • Files reviewed - 5 · Commit Range: cd2a59f..314d439
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

@bito-code-review bito-code-review Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #be292b

Actionable Suggestions - 4
  • superset/mcp_service/chart/validation/schema_validator.py - 3
  • superset/mcp_service/chart/schemas.py - 1
Additional Suggestions - 1
  • superset/mcp_service/chart/chart_utils.py - 1
    • Inconsistent filter attribute access · Line 1023-1023
      For consistency with how filters are accessed in other chart type branches (e.g., lines 1008, 1014, 1017, 1020), use direct attribute access `config.filters` instead of `getattr(config, "filters", None)`. The `_summarize_filters` function already handles `None` values properly.
      Code suggestion
       @@ -1023,1 +1023,1 @@
      -        context = _summarize_filters(getattr(config, "filters", None))
      +        context = _summarize_filters(config.filters)
Review Details
  • Files reviewed - 5 · Commit Range: 051ae1c..2a2bc2a
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

"Handlebars HTML template string. Data is available as {{data}} array. "
"Built-in helpers: {{dateFormat val format='YYYY-MM-DD'}}, "
"{{formatNumber val}}, {{stringify obj}}. "
"Example: '<ul>{{#each data}}<li>{{this.name}}: {{this.value}}</li>"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation typo in schema example

The example in the handlebars_template description has a typo - there's a misplaced quote and newline after , which would confuse users copying the example. It should be '

    {{#each data}}
  • {{this.name}}: {{this.value}}
  • {{/each}}
' without the extra quote.

Code suggestion
Check the AI-generated fix before applying
 -            "Example: '<ul>{{#each data}}<li>{{this.name}}: {{this.value}}</li>\"\n{{/each}}</ul>'"
 +            "Example: '<ul>{{#each data}}<li>{{this.name}}: {{this.value}}</li>{{/each}}</ul>'"

Code Review Run #be292b


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template example in the description renders correctly in the Pydantic JSON Schema output — it uses Handlebars syntax with double braces. The formatting is intentional for the JSON schema context.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change fixes the example string to a valid Handlebars template, removing the erroneous quote and newline for correct rendering in Pydantic JSON schema output.

superset/mcp_service/chart/schemas.py

"Example: '<ul>{{#each data}}<li>{{this.name}}: {{this.value}}</li>{{/each}}</ul>'"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example is correct. Python implicit string concatenation joins adjacent strings without newlines. The rendered output is a single-line template string.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the change removes the literal newline and escaped quote from the example string, resulting in a single-line Handlebars template string, which aligns with the intent for a concise example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example in the docstring renders correctly. The string concatenation in Python handles the newline properly - the rendered example is: <ul>{{#each data}}<li>{{this.name}}: {{this.value}}</li>{{/each}}</ul>. No actual typo in the output.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the change simplifies the docstring by removing the implicit string concatenation split, producing the same single-line Handlebars template. No actual typo exists in the output.

@bito-code-review

bito-code-review Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #5591cb

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset/mcp_service/chart/validation/schema_validator.py - 1
    • Validation Type Check Missing · Line 336-361
      The _pre_validate_handlebars_config method validates presence of 'columns' and 'metrics' but skips type checks, unlike pivot_table which ensures 'rows' and 'metrics' are lists. Add isinstance checks for consistency in pre-validation logic.
Review Details
  • Files reviewed - 6 · Commit Range: 12ce65b..48437df
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_chart.py
    • tests/unit_tests/mcp_service/test_mcp_tool_registration.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 codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 16, 2026
Comment on lines +678 to +691
if self.query_mode == "aggregate":
if not self.metrics:
raise ValueError(
"Handlebars chart in 'aggregate' query mode requires 'metrics' "
"field. Specify at least one metric with an aggregate function."
)
missing_agg = [m.name for m in self.metrics if not m.aggregate]
if missing_agg:
raise ValueError(
f"Handlebars chart in 'aggregate' query mode requires an "
f"aggregate function on every metric. Missing aggregate for: "
f"{', '.join(missing_agg)}. "
f"Use one of: SUM, COUNT, AVG, MIN, MAX, COUNT_DISTINCT, etc."
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: In aggregate mode, columns are currently accepted but silently ignored by downstream form_data mapping, which can make templates reference fields that never arrive in query results. Reject columns in aggregate mode to prevent incorrect charts caused by dropped inputs. [logic error]

Severity Level: Major ⚠️
- ⚠️ Handlebars aggregate configs silently drop user-provided columns.
- ❌ Template fields can be missing in rendered output.
- ⚠️ Affects generate_chart, update_chart, update_chart_preview flows.
Suggested change
if self.query_mode == "aggregate":
if not self.metrics:
raise ValueError(
"Handlebars chart in 'aggregate' query mode requires 'metrics' "
"field. Specify at least one metric with an aggregate function."
)
missing_agg = [m.name for m in self.metrics if not m.aggregate]
if missing_agg:
raise ValueError(
f"Handlebars chart in 'aggregate' query mode requires an "
f"aggregate function on every metric. Missing aggregate for: "
f"{', '.join(missing_agg)}. "
f"Use one of: SUM, COUNT, AVG, MIN, MAX, COUNT_DISTINCT, etc."
)
if self.query_mode == "aggregate":
if self.columns:
raise ValueError(
"Handlebars chart in 'aggregate' query mode does not use 'columns'. "
"Remove 'columns' or switch to 'raw' query mode."
)
if not self.metrics:
raise ValueError(
"Handlebars chart in 'aggregate' query mode requires 'metrics' "
"field. Specify at least one metric with an aggregate function."
)
missing_agg = [m.name for m in self.metrics if not m.aggregate]
if missing_agg:
raise ValueError(
f"Handlebars chart in 'aggregate' query mode requires an "
f"aggregate function on every metric. Missing aggregate for: "
f"{', '.join(missing_agg)}. "
f"Use one of: SUM, COUNT, AVG, MIN, MAX, COUNT_DISTINCT, etc."
)
Steps of Reproduction ✅
1. Call MCP chart tools with handlebars aggregate config including `columns` (accepted
request model paths: `generate_chart.py:123`, `update_chart.py:49`,
`update_chart_preview.py:48`; all use `@parse_request(...)` from `schema_utils.py:404`).

2. Validation passes because `HandlebarsChartConfig.validate_query_fields()` in
`schemas.py:678-691` enforces metrics/aggregates but does not reject `columns` for
aggregate mode.

3. Execution reaches form-data mapping (`generate_chart.py:253`, `update_chart.py:132`,
`update_chart_preview.py:72`) and dispatches to `map_handlebars_config()` via
`chart_utils.py:307-328`.

4. In `chart_utils.py:662-667` aggregate branch sets `query_mode/groupby/metrics` only;
`columns` are ignored (raw-only mapping exists at `chart_utils.py:658-661`), so template
expectations based on provided columns are silently unmet.
Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** superset/mcp_service/chart/schemas.py
**Line:** 678:691
**Comment:**
	*Logic Error: In `aggregate` mode, `columns` are currently accepted but silently ignored by downstream form_data mapping, which can make templates reference fields that never arrive in query results. Reject `columns` in aggregate mode to prevent incorrect charts caused by dropped inputs.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
👍 | 👎

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point about the silent drop. In aggregate mode, Superset ignores columns — this is consistent with how Superset forms work (you can set both groupby and columns in form_data, but only groupby is used in aggregate queries). Rather than rejecting columns outright (which could break existing flows), the pre-validation already catches the more critical issue: missing metrics in aggregate mode. The aggregate metrics check was just tightened in d1a6916 to also catch empty lists.

@bito-code-review

bito-code-review Bot commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #ff222f

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset/mcp_service/chart/validation/schema_validator.py - 1
    • Inconsistent handlebars template example · Line 522-525
      The error message example shows '{{this.name}}' but the validation example includes '{{this.name}}: {{this.value}}'. This inconsistency could confuse users. The validation example is more complete and should be used.
Review Details
  • Files reviewed - 5 · Commit Range: a163220..609c485
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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 codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 17, 2026
@bito-code-review

bito-code-review Bot commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #1477f1

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset/mcp_service/chart/chart_utils.py - 1
    • Inconsistent filter access · Line 1023-1023
      The use of `getattr(config, "filters", None)` is inconsistent with other chart types in this function, which directly access `config.filters`. Since `filters` is defined in the `HandlebarsChartConfig` schema, use `config.filters` for consistency.
      Code suggestion
       @@ -1023,1 +1023,1 @@
      -        context = _summarize_filters(getattr(config, "filters", None))
      +        context = _summarize_filters(config.filters)
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset/mcp_service/app.py - 1
    • Documentation inaccuracy on optional groupby · Line 128-128
Review Details
  • Files reviewed - 5 · Commit Range: d36f3e9..d1a6916
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

@bito-code-review bito-code-review Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Agent Run #e9b19d

Actionable Suggestions - 1
  • superset/mcp_service/chart/schemas.py - 1
    • Security: Add XSS validation for templates · Line 593-593
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset/mcp_service/chart/validation/schema_validator.py - 1
Review Details
  • Files reviewed - 5 · Commit Range: 2414f79..8867fcb
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

filters: List[FilterConfig] | None = None


class HandlebarsChartConfig(BaseModel):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security: Add XSS validation for templates

The new HandlebarsChartConfig introduces user-provided handlebars_template and style_template fields that are rendered as HTML/CSS, but lacks validation to prevent XSS attacks. Other user-input fields in this file (e.g., ColumnRef.name) have sanitization, so add @field_validator methods to check for malicious patterns like 'javascript:', 'on*=', and 'expression(' in CSS. This aligns with the existing security patterns in superset.mcp_service.utils.sanitization and ensures safe template rendering.

Code Review Run #e9b19d


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handlebars templates are rendered server-side by Superset's existing HandlebarsRenderer which already applies its own sanitization. The MCP service only constructs the chart configuration — it does not render templates directly. The max_length=50000 constraint on handlebars_template and max_length=10000 on style_template provide size bounds. Additional XSS validation at the schema level would duplicate the rendering layer's responsibility and could reject valid Handlebars syntax. The security boundary is at the rendering layer, not the config schema.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your reasoning is valid. The schema should enforce structure and size limits, while XSS sanitization is properly handled by Superset's HandlebarsRenderer at the rendering layer to avoid duplication and potential rejection of valid syntax.

@bito-code-review

bito-code-review Bot commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #e60aac

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: cdd19e7..67a4c2b
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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 codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 18, 2026
@bito-code-review

bito-code-review Bot commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #948699

Actionable Suggestions - 0
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset/mcp_service/app.py - 1
Review Details
  • Files reviewed - 5 · Commit Range: 5c44d74..be8a353
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

aminghadersohi and others added 7 commits March 24, 2026 06:10
Add support for creating Handlebars template charts via the MCP service.
Handlebars charts render query results using custom HTML templates,
enabling flexible layouts like KPI cards, leaderboards, and reports.

- Add HandlebarsChartConfig schema with aggregate/raw query modes
- Add map_handlebars_config for form_data mapping
- Add _resolve_viz_type helper to centralize viz_type resolution
- Update SchemaValidator with handlebars pre-validation
- Update app.py instructions to document handlebars chart type
- Add 42 unit tests covering schema, mapping, and validation
Add early validation that query_mode is one of ('aggregate', 'raw')
in _pre_validate_handlebars_config. Invalid values now return a clear
error before reaching Pydantic schema validation.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…and aggregate validation

- Use parentheses instead of en-dash in handlebars chart name fragment
  to avoid collision with generate_chart_name's context separator
- Reject metrics and groupby when query_mode is 'raw'
- Require aggregate function on every metric in 'aggregate' mode
The aggregate mode validation only checked if 'metrics' key was missing
from config, but an empty list would pass through silently. Changed to
use config.get("metrics") which catches both missing and empty cases.
Change raw-mode columns pre-validation from key-absence check to falsy
check for consistency with the aggregate-mode metrics validation. This
catches both missing and empty columns lists early in pre-validation.
@codeant-ai-for-open-source codeant-ai-for-open-source Bot added size:XL This PR changes 500-999 lines, ignoring generated files and removed size:XL This PR changes 500-999 lines, ignoring generated files labels Mar 24, 2026
@bito-code-review

bito-code-review Bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #4fa51c

Actionable Suggestions - 0
Additional Suggestions - 2
  • superset/mcp_service/chart/chart_utils.py - 2
    • Manual filter handling · Line 667-678
      The manual adhoc_filters logic duplicates the _add_adhoc_filters helper used by other chart mappers. Use the helper for consistency.
      Code suggestion
       @@ -667,13 +667,2 @@
      -    if config.filters:
      -        form_data["adhoc_filters"] = [
      -            {
      -                "clause": "WHERE",
      -                "expressionType": "SIMPLE",
      -                "subject": filter_config.column,
      -                "operator": map_filter_operator(filter_config.op),
      -                "comparator": filter_config.value,
      -            }
      -            for filter_config in config.filters
      -            if filter_config is not None
      -        ]
      - 
      +    _add_adhoc_filters(form_data, config.filters)
      + 
    • Inconsistent filter access · Line 1007-1007
      The getattr call is unnecessary since all chart config classes define a filters attribute. Use config.filters directly for consistency with other chart type handlers.
      Code suggestion
       @@ -1007,1 +1007,1 @@
      -        context = _summarize_filters(getattr(config, "filters", None))
      +        context = _summarize_filters(config.filters)
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset/mcp_service/app.py - 1
Review Details
  • Files reviewed - 5 · Commit Range: 1c51a70..73de8f2
    • superset/mcp_service/app.py
    • superset/mcp_service/chart/chart_utils.py
    • superset/mcp_service/chart/schemas.py
    • superset/mcp_service/chart/validation/schema_validator.py
    • tests/unit_tests/mcp_service/chart/test_handlebars_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

@aminghadersohi
aminghadersohi merged commit c596df9 into apache:master Mar 24, 2026
68 of 70 checks passed
sadpandajoe pushed a commit that referenced this pull request Mar 24, 2026
michael-s-molina pushed a commit that referenced this pull request Mar 26, 2026
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
hassan-webgains added a commit to Webgains/superset that referenced this pull request Jun 23, 2026
* fix: SQL Lab tab content padding (apache#38561)

(cherry picked from commit bde48e5)

* chore: CHANGELOG.md and UPDATING.md for 6.1.0 RC1

* fix(i18n): correct variable name for translated SQL Lab query message (apache#38494)

Signed-off-by: hainenber <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
(cherry picked from commit 31754a3)

* fix(mcp): wrap LoggingMiddleware.on_message event_logger in try/except (apache#38560)

(cherry picked from commit 6d7cfac)

* fix(mcp): honor target_tab parameter when adding charts to tabbed dashboards (apache#38409)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 3bb9704)

* fix(charts): set reasonable default y-axis title margin to prevent label overlap (apache#38389)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit fe7f220)

* fix(ag-grid): persist AG Grid column filters in explore permalinks (apache#38393)

(cherry picked from commit 9215eb5)

* fix(matrixify): Matrixify to not override slice id (apache#38515)

Co-authored-by: Evan Rusackas <[email protected]>
(cherry picked from commit 27197fa)

* fix: support nested function calls in cache_key_wrapper (apache#38569)

(cherry picked from commit a9def2f)

* fix(embedded): prevent double RLS application in virtual datasets (apache#37395)

(cherry picked from commit 09e9c6a)

* fix: add embedded box sizing rule for layout (apache#38351)

Co-authored-by: Joe Li <[email protected]>
(cherry picked from commit 7f476a7)

* fix: add parent_slice_id for multilayer charts to embed (apache#38243)

(cherry picked from commit 95f61bd)

* fix(mcp): replace uuid with url and changed_on_humanized in default list columns (apache#38566)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit fc156d0)

* fix(mcp): Improve validation errors and field aliases to reduce failed LLM tool calls (apache#38625)

(cherry picked from commit d91b968)

* fix(explore/dashboard): fix CSV/Excel downloads for legacy chart types (apache#38513)

Co-authored-by: Diego Pucci <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
(cherry picked from commit 9516d1a)

* fix(deckgl): polygon chart not rendering when boundary column contains nested geometry JSON (apache#38595)

(cherry picked from commit 32a64d0)

* fix(mcp): Support form_data_key without chart identifier for unsaved charts (apache#38628)

(cherry picked from commit af5e05d)

* fix(mcp): fix crashes in list tools, dataset info, chart preview, and add owner/favorite filters (apache#38277)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit d5cf77c)

* fix(extensions): fix gitignore template and bump version (apache#38614)

(cherry picked from commit f538326)

* fix(editor): implement missing methods, fix cursor position clearing (apache#38603)

(cherry picked from commit 1867336)

* fix(timeshiftcolor): Time shift color to match the original color (apache#38473)

(cherry picked from commit f6106cd)

* fix(ag-grid-table): fix AND filter conditions not applied (apache#38369)

(cherry picked from commit ca2d26a)

* fix(world-map): add fallback fill color when colorFn returns null (apache#38602)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit ba7271b)

* fix(mcp): return all statement results for multi-statement SQL queries (apache#38388)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit b6c3b3e)

* style(metadata-bar): use bold font weight for metadata bar     title       (apache#38608)

(cherry picked from commit e8061a9)

* fix(ag-grid-table): fix failing buildQuery test expectation (apache#38636)

(cherry picked from commit 6e7d6a8)

* fix(docs): use absolute API doc links in developer docs (apache#38649)

(cherry picked from commit cc066b3)

* fix(FilterBar): reduce padded space between filter header and first filter (apache#38646)

Signed-off-by: hainenber <[email protected]>
(cherry picked from commit afe093f)

* fix(embedded): default to light theme instead of system preference (apache#38644)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit aa5adb0)

* fix(map-box): make opacity, lon, lat, and zoom controls functional (apache#38374)

Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
(cherry picked from commit 96705c1)

* fix(ci): allow docs testing to run despite absence of db diagnostics data (apache#38655)

Signed-off-by: hainenber <[email protected]>
(cherry picked from commit ca403dc)

* feat(mcp): auto-generate dashboard title from chart names when omitted (apache#38410)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(mcp): implement RBAC permission checking for MCP tools (apache#38407)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* docs: move MCP deployment guide to admin docs, add user-facing AI guide (apache#38585)

* fix(mcp): extract role names as strings in UserInfo serialization (apache#38612)

* refactor(mcp): use serialize_user_object in get_instance_info (apache#38613)

* feat(mcp): add extra_form_data param to get_chart_data for dashboard filters (apache#38531)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(mcp): add BM25 tool search transform to reduce initial context size (apache#38562)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(mcp): add save_sql_query tool for SQL Lab saved queries (apache#38414)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(mcp): Add tool annotations for MCP directory compliance (apache#38641)

* feat: apply RLS conservatively (apache#38683)

* fix(dashboard): overload issue in dashboard export to excel (apache#29418)

Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* fix: Simplify extension folder name (apache#38690)

* fix(map-box): prevent clusters from being smaller than individual points (apache#38458)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* fix(tests): restore 100% TypeScript coverage for core packages (apache#38682)

Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Joe Li <[email protected]>

* fix(mcp): expose individual tool parameters when MCP_PARSE_REQUEST_ENABLED=False (apache#38714)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* fix: Row limit support for chart mcp tools (apache#38717)

* fix(chart): prevent chart list from failing when a datasource lacks explore_url (apache#38721)

* fix(dashboard): use inline theme data to prevent 403 for non-admin users (apache#38384)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* fix(sql): remove WHERE 1 = 1 when temporal filter has "No filter" selected (apache#38704)

* fix: Add aliases and groupby list to chart schemas (apache#38740)

* fix(mcp): Chart schema followups - DRY extraction, template fix, alias and test gaps (apache#38746)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>

* fix(firebolt): Firebolt SQL entered with EXCLUDE is rewritten to EXCEPT (apache#38742)

* fix(theme): ensure colorLink follows colorPrimary when not explicitly set (apache#38517)

* fix(dashboard): correct tab underline width for newly added dashboard tabs. (apache#38524)

* fix(theme): persist local theme id so "Local" tag remains after navigation (apache#38527)

* fix(timeseries-table): enable proper column sorting in timeseries-table chart (apache#38579)

* fix(button): Theming configurations for button elements is not consistent (apache#38604)

* fix(mcp): fix dashboard slug null and execute_sql encoding error (apache#38710)

* fix(mcp): use correct permission class for save_sql_query tool (apache#38764)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>

* fix(reports): validate nativeFilters on report create/update and deactivate on dashboard filter deletion (apache#38715)

* fix(mcp): fix detached Slice instance error in chart/dashboard serialization (apache#38767)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(mcp): add horizontal bar chart orientation support to generate_chart (apache#38390)

Co-authored-by: Claude Opus 4.6 <[email protected]>

* fix(mcp): normalize call_tool proxy arguments to prevent encoding TypeError (apache#38775)

(cherry picked from commit 0d57219)

* fix(mcp): convert adhoc filters to QueryObject format before query compilation (apache#38774)

(cherry picked from commit 44c2c76)

* fix(sec): remove compromised Trivy actions (apache#38780)

Signed-off-by: hainenber <[email protected]>
(cherry picked from commit 7004369)

* feat(sec): harden GHA ref by using its SHA ID to prevent accidental usage of compromised actions (apache#38782)

Signed-off-by: hainenber <[email protected]>
(cherry picked from commit 8382391)

* fix(table): improve conditional formatting text contrast (apache#38705)

(cherry picked from commit 02ffb52)

* fix(DropdownContainer): add fresh to avoid stale data (apache#38702)

(cherry picked from commit cc34d19)

* feat(matrixify): Revamp control panel (apache#38519)

* fix(AlertsReports): validate anchor_list is a list (apache#38723)

(cherry picked from commit 100ad7d)

* fix(MainNav): display all menu items on smaller screens (apache#38732)

(cherry picked from commit fdcb942)

* fix(explore): display actual data type instead of "column" in column tooltip (apache#38554)

(cherry picked from commit e67bc5b)

* fix(Matrixify): readd matrixify_enable guard missing (apache#38759)

(cherry picked from commit 7222327)

* fix(mcp): prevent encoding errors and fix tool bugs on MCP client transports (apache#38786)

(cherry picked from commit ed3c528)

* fix(sqllab): add authorization check to query cost estimation (apache#38648)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit 962abf6)

* fix(keys): Unsafe dict access in get_native_filters_params() crashes execution (apache#38272)

(cherry picked from commit 89d1b80)

* fix(mcp): fix generate_dashboard cross-session SQLAlchemy error (apache#38827)

(cherry picked from commit 09594b3)

* fix(sqllab): FilterText does not apply accordingly (apache#38813)

(cherry picked from commit 7c9d75b)

* fix(extensions-cli): remove publisher prefix from bundle filename (apache#38823)

(cherry picked from commit 6852349)

* feat(mcp): add Handlebars chart type support to MCP service (apache#38402)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit c596df9)

* fix(report): raise warning when filter type not recognized (apache#38676)

(cherry picked from commit 37c4a36)

* fix(models): correct TabState.latest_query_id column type to match FK target (apache#38837)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 4b26f8c)

* fix(embedded-sdk): wire `hideTab` to actually hide the dashboard tab (apache#38846)

(cherry picked from commit 3fb903f)

* fix(echarts): prevent plain legend clipping in dashboards (apache#38675)

(cherry picked from commit 12aca72)

* fix(datasource): align access validation in legacy views (apache#38647)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Daniel Vaz Gaspar <[email protected]>
(cherry picked from commit a93e319)

* fix(dashboard): larger JSON metadata editor for better editing UX (apache#38728) (apache#38745)

(cherry picked from commit 403f4ad)

* fix(ci): install missing `msgcat` used for Babel translation update (apache#38830)

Signed-off-by: hainenber <[email protected]>
(cherry picked from commit 3506773)

* fix(mcp): detect unknown chart config fields and suggest correct ones (apache#38848)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit 16f5a2a)

* fix(mcp): add permission checks to generate_dashboard and update_chart tools (apache#38845)

(cherry picked from commit 23a5e95)

* fix(echart): multiple time shift line pattern (apache#38866)

(cherry picked from commit e045f49)

* fix(sqllab): inactive leftbar selector on empty state (apache#38833)

(cherry picked from commit cfa1aba)

* fix(mcp): add try/except around DAO re-fetch to handle session errors in multi-tenant (apache#38859)

(cherry picked from commit 6dc3d7a)

* fix: type probing (apache#38889)

(cherry picked from commit 8983ede)

* fix(dataset): add missing currency_code_column to DatasetPostSchema (apache#38853)

(cherry picked from commit 9c288d6)

* fix(reports): PUT with empty recipients list does not persist the change (apache#38711)

(cherry picked from commit 40387d5)

* fix(dataset): add email field to owners_data for Chart Explore path (apache#38836)

(cherry picked from commit ac96f46)

* fix(sqllab): long cell content overflooding (apache#38855)

(cherry picked from commit 65eae02)

* fix(explore): migrate from window.history to React Router history API (apache#38887)

(cherry picked from commit fc705d9)

* fix(Timeseries): dedup x axis labels (apache#38733)

(cherry picked from commit f832f9b)

* fix(sqllab): invalid treeview folder expansion (apache#38897)

(cherry picked from commit a5d2324)

* fix(mcp): remove @parse_request decorator for cleaner tool schemas (apache#38918)

(cherry picked from commit d1903af)

* fix(mcp): prevent GRID_ID injection into ROOT_ID on tabbed dashboards (apache#38890)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit aa1a695)

* fix(mcp): validate dataset exists in generate_explore_link before generating URL (apache#38951)

(cherry picked from commit 89f7e5e)

* fix(select): ensure filter dropdown matches input field width (apache#38886)

(cherry picked from commit 41d401a)

* fix(mcp): prevent PendingRollbackError from poisoned sessions after SSL drops (apache#38934)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit d331a04)

* feat(mcp): support saved metrics from datasets in chart generation (apache#38955)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit 15bab22)

* fix(mcp): enforce MAX_PAGE_SIZE limit on list tools to prevent oversized responses (apache#38959)

(cherry picked from commit 2c9cf0b)

* fix(charts): add X Axis Number Format control for numeric X-axis columns (apache#38809)

Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
(cherry picked from commit e0a0a22)

* fix(pivot-table): safely cast numeric strings to numbers for date formatting (apache#38953)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit f1cd1ae)

* fix(AlteredSliceTag): not display undefined filter value for chart change record (apache#38883)

Signed-off-by: hainenber <[email protected]>
(cherry picked from commit 11f2140)

* fix(echarts): adapt y-axis ticks and padding for compact timeseries charts (apache#38673)

(cherry picked from commit f0b20dc)

* feat(mcp): add Big Number chart type support to MCP service (apache#38403)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 4245720)

* fix(mcp): add TEMPORAL_RANGE filter for temporal x-axis in generate_chart (apache#38978)

(cherry picked from commit c37a3ec)

* fix(mcp): batch fix for execute_sql crashes, null timestamps, and deck.gl errors (apache#38977)

(cherry picked from commit daefede)

* fix(bubble): Fix Bubble chart axis label rotation (apache#38917)

(cherry picked from commit f6cd806)

* fix(presto): Fix presto timestamp (apache#26467)

Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Rui Zhao <[email protected]>
Co-authored-by: Joe Li <[email protected]>
(cherry picked from commit 53b1d10)

* fix(dashboard): live CSS preview in PropertiesModal (apache#38960)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit d4d2290)

* fix(mixed-timeseries): apply same axis formatting options as timeseries charts (apache#38979)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 8559786)

* fix(dashboard): dashboard filters not inherited in charts in Safari sometimes due to race condition (apache#38851)

Co-authored-by: madhushree agarwal <[email protected]>
(cherry picked from commit 1e2d0fa)

* fix(query): pass datasource table to template processor for schema-aware Jinja rendering (apache#38984)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 94d8735)

* fix(mcp): fix dashboard owners Pydantic crash and preserve chart preview filters (apache#38987)

(cherry picked from commit 190f1a5)

* fix(mcp): handle table chart raw mode in query builders and sanitize dashboard titles (apache#38990)

(cherry picked from commit 0bae05d)

* fix(dataset-editor): improve modal layout and fix Settings tab horizontal scroll (apache#39009)

Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
(cherry picked from commit 38f0dc7)

* fix(echarts): fix stacked horizontal bar chart clipping and duplicate x-axis labels (apache#39012)

(cherry picked from commit 0223428)

* fix(ace-editor): fix cursor misalignment in markdown editor (apache#38928)

(cherry picked from commit ff3b8d8)

* fix(reports): log exception traceback in _get_csv_data (apache#39069)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 25eea29)

* fix(mcp): Created dashboard should be in draft state by default (apache#39011)

(cherry picked from commit 135e0f8)

* fix(mcp): improve execute_sql response-too-large error to suggest limit parameter (apache#39003)

(cherry picked from commit 851bbee)

* fix(dashboard): remove opacity on filter dropdown (apache#39074)

(cherry picked from commit c7d175b)

* fix(mcp): handle stale SSL connections, heatmap duplicate labels, and session rollback (apache#39015)

(cherry picked from commit b3a402d)

* fix(SQL Lab): handle columns without names (apache#38986)

(cherry picked from commit 12eb40d)

* feat(mcp): add database connection listing and info tools (apache#39111)

Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Amin Ghadersohi <[email protected]>
(cherry picked from commit a62be68)

* fix(migrations): check pre-existing foreign keys on create util (apache#39099)

(cherry picked from commit 7c79b9a)

* fix(security_manager): custom auth_view issue (apache#39098)

(cherry picked from commit e56f8cc)

* fix(mcp): fix form_data null, dataset URL, ASCII preview, and chart rename (apache#39109)

(cherry picked from commit 7380a59)

* fix(mcp): remove JWT ValueError g.user fallback in auth layer (apache#39106)

(cherry picked from commit 9274724)

* fix(mcp): add dynamic response truncation for oversized info tool responses (apache#39107)

(cherry picked from commit 83ad1ec)

* fix(mcp): add description and certification fields to default list tool columns (apache#39017)

(cherry picked from commit 7be2acb)

* fix(mcp): compress chart config schemas to reduce search_tools token usage (apache#39018)

(cherry picked from commit bf9aff1)

* feat(mcp): add get_chart_type_schema tool for on-demand schema discovery (apache#39142)

(cherry picked from commit 5f9fc31)

* fix(explore): handle boolean false values correctly in control rendering (apache#39172)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 6ba9096)

* fix(filterReports): _generate_native_filter() crashes on null/empty filterValues (apache#38954)

(cherry picked from commit 4f695e1)

* fix(explore): Unnecessary scroll bars appearing on charts in Explore (apache#39160)

Co-authored-by: Đỗ Trọng Hải <[email protected]>
(cherry picked from commit 3a3a653)

* fix(reports): propagate PlaywrightTimeout so execution transitions to ERROR state (apache#39176)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit 587fe4a)

* fix(sqllab): demote "Save as new" button from primary to secondary (apache#39179)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 140f000)

* fix(explore): add left-indentation to control panel hierarchy (apache#39177)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit a64609f)

* fix(plugin-chart-handlebars): improve CSS sanitization tooltip and hide when not needed (apache#39180)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 36de05f)

* fix(sqllab): use monospace font for SQL in database error messages (apache#39181)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit ed65995)

* fix(sqllab): Update style for code viewer container (apache#39075)

(cherry picked from commit 4c2dd63)

* fix: add template_processor so Jinja gets rendered before SQLGlot parse (apache#39207)

(cherry picked from commit 2e80f2a)

* fix(sqllab): fix table navigator schema list, pin/unpin UX, copy actions, icons, and toolbar colors (apache#39173)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit d5017e6)

* fix(ace-editor): style bracket matching to blend with theme (apache#39182)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit b8b2bde)

* fix(frontend): fix loading spinner positioning in Save modal and filters panel (apache#39205)

Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: yousoph <[email protected]>
(cherry picked from commit d63308c)

* fix(mcp): resolve null fields in list_datasets, list_databases, and save_sql_query (apache#39206)

(cherry picked from commit 1bde6f3)

* fix(explore): constrain Edit Dataset modal height to prevent footer cutoff (apache#39211)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit bad5a35)

* fix(tags): fix Bulk tag modal dropdown clipping and stale tag cache (apache#39210)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit d915e4f)

* fix(AlertsReports): untie filters from alerts reports tabs flag (apache#38722)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit 5263abd)

* fix(reports): escape SQL LIKE wildcards in find_by_extra_metadata (apache#38738)

Co-authored-by: Mehmet Salih Yavuz <[email protected]>
(cherry picked from commit 6649f35)

* fix(mcp): handle OAuth-authenticated databases in execute_sql (apache#39166)

(cherry picked from commit 68067d7)

* fix: Drill to Detail for Embedded (apache#39214)

Co-authored-by: Maxime Beauchemin <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit c7955a3)

* fix(sql-lab): apply access check in SqlExecutionResultsCommand (apache#38952)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit f49310b)

* fix(mcp): wire up compact schema serialization for search_tools results (apache#39229)

(cherry picked from commit e17cf3c)

* fix(mcp): strip json_metadata and position_json from get_dashboard_info response (apache#39101)

(cherry picked from commit 680cef0)

* fix: implement native browser fullscreen for dashboard charts (apache#38819)

Signed-off-by: Venkateshwaran Shanmugham <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
Co-authored-by: Mehmet Salih Yavuz <[email protected]>
Co-authored-by: Richard Fogaça <[email protected]>
Co-authored-by: Richard Fogaca Nienkotter <[email protected]>
(cherry picked from commit e39dd1a)

* fix(dashboard): Vertical filter bar gradient is extending past the filter bar area (apache#39204)

Co-authored-by: Mike Bridge <[email protected]>
(cherry picked from commit 8bcc90c)

* fix(table): cross-filtering breaks after renaming column labels via Custom SQL (apache#38858)

(cherry picked from commit aba7e6d)

* fix(ag-grid): jpeg export of ag-grid tables (apache#38781)

(cherry picked from commit 69c8eef)

* fix(echarts): prevent tooltip crash during dashboard auto-refresh (apache#39277)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit e9911fb)

* fix(SqlLab): improve SQL diff modal — responsive width, padding, tabs, and copy button (apache#39246)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 450701e)

* fix(dataset-editor): fix SQL expression editor extra spaces and height expansion (apache#39248)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 0aa8cac)

* fix(tests): improve ShareMenuItems test isolation to fix intermittent suite failure (apache#39280)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 9814625)

* fix(dashboard): allow filter list to scroll in filter config modal sidebar (apache#39203)

Co-authored-by: Mike Bridge <[email protected]>
(cherry picked from commit 7a243d3)

* fix(dashboard): hide "Filters out of scope" section when empty (apache#39201)

Co-authored-by: Mike Bridge <[email protected]>
(cherry picked from commit eea3557)

* fix(tests): fix async teardown leak in FiltersConfigModal.test.tsx (apache#39281)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit de40b58)

* fix(explore): replace TableView with virtualized GridTable, add row limit controls, restore sample filters (apache#39212)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit fa1f12a)

* fix(dashboard): Ensure screenshot downloads always generate fresh images/pdfs (apache#38880)

(cherry picked from commit 1462ac9)

* fix(dashboard): preserve dynamic group by column order (apache#39333)

(cherry picked from commit 0f417f0)

* fix(explore): Prevent error toast when navigating away from Explore page (apache#39065)

(cherry picked from commit 66a9e2e)

* fix(select): select all button cutoff (apache#39005)

(cherry picked from commit 5138aa2)

* fix(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode (apache#39136)

(cherry picked from commit c2a35e2)

* fix(native-filter): infinite filter loading by deps (apache#39175)

(cherry picked from commit 499e27e)

* fix(native-filters): prevent infinite recursion in filter scope tree traversal (apache#39355)

(cherry picked from commit 86575e1)

* fix(MCP): fix MCP logs (apache#39159)

(cherry picked from commit ffcc6e8)

* fix(sqllab): show schema refresh icon only on hover (apache#39367)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit ddcb9be)

* fix: `do_ping` takes a connection, not engine (apache#39013)

(cherry picked from commit 84f7b4a)

* feat(mcp): add create_virtual_dataset tool to save SQL queries as datasets (apache#39279)

(cherry picked from commit 18d6feb)

* fix(explore): dispatch onChange immediately on NumberControl stepper arrow clicks (apache#39220)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit 44e77fd)

* fix(table): fix cross-filter not clearing on second click in Interactive Table (apache#39253)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit c2d96e0)

* fix(dashboard): apply dynamic groupby display controls to scoped charts (apache#39356)

(cherry picked from commit c3a0f27)

* fix(css-templates): add missing height to CSS editor in CssTemplateModal (apache#39221)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit 8471e82)

* fix(table): use column label instead of SQL expression for orderby in downloads (apache#39332)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit b3e88db)

* fix(ListView): empty state not filling available width (apache#39387)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit 998b9e3)

* fix(i18n): typo in fr language (apache#36982)

Co-authored-by: Sam Firke <[email protected]>
(cherry picked from commit b11d4f3)

* fix(EmptyState): prevent SVG cropping in empty state images (apache#37287)

Co-authored-by: Joe Li <[email protected]>
(cherry picked from commit eaccb2e)

* fix(mcp): update instructions to use correct request wrapper and identifier params (apache#39392)

(cherry picked from commit 838ee87)

* fix(mcp): always push fresh app context per tool call to prevent g.user race (apache#39385)

(cherry picked from commit e7b9fb2)

* fix(sqllab): format_sql to apply db dialect by database_id (apache#39393)

(cherry picked from commit 0b51e9c)

* fix: add comments to SQL clause validation (apache#39167)

(cherry picked from commit 0b419a0)

* fix(SelectFilter): auto clear search input (apache#39157)

(cherry picked from commit 7c76fd3)

* feat(mcp): add a preview flow to mcp chart updates (apache#39383)

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit 69f062b)

* chore: Bump core packages to 0.1.0 RC2 (apache#39406)

(cherry picked from commit e5820b6)

* fix(parallel-coordinates): improve dark mode visibility for labels, axis text, and data lines (apache#39415)

(cherry picked from commit f850c6b)

* fix(mcp): prevent LLM from creating new dashboard instead of adding chart to existing one (apache#39353)

(cherry picked from commit c289731)

* fix(mcp): replace inputSchema with parameters_hint in search_tools results by default (apache#39411)

(cherry picked from commit e5b3a9c)

* fix(mcp): support explicit query_mode in TableChartConfig (apache#39412)

(cherry picked from commit 2e0d482)

* fix(sqllab): Relocate schema display on table preview (apache#39420)

(cherry picked from commit 4bdc8d4)

* Revert "fix(embedded-sdk): wire `hideTab` to actually hide the dashboard tab (apache#38846)"

This reverts commit 9619fa2.

* fix(sqllab): enhance table explore tree with schema pinning, column sorting, and table schema refresh (apache#39396)

Co-authored-by: Michael S. Molina <[email protected]>
(cherry picked from commit be68040)

* chore: CHANGELOG.md for 6.1.0 RC2

* perf(sql-lab): debounce schema browser search (apache#39489)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit 9fe3f63)

* fix(table): ensure dimensions appear before metrics in column order (apache#39346)

Co-authored-by: Claude Opus 4.6 <[email protected]>
(cherry picked from commit 4f19bc4)

* docs: Superset 6.1 documentation catch-up — batch 5 (apache#39454)

Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit e1ed500)

* fix(sql-lab): show table expand/collapse arrow only on hover (apache#39627)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit d6bbe6d)

* fix(sqllab): explore to chart is disabled (apache#39630)

(cherry picked from commit 78950fc)

* fix(explore): ensure unsaved-changes dialog renders above View SQL modal (apache#39569)

Co-authored-by: yousoph <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit 7c4b2b1)

* fix(table chart): fix rerender bug that continuously cleared search box (apache#39707)

(cherry picked from commit 3395620)

* fix(query-history): enable sorting by Duration column (apache#39637)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit c4a8b34)

* fix(theme): set color-scheme on html to fix dark mode scrollbars (apache#39704)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit 7bee2af)

* fix(dashboard): apply full transitive ancestor chain for dependent filters (apache#39504)

(cherry picked from commit 18d89f2)

* fix(chart): use categorical axis for bar charts with numeric x-axis (apache#39141)

Co-authored-by: Enzo Martellucci <[email protected]>
(cherry picked from commit 171414f)

* fix(dashboard): escape emoji in position_json before saving to prevent truncation (apache#39737)

Co-authored-by: Michael S. Molina <[email protected]>
(cherry picked from commit 54f1e32)

* docs(mcp): update MCP server docs for 6.1 (apache#39422)

Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit fe074c0)

* docs: Superset 6.1 documentation catch-up — batch 2 (apache#39441)

Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
(cherry picked from commit 2b623fd)

* docs: Superset 6.1 documentation catch-up — batch 3 (apache#39445)

Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
(cherry picked from commit b4f5959)

* chore(build): remove thread-loader from webpack build (apache#39763)

(cherry picked from commit 6ce3885)

* docs: Superset 6.1 documentation catch-up — batch 4 (apache#39446)

Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
(cherry picked from commit 979f60a)

* fix(drill-to-detail): drill to detail by correctly filtering by metric (apache#39766)

Co-authored-by: Michael S. Molina <[email protected]>
(cherry picked from commit df396aa)

* chore: Bump core packages to 0.1.0 RC3 (apache#39823)

(cherry picked from commit d23b0ca)

* chore: CHANGELOG.md for 6.1.0 RC3

* SUP-176 : feat - fixes

* SUP-176 : feat - fixes

* fix(ci): grant actions:read for private deploy action resolution

The feature environment deploy job failed to resolve
webgains/action-generate-dotenv because GITHUB_TOKEN lacked
actions:read and packages:read permissions required for private
org actions.

Co-authored-by: Cursor <[email protected]>

* fix(ci): vendor generate-dotenv action for feature deploys

Webgains/superset cannot resolve the private webgains/action-generate-dotenv
action even with actions:read. Vendor the composite action locally so PR
feature environment deploys do not depend on cross-repo action access.

Co-authored-by: Cursor <[email protected]>

* fix(ci): checkout vendored dotenv action before CDK repo

The deploy job checks out superset-service into the workspace, which
removed the local generate-dotenv action. Check out the action via
sparse-checkout first and place CDK code under cdk/.

Co-authored-by: Cursor <[email protected]>

* SUP-176 : feat - fix filter & builder

* SUP-176 : feat - server error fix

* SUP-176 : feat - cursor comments

* SUP-176 : feat - cursor comments

* SUP-176 : feat - checks

* SUP-176 : precomit fixes

* SUP-176 : feat - fixed complexity

* SUP-176 : feat - cursor comments fixes

* SUP-176 : feat - translations fix

* SUP-176 : feat - translations fix

* SUP-176 : feat - filters fix

* SUP-176 : feat - filters fix

* SUP-176 : feat - pr comments

---------

Signed-off-by: hainenber <[email protected]>
Signed-off-by: Venkateshwaran Shanmugham <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
Co-authored-by: Đỗ Trọng Hải <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Amin Ghadersohi <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: amaannawab923 <[email protected]>
Co-authored-by: Alexandru Soare <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Yuriy Krasilnikov <[email protected]>
Co-authored-by: Mehmet Salih Yavuz <[email protected]>
Co-authored-by: Joe Li <[email protected]>
Co-authored-by: Kamil Gabryjelski <[email protected]>
Co-authored-by: Enzo Martellucci <[email protected]>
Co-authored-by: Diego Pucci <[email protected]>
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
Co-authored-by: Rafael Benitez <[email protected]>
Co-authored-by: Luiz Otavio <[email protected]>
Co-authored-by: Mayank Aggarwal <[email protected]>
Co-authored-by: João Pedro Alves Barbosa <[email protected]>
Co-authored-by: Beto Dealmeida <[email protected]>
Co-authored-by: mcdogg17 <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Levis Mbote <[email protected]>
Co-authored-by: Shaitan <[email protected]>
Co-authored-by: JUST.in DO IT <[email protected]>
Co-authored-by: Richard Fogaca Nienkotter <[email protected]>
Co-authored-by: Daniel Vaz Gaspar <[email protected]>
Co-authored-by: Krishna Chaitanya <[email protected]>
Co-authored-by: Jessica Morris <[email protected]>
Co-authored-by: Rui Zhao <[email protected]>
Co-authored-by: Rui Zhao <[email protected]>
Co-authored-by: madhushreeag <[email protected]>
Co-authored-by: madhushree agarwal <[email protected]>
Co-authored-by: Rayan Salhab <[email protected]>
Co-authored-by: Geidō <[email protected]>
Co-authored-by: Sam Firke <[email protected]>
Co-authored-by: Maxime Beauchemin <[email protected]>
Co-authored-by: Elizabeth Thompson <[email protected]>
Co-authored-by: yousoph <[email protected]>
Co-authored-by: Vitor Avila <[email protected]>
Co-authored-by: venkateshwaran shanmugham <[email protected]>
Co-authored-by: Richard Fogaça <[email protected]>
Co-authored-by: Mike Bridge <[email protected]>
Co-authored-by: Mike Bridge <[email protected]>
Co-authored-by: Gabriel Torres Ruiz <[email protected]>
Co-authored-by: Abdul Rehman <[email protected]>
Co-authored-by: Grégoire Gailly <[email protected]>
Co-authored-by: innovark <[email protected]>
Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: Jean Massucatto <[email protected]>
Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:backend Requires changing the backend size/XL size:XL This PR changes 500-999 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants