Skip to content

app/vmui: add quick start and history autocomplete suggestions#1557

Open
Loori-R wants to merge 2 commits into
masterfrom
vmui/issue-1498/query-editor-hits
Open

app/vmui: add quick start and history autocomplete suggestions#1557
Loori-R wants to merge 2 commits into
masterfrom
vmui/issue-1498/query-editor-hits

Conversation

@Loori-R

@Loori-R Loori-R commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Describe Your Changes

Simplify query history and improve autocomplete suggestions in the query editor.

Related issue: #1498

Changes

  • simplify query history: remove session history and favorites, and keep saved history as the single localStorage-backed history source
  • store the last run timestamp for history items and group them by day
  • show recent query history items in autocomplete suggestions
  • show a Quick Start section in autocomplete when the query is empty or uses the default * expression
  • improve the autocomplete UI and suggestion layout

Notes

Quick Start examples are defined in:

app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryExamples/examples/quickStartExamples.tsx

@hagen1778, please check whether the Quick Start examples are correct and useful.

Screenshots

Quick Start suggestions

Quick Start suggestions in autocomplete

History suggestions

History suggestions in autocomplete

Query history grouped by day

Query history grouped by day

@Loori-R Loori-R added the web-ui Issues related to the user interface: layout, styling, usability, or UI-specific bugs. label Jun 30, 2026
@Loori-R Loori-R linked an issue Jun 30, 2026 that may be closed by this pull request

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 issues found across 60 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread docs/victorialogs/CHANGELOG.md Outdated
Comment thread app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx Outdated
Comment thread app/vmui/packages/vmui/src/components/QueryHistory/utils.ts Outdated
Comment thread app/vmui/packages/vmui/src/styles/variables.scss Outdated
Comment thread app/vmui/packages/vmui/src/pages/QueryPage/QueryPage.tsx Outdated
Comment thread app/vmui/packages/vmui/src/components/QueryHistory/style.scss Outdated
@Loori-R Loori-R force-pushed the vmui/issue-1498/query-editor-hits branch from 101319a to 7f59b98 Compare June 30, 2026 15:24
@hagen1778

Copy link
Copy Markdown
Contributor

I like the change! Thanks @Loori-R !

A few comments:

  1. I am thinking if it is possible to make query examples smaller, like in the initial design? It is ok if not, just wanted to hear your perspective on this.
  2. Query examples should run immediately on click
  3. There are following glitches with the popup:
image
Screen.Recording.2026-07-01.at.11.55.29.mov

(the video clip shows glitch when cursor is pointing on the item in the list and I am using keys to scroll down)

  1. History remembers bad queries, but it should remember only successful ones
image

@Loori-R

Loori-R commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

2. Query examples should run immediately on click

@hagen1778, I’d keep the current behavior and not run examples immediately on click.

Reasons:

  1. Examples work more like templates: users often select one, adjust values, and only then run it.
  2. Auto-running may trigger unnecessary or confusing requests.
  3. This keeps behavior consistent with autocomplete: selecting an item inserts the value, but does not execute the query.

@Loori-R

Loori-R commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

4. History remembers bad queries, but it should remember only successful ones

I think there are still a couple of valid cases for keeping failed queries in history:

  1. The query itself is valid, but execution failed because of a temporary server-side issue.

  2. The user wrote a long/complex query and then accidentally cleared or replaced it. Keeping it in history helps recover the query.

Maybe a good compromise would be:

  • mark failed queries;
  • exclude them from autocomplete / quick suggestions and display them only in the history modal.

@Loori-R Loori-R force-pushed the vmui/issue-1498/query-editor-hits branch from f812317 to f0595a4 Compare July 1, 2026 11:28

@arturminchukov arturminchukov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good!
Just want to suggest an enhancement of history. When I try to use it with many values, I don't see the history of previous queries (I don't know if the history section exists below). Example:

Image

What I want to suggest.

Make something similar to the console history works.

Image

So we show the latest similar query that starts with our current query. With the history hotkeys (cmd/ctrl + up/down), we can search in the history. Also would be nice to show these hotkeys at the bottom of the popup:

Image

So looks like in this case we can remove the history section if the query is not empty or "*".
@Loori-R , @hagen1778, what do you think about it? We can discuss it on sync and create a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web-ui Issues related to the user interface: layout, styling, usability, or UI-specific bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vmui: query editor hints

3 participants