fix: Validate column name for metrics when creating charts#1597
fix: Validate column name for metrics when creating charts#1597kodiakhq[bot] merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 9f97813 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
PR Review: Metric Name Validation✅ Good changes:
Recommendation: Fix the missing import issue before merge. Other items are low-risk but worth considering. |
E2E Test Results✅ All tests passed • 60 passed • 4 skipped • 753s
Tests ran across 4 shards in parallel. |
|
@fleon looks like a small linting/ts error is present in this PR. |
c2b3ed3 to
b9e1531
Compare
|
@teeohhem Ready to take another look. I also cleaned up the test file to reduce the number of mocks (only mocking what is necessary to test this particular bug fix). |
|
LGTM on the Chart Explorer page. One additional related thing that could be good is to do the same validation when saving dashboard tiles: Screen.Recording.2026-01-15.at.9.33.50.AM.mov |
When creating a chart, validate input before executing the query, so that we show a validation error instead of a query execution error if the column name is empty. Fixes HDX-1792.
|
Thanks for the feedback @pulpdrew. I'll create a new ticket to update the dashboard page as well. I'll also think about if we can abstract the logic into a separate file to share between the two components. Edit: Tracking in HDX-3222 |
Similar to #1597, verify column names for validation errors when saving dashboard tiles too. https://github.com/user-attachments/assets/ff9ec648-47da-433f-abe0-cc779aba1a76
When creating a chart, validate input before executing the query, so that we show a validation error instead of a query execution error if the column name is empty. The error state on a particular input is cleared once the input is populated. Fixes HDX-1792. Screenshots ## Before: <img width="2599" height="791" alt="image" src="https://github.com/user-attachments/assets/3965d6d1-4e2f-444d-80ac-70ba4f148afa" /> ## After: ### Error state: <img width="2184" height="1438" alt="CleanShot 2026-01-13 at 19 57 17@2x" src="https://github.com/user-attachments/assets/86bb5e60-7d60-4f38-a30c-170524dd32d4" /> ### Video: https://github.com/user-attachments/assets/27382379-cb10-43cb-acd4-8f97cc257511
Similar to #1597, verify column names for validation errors when saving dashboard tiles too. https://github.com/user-attachments/assets/ff9ec648-47da-433f-abe0-cc779aba1a76
When creating a chart, validate input before executing the query, so that we show a validation error instead of a query execution error if the column name is empty. The error state on a particular input is cleared once the input is populated.
Fixes HDX-1792.
Screenshots
Before:
After:
Error state:
Video:
CleanShot.2026-01-13.at.19.58.01.mp4