Amin Ghadersohi
06276e76c5
fix(mcp): resolve ruff E501 and formatting issues to pass pre-commit
...
- Split long string literal in schema_validator.py line 202 (E501, 94 > 88 chars)
- Apply ruff format auto-fixes to big_number.py, handlebars.py, and test_get_chart_data.py
2026-05-20 21:20:08 +00:00
Amin Ghadersohi
eb2e6bd48e
refactor(mcp): complete plugin protocol — registry bootstrap, mypy fixes, test repairs
...
On top of the dead-code elimination in the previous commit:
- Add lazy _ensure_plugins_loaded() bootstrap to ChartTypeRegistry so the
registry is populated even without importing app.py (fixes isolated test runs)
- Delegate _RegistryProxy methods to module-level functions so bootstrap runs
- Guard register() against empty chart_type strings
- Add generate_name + resolve_viz_type to ChartTypePlugin Protocol and
BaseChartPlugin; delegate generate_chart_name/_resolve_viz_type in
chart_utils to the plugin registry
- Add _with_context static helper to BaseChartPlugin (shared by all plugins)
- Fix stale 'five methods' → 'eight methods' docstring in plugin.py
- Add TypeVar _C to normalize_column_names so mypy infers correct return type
- Fix broken tests: update _pre_validate_big_number_config → _pre_validate_chart_type,
remove deleted TestNormalizeXYConfig/TestNormalizeTableConfig classes,
update runtime validator tests for removed _validate_format_compatibility /
_validate_cardinality methods, add x is not None narrowing guards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-20 21:20:08 +00:00
Alexandru Soare
fb276b08dd
fix(mcp): Skip misleading trend analysis for categorical ASCII charts ( #39761 )
2026-05-20 18:04:21 +03:00
Alexandru Soare
6e8b3bf976
fix(mcp): raise right error ( #39964 )
2026-05-20 14:32:45 +03:00
Richard Fogaca Nienkotter
1e2d0b5f5b
fix(mcp): defer chart preview command imports ( #40164 )
2026-05-15 12:15:33 -03:00
Richard Fogaca Nienkotter
8fa5a75c70
fix(mcp): apply cached adhoc filters to chart retrieval ( #40099 )
2026-05-14 14:21:54 -03:00
Sandesh Devaraju
823eb905d3
fix(mcp): JSON-serialize order_by_cols and support sort direction ( #39952 )
...
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com >
2026-05-14 11:19:37 -04:00
Richard Fogaca Nienkotter
2a1dcb79e3
fix(mcp): expose table chart type labels in chart responses ( #40060 )
2026-05-13 16:38:31 -03:00
Richard Fogaca Nienkotter
fa06989ed7
fix(mcp): return requested update chart previews ( #40077 )
2026-05-12 21:23:49 -03:00
Amin Ghadersohi
547660dcc4
fix(mcp): ASCII chart crashes with NaN when dataset contains null values ( #39916 )
2026-05-08 17:35:15 -04:00
Amin Ghadersohi
ff7dc53853
fix(mcp): get_chart_sql drops x_axis on echarts_timeseries_* and only renders one query for mixed_timeseries ( #39865 )
2026-05-08 15:29:28 -04:00
Amin Ghadersohi
9ac4711ac8
fix(mcp): prevent DetachedInstanceError in get_chart_preview ( #39921 )
2026-05-07 11:44:11 -04:00
Amin Ghadersohi
4a21a5365f
fix(mcp): validate column refs in generate_explore_link, update_chart_preview, and update_chart ( #39797 )
2026-05-05 19:12:31 -04:00
Richard Fogaca Nienkotter
9459bc7bf4
fix(mcp): warn on invalid chart preview form data key ( #39891 )
...
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
2026-05-05 16:40:00 -03:00
Beto Dealmeida
cb53745d43
feat: semantic layer extension ( #37815 )
2026-05-05 12:07:46 -04:00
Amin Ghadersohi
957b298ae1
fix(mcp): add default request parameter to list_charts and list_dashboards ( #39730 )
2026-04-30 18:04:39 -04:00
Richard Fogaca Nienkotter
c2b9272f4c
fix(mcp): sanitize read path output for LLM context ( #39738 )
2026-04-29 19:06:19 -03:00
Elizabeth Thompson
8d17c34068
feat(mcp): restore self-lookup via created_by_me flag ( #39638 )
...
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-29 11:03:28 -07:00
Richard Fogaca Nienkotter
549aff7cf9
fix(mcp): clarify chart preview URL metadata ( #39731 )
2026-04-29 12:37:40 -03:00
Amin Ghadersohi
4b42f82f13
fix(mcp): restore typed ChartConfig in tool schemas for LLM visibility ( #39732 )
2026-04-28 19:46:57 -04:00
Richard Fogaca Nienkotter
d0abb66fdf
fix(mcp): default chart previews to ascii ( #39719 )
2026-04-28 13:30:39 -03:00
Mehmet Salih Yavuz
3f28f5d012
fix(mcp): surface structured errors for generate_chart validation failures ( #39484 )
...
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-28 11:13:53 +03:00
Amin Ghadersohi
7774ec7e3c
fix(mcp): database filter columns, timeseries SQL, and unsaved chart datasource name ( #39636 )
2026-04-27 13:41:06 -04:00
Amin Ghadersohi
ad20285dd6
fix(mcp): sanitize chart config errors and accept field name aliases ( #39606 )
2026-04-24 21:30:43 -04:00
Enzo Martellucci
d7941ccfec
fix(mcp): surface XSS sanitization in chart/dashboard names instead of silently stripping ( #39491 )
2026-04-24 14:59:20 +02:00
Richard Fogaca Nienkotter
d79eb5842a
fix(mcp): protect data-model metadata from dashboard viewers ( #39599 )
...
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-24 09:40:39 -03:00
Richard Fogaca Nienkotter
0d50fd676b
fix(mcp): hide user directory metadata from responses ( #39576 )
...
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com >
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-23 17:35:08 -03:00
Enzo Martellucci
dae79a6cba
fix(mcp): surface validation errors in generate_chart instead of empty response ( #39522 )
...
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-23 21:50:02 +02:00
Amin Ghadersohi
e6853894ab
chore(mcp): extract shared chart helpers and ASCII rendering into separate modules ( #39438 )
2026-04-21 20:10:49 -04:00
Gabriel Torres Ruiz
919daabe54
fix(mcp): clear stale query_context in update_chart so filters and row_limit are applied ( #39413 )
2026-04-21 14:34:21 -03:00
Amin Ghadersohi
6948e73ec7
feat(mcp): add get_chart_sql tool and expose chart filters in get_chart_info ( #38700 )
2026-04-20 17:50:10 -04:00
Amin Ghadersohi
5cff657812
fix(mcp): default XY chart x-axis to dataset primary datetime column ( #39421 )
...
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
2026-04-20 11:14:54 -04:00
Gabriel Torres Ruiz
2e0d482ccf
fix(mcp): support explicit query_mode in TableChartConfig ( #39412 )
2026-04-16 18:53:25 -03:00
Mehmet Salih Yavuz
69f062b804
feat(mcp): add a preview flow to mcp chart updates ( #39383 )
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-16 20:31:02 +03:00
Amin Ghadersohi
5f9fc31ae2
feat(mcp): add get_chart_type_schema tool for on-demand schema discovery ( #39142 )
2026-04-07 12:07:45 -04:00
Amin Ghadersohi
bf9aff19b5
fix(mcp): compress chart config schemas to reduce search_tools token usage ( #39018 )
2026-04-06 19:52:03 -04:00
Amin Ghadersohi
7be2acb2f3
fix(mcp): add description and certification fields to default list tool columns ( #39017 )
2026-04-06 13:37:52 -04:00
Amin Ghadersohi
7380a59ab8
fix(mcp): fix form_data null, dataset URL, ASCII preview, and chart rename ( #39109 )
2026-04-06 12:34:26 -04:00
Amin Ghadersohi
c37a3ec292
fix(mcp): add TEMPORAL_RANGE filter for temporal x-axis in generate_chart ( #38978 )
2026-03-31 12:39:08 -04:00
Amin Ghadersohi
4245720851
feat(mcp): add Big Number chart type support to MCP service ( #38403 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-31 11:53:53 -04:00
Amin Ghadersohi
2c9cf0bd55
fix(mcp): enforce MAX_PAGE_SIZE limit on list tools to prevent oversized responses ( #38959 )
2026-03-30 16:48:03 -04:00
Kamil Gabryjelski
15bab227bb
feat(mcp): support saved metrics from datasets in chart generation ( #38955 )
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-30 16:38:31 +02:00
Amin Ghadersohi
6dc3d7ad9f
fix(mcp): add try/except around DAO re-fetch to handle session errors in multi-tenant ( #38859 )
2026-03-26 12:43:21 -04:00
Amin Ghadersohi
23a5e95884
fix(mcp): add permission checks to generate_dashboard and update_chart tools ( #38845 )
2026-03-25 16:37:48 -04:00
Kamil Gabryjelski
16f5a2a41a
fix(mcp): detect unknown chart config fields and suggest correct ones ( #38848 )
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-25 18:38:23 +01:00
Amin Ghadersohi
c596df9294
feat(mcp): add Handlebars chart type support to MCP service ( #38402 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-24 12:25:39 -04:00
Amin Ghadersohi
44c2c765ae
fix(mcp): convert adhoc filters to QueryObject format before query compilation ( #38774 )
2026-03-20 20:43:09 +01:00
Kamil Gabryjelski
1d72480c17
fix(mcp): fix detached Slice instance error in chart/dashboard serialization ( #38767 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-20 18:23:51 +01:00
Kamil Gabryjelski
211f29b723
fix(mcp): Chart schema followups - DRY extraction, template fix, alias and test gaps ( #38746 )
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-19 16:50:42 +01:00
Kamil Gabryjelski
14b1b456e1
fix: Add aliases and groupby list to chart schemas ( #38740 )
2026-03-19 16:15:58 +01:00