Repository navigation
Review follow-ups for #75: check image content type, test share key stays out of errors - #78
Merged
Merged
Conversation
…ors keep the share key out Review follow-ups on #75: a 200 that is not an image now fails instead of being saved as the JPEG; a test covers download failures (connection refused, HTML page, 403) and asserts the share key never reaches the error; CallTool now wraps CallToolWithImages. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a2147b-3c2e-76b3-aeaf-0aafbe53d879
norbertdurcansk
approved these changes
Nov 26, 2026
rahuldotiyer
added a commit
that referenced
this pull request
Nov 26, 2026
…nd dashboard images (#75) * Add CLI parity for MCP chart descriptions, counter labels, widget edits and dashboard images core#8196 added these to the Dune MCP server (live in node-1.0.1008). The CLI now matches them: - viz create --chart-type/--config now takes --description and sends it to generateVisualization (it was rejected before). - viz update gains --counter-label, and --description now works with --chart-type/--config or on its own, through updateVisualization. An empty value removes the label or description, as in the MCP. - dashboard update-widget moves or resizes one widget, or edits a text widget's markdown, through updateDashboardWidget, keeping every other widget as it is. - dashboard image saves a JPEG of the whole dashboard through getDashboardImage. It fails and lists the visualizations when Dune withholds the image for licensed datasets. It never prints the image URL, which carries a private dashboard's share key; when the image is too large to return inline it downloads it from that URL. dunemcp.Caller gains CallWithImages so commands can read image blocks. The chart config help no longer says Dune does not check column names: the MCP now rejects unknown columns when the query has results. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a2147b-3c2e-76b3-aeaf-0aafbe53d879 * Check the downloaded dashboard image's content type and test that errors keep the share key out (#78) Review follow-ups on #75: a 200 that is not an image now fails instead of being saved as the JPEG; a test covers download failures (connection refused, HTML page, 403) and asserts the share key never reaches the error; CallTool now wraps CallToolWithImages. Amp-Thread-ID: https://ampcode.com/threads/T-01a2147b-3c2e-76b3-aeaf-0aafbe53d879 Co-authored-by: Amp <amp@ampcode.com> --------- Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to @norbertdurcansk's review of #75. They go through this PR because the repo's
defaultruleset refuses direct pushes to any existing branch, #75's included. It targets #75's branch, so merging it puts these changes into #75.Content-Typeis notimage/*now fails and is not saved, so an HTML error or login page never becomesdashboard-<id>.jpg.TestImageDownloadFailuresKeepTheShareKeyOutcovers connection refused, an HTML 200 and a 403. It asserts the error never contains the share key and that no file is written. It fails when theurl.Errorunwrapping is removed.CallToolnow wrapsCallToolWithImages.On the download question: a request to the
dashboardImageUrlfor prod dashboard 481 with no headers returned 200image/jpeg(168 KB), so the endpoint works without the API key.go test ./...andgo vet ./...pass.No visual surface: CLI only.