fix: prevent false "data source not set" error on markdown dashboard tiles#2202
Open
vinzee wants to merge 1 commit intohyperdxio:mainfrom
Open
fix: prevent false "data source not set" error on markdown dashboard tiles#2202vinzee wants to merge 1 commit intohyperdxio:mainfrom
vinzee wants to merge 1 commit intohyperdxio:mainfrom
Conversation
|
@vinzee is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: bcfb9b4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
PR Review✅ The fix is correct and well-targeted.
|
a091a1b to
923869d
Compare
…d tiles Markdown tiles created via the external API or MCP always showed \"The data source for this tile is not set. Edit the tile to select a data source.\" in the dashboard UI, despite not requiring a source. Root cause: convertToInternalTileConfig stores source: '' on the internal config to satisfy BuilderSavedChartConfig's required source field. The frontend's isSourceUnset check used !chart.config.source, which evaluates to true for an empty string, incorrectly triggering the error banner for every API-created markdown tile. Fix: add chart.config.displayType !== DisplayType.Markdown to the isSourceUnset guard in DBDashboardPage so markdown tiles are never considered to have an unset source. Tests added: - packages/common-utils: unit tests for isBuilderSavedChartConfig and the isSourceUnset pattern, verifying markdown tiles are excluded - packages/api: unit tests for convertToInternalTileConfig covering the markdown tile conversion and layout field preservation Co-authored-by: Cursor <cursoragent@cursor.com>
923869d to
bcfb9b4
Compare
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.
Problem
Markdown tiles created via the external API or MCP always show the following error:
...even though markdown tiles do not require a data source. Tiles created through the UI do not exhibit this problem.
Root Cause
convertToInternalTileConfigstoressource: ''on the internal config for markdown tiles to satisfy theBuilderSavedChartConfigTypeScript type, which requires asourcefield:The frontend's
isSourceUnsetcheck inDBDashboardPageused!chart.config.source, which evaluates totruefor an empty string,incorrectly triggering the error banner for every API-created markdown tile:
Solution
Add a
displayType !== DisplayType.Markdownguard toisSourceUnsetsomarkdown tiles are never considered to have an unset source:
Tests
packages/common-utils: unit tests forisBuilderSavedChartConfigandthe
isSourceUnsetpattern, verifying that markdown tiles evaluate tofalse(no error shown) even whensourceis''packages/api: unit tests forconvertToInternalTileConfigcoveringthe markdown tile conversion path and tile layout field preservation