aminghadersohi opened a new pull request, #37228: URL: https://github.com/apache/superset/pull/37228
### SUMMARY Remove screenshot URL functionality from MCP chart tools. Screenshot URLs were not functional since they require server-side screenshot generation endpoints that aren't readily available. Instead of implementing complex screenshot infrastructure, this change removes the screenshot URL generation entirely in favor of using explore URLs for chart previews. **Changes:** - Remove `get_chart_screenshot_url` and `get_explore_screenshot_url` from `url_utils.py` - Update `URLPreviewStrategy` to return an error explaining that URL-based screenshot previews are not supported - Remove screenshot URL generation from `generate_chart.py` for preview-only mode - Remove `preview` endpoint from `api_endpoints` in `update_chart.py` and `generate_chart.py` - Update `serialize_chart_object` to use explore URL instead of screenshot URL - Update `update_chart_preview.py` to not generate screenshot URLs Users can still preview charts using: - `explore_url` for interactive viewing in the browser - `ascii`, `table`, or `vega_lite` preview formats for text-based previews ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - No UI changes ### TESTING INSTRUCTIONS 1. Start Superset with MCP service enabled 2. Call `generate_chart` tool - verify it returns `explore_url` but not screenshot URL 3. Call `get_chart_preview` with format `url` - verify it returns an error explaining screenshot URLs are not supported 4. Call `get_chart_preview` with format `ascii` or `table` - verify it still works 5. Call `update_chart` - verify `api_endpoints` doesn't include `preview` key ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [x] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
