Repository navigation
feat(app): refresh chart explorer UI and clarify AI assistant controls - #3864
Draft
elizabetdev wants to merge 17 commits into
Draft
elizabetdev wants to merge 17 commits into
elizabetdev wants to merge 17 commits into
Conversation
- Focus the question input instead of the source select, so opening the AI assistant no longer pops the source dropdown. - Show the A shortcut as a Kbd instead of an '[A]' suffix. - Drop the Experimental badge. The assistant is already gated by the server's ANTHROPIC_API_KEY, so the badge implied an opt-in that does not exist. - Replace the chart name field with InlineNameInputControlled so the name is a label until clicked. Refs HDX-6227 Co-authored-by: Cursor <cursoragent@cursor.com>
The assistant expanded inline above the chart, pushing it down and away from where its result appears. It now opens in a resizable panel beside the chart, using the same docking as the alert panel. Generating a chart replaces the current chart and time range, so the success notification now offers an Undo that restores both. Moves the assistant out of DBChartPage into components/ChartAssistant. Co-authored-by: Cursor <cursoragent@cursor.com>
Saving a chart from the explorer was only reachable through an unlabeled kebab menu next to Run, so users did not find it. Make it a labeled secondary button that opens the existing save modal. The modal title and button use sentence case. Adds unit and e2e coverage for the explorer-to-dashboard save. Co-authored-by: Cursor <cursoragent@cursor.com>
The explorer's name field was discarded unless the chart was saved, and it changed nothing visible while exploring. Hide it in the explorer. An unnamed chart now gets a default name from its first series and group by when it is saved to a dashboard, and that name seeds an inline alert's display name. Tile names are still editable in the tile editor. Co-authored-by: Cursor <cursoragent@cursor.com>
The chart type tabs took a full row and the AI assistant toggle sat on its own line above the builder toggle. Move the chart type into the header next to the builder toggle and pass the AI assistant toggle in as a header action, which removes two rows above the chart. Markdown is only offered on dashboard forms. The explorer has nowhere to save a markdown tile, so the option was dead weight there. Existing markdown tiles keep their type. Co-authored-by: Cursor <cursoragent@cursor.com>
Tiles keep the title and description on their own row. Below it, the data source sits on the left and the chart type, builder toggle, and save actions on the right. The explorer has no title row, so its first row is the data source with the tools on the right, including the AI assistant toggle. The data source row moves out of ChartEditorControls into ChartDataSource so the header can own the layout. Raw SQL and PromQL editors don't show a data source here, as before. Co-authored-by: Cursor <cursoragent@cursor.com>
The picker already shows Data Source as its placeholder, so the separate label was redundant. The picker gets an aria-label so it keeps an accessible name. Co-authored-by: Cursor <cursoragent@cursor.com>
The series format drawer took over the whole screen to edit one number format. Open it as a popover anchored to the series' format button instead, so the chart stays visible while editing. The popover owns its open state and mounts its form only while open, so each open starts from the saved format and closing without Apply discards edits. The disclosure state in ChartSeriesEditor and ChartFormulaEditor goes away. The heading is now sentence case. Co-authored-by: Cursor <cursoragent@cursor.com>
The Where input's placeholder and the Lucene language picker already say what the field is. Removing the label lets the input take the space, and the grid template now follows the cells that remain (Where alone, Where with Group By, or Having). Co-authored-by: Cursor <cursoragent@cursor.com>
Series and formulas in the chart editor sit in cards. A swatch and accent bar show the color the chart draws that line in, read back from the rendered chart so it matches even though colors are assigned after sorting by series key. Grouped charts color per group, so their cards show no color. Table cards show the pinned column color. Co-authored-by: Cursor <cursoragent@cursor.com>
Display Settings opened in a Mantine drawer over the page. It now docks in the same right-hand panel as the alert editor, so the preview stays in view while settings change. Only one of the two is open at a time: opening the alert hides display settings, and display settings hide an open alert without discarding its edits. The toolbar groups the series actions (Add Series, Add Formula) on the left and the panel openers (Add alert, Display Settings) on the right. Co-authored-by: Cursor <cursoragent@cursor.com>
The Builder/SQL/PromQL switch decides which source controls apply, but it sat among the chart type and save actions while the source, connection and data source pickers moved between the header and the editor body. The header is now one row in every mode: the mode switch, then that mode's source controls (source; connection and source; or PromQL data source), with chart type and save actions on the right. Display Settings uses the same button in all three editors. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: b4dea95 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
Contributor
E2E Test Results✅ All tests passed • 480 passed • 1 skipped • 1303s
Tests ran across 4 shards in parallel. |
…the AI assistant in a popover Co-authored-by: Cursor <cursoragent@cursor.com>
…der's first row Co-authored-by: Cursor <cursoragent@cursor.com>
… explorer header Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This branch was successfully deployed
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.
Summary
Refreshes the chart explorer and chart editor UI (HDX-6227). The explorer had too many rows of controls, no clear way to save a chart, and an AI assistant whose placement and scope were unclear. The changes group the controls by what they do:
The commits are separable by item if you'd rather review them one at a time.
Screenshots or video
Same screen, data (e2e seed data), viewport and theme. Before is the merge base on
main.Explorer, two series (series B filtered to
SeverityText:error)Display Settings
SQL mode
PromQL mode
The AI assistant panel is not shown: it needs an AI-enabled deployment, and I haven't verified it in a browser (see below).
The images live on the
elizabet/hdx-6227-pr-screenshotsbranch. Delete it after this merges.How to reproduce
Starting point:
yarn app:dev:local, then onboarding → "Connect to Demo Server" and open Chart explorer. PromQL mode needsNEXT_PUBLIC_ENABLE_PROMQL=true.On
main:On this branch:
How to test on Vercel preview
Preview routes: /chart
Steps:
Testing
tsc,oxlintandoxfmtare clean forpackages/app. I did not run the fullmake ci-lintormake ci-unit.packages/app/src/componentspasses (3,307 tests), including new unit tests for the series color mapping and the chart type select.Known gaps
setTimeout(() => submitRef.current(), 100).ChartDisplaySettingsDraweris no longer a drawer. I kept the name to avoid touching about 100 test call sites.References