Skip to content

feat(app): refresh chart explorer UI and clarify AI assistant controls - #3864

Draft
elizabetdev wants to merge 17 commits into
mainfrom
elizabet/hdx-6227-chart-explorer-ui
Draft

elizabetdev wants to merge 17 commits into
mainfrom
elizabet/hdx-6227-chart-explorer-ui

Conversation

@elizabetdev

Copy link
Copy Markdown
Member

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:

  • AI assistant opens in a resizable right-hand panel, and its last change can be undone.
  • Save to dashboard is a labeled button. Explorer charts have no name field and are named automatically on save, since there was nowhere to keep the name otherwise.
  • Chart type is a select, replacing the tab strip. Markdown is no longer offered in the explorer (dashboard tiles keep it).
  • Header is one row in every mode: the Builder/SQL/PromQL switch comes first, then that mode's source controls (data source; connection and source; PromQL data source), with chart type and save actions on the right. The mode switch decides which source controls apply, so it leads.
  • Series each sit in a card with a swatch and accent bar in the color the chart draws that line. The color is read back from the rendered chart, because colors are assigned after sorting by series key and the editor order doesn't predict them. Grouped charts color per group, so their cards show no color. Table cards show the pinned column color.
  • Display Settings 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 Display Settings hides an open alert without discarding its edits.
  • Series display settings (number format) open in a popover, and the "Where" and "Data Source" labels are gone.

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)

Before After
Before: explorer After: explorer

Display Settings

Before After
Before: display settings drawer After: display settings panel

SQL mode

Before After
Before: SQL header After: SQL header

PromQL mode

Before After
Before: PromQL header After: PromQL header

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-screenshots branch. 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 needs NEXT_PUBLIC_ENABLE_PROMQL=true.

On main:

  1. Open Chart explorer. Chart type is a tab strip below a "Chart Name" field, and the AI assistant is a collapsible row above everything.
  2. Click Add Series and run. Series are plain rows separated by dividers, with nothing to tell which line is which.
  3. Click Display Settings. A drawer covers the page.
  4. Switch between Builder, SQL and PromQL. The data source, and connection and source, move around the page.

On this branch:

  1. Open Chart explorer. Builder/SQL/PromQL, the data source, chart type and the AI assistant are on one row.
  2. Click Add Series, add a filter to the second series and run. Each series card has a swatch and left bar in its line's color.
  3. Click Display Settings. It opens in a side panel and the chart stays visible. Click Add alert: the panel switches to the alert.
  4. Switch between Builder, SQL and PromQL. The mode switch stays first and the matching source controls follow it.

How to test on Vercel preview

Preview routes: /chart

Steps:

  1. Open /chart and click Add Series.
  2. Run the chart and confirm each series card shows a color swatch matching its line.
  3. Click Display Settings and confirm it opens in a right-hand panel, not a drawer over the page.
  4. Click SQL, then PromQL, and confirm the Builder/SQL/PromQL switch stays in the same place with the source controls next to it.

Testing

  • tsc, oxlint and oxfmt are clean for packages/app. I did not run the full make ci-lint or make ci-unit.
  • Jest for packages/app/src/components passes (3,307 tests), including new unit tests for the series color mapping and the chart type select.
  • New Playwright test: each series card's color equals its chart line's color. Existing specs that drive Display Settings, source variables, source filtering, SQL filters and PromQL pass.
  • Flaky, passed on retry: clock-dependent chart-explorer bar tests, the metric table formula sort test, and a few dashboard filter tests with raw SQL tiles.

Known gaps

  • The AI assistant panel has not been checked in a browser, since it needs an AI-enabled deployment.
  • The assistant panel still triggers submit with setTimeout(() => submitRef.current(), 100).
  • Undo of an assistant change overwrites any edits made after it.
  • With a side panel open, the editor narrows and the series filter box gets tight. The alert panel already does this.
  • ChartDisplaySettingsDrawer is no longer a drawer. I kept the name to avoid touching about 100 test call sites.

References

elizabetdev and others added 13 commits November 28, 2026 12:21
- 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>
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Nov 30, 2026 5:58pm UTC
hyperdx-storybook Ready Ready Preview Nov 30, 2026 5:58pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b4dea95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Minor
@hyperdx/api Minor
@hyperdx/otel-collector Minor

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

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 108 in total (1.10%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 480 passed • 1 skipped • 1303s

Status Count
✅ Passed 480
❌ Failed 0
⚠️ Flaky 13
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

…the AI assistant in a popover

Co-authored-by: Cursor <cursoragent@cursor.com>
…der's first row

Co-authored-by: Cursor <cursoragent@cursor.com>
elizabetdev and others added 2 commits November 30, 2026 17:55
… explorer header

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

This branch was successfully deployed

2 active (outdated) deployments
Preview – hyperdx-oss — 0b7c72d4 Deployed Nov 30, 2026 by vercel[bot]
Preview – hyperdx-storybook — 0b7c72d4 Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant