Skip to content

Implement AI assistant entry points to SQL editor and query results #4437

Description

@AlinaBelousovaUX

Make query assistance discoverable directly in the SQL editor, query failure states, and the empty editor with no open tabs. Implement the SQL Editor & Results designs so users can open the AI assistant from the place where they need help.

References

Requirements

1. Query toolbar and assistant panel

Add an outlined Help with queries button with the purple AI icon after the save action, as shown in Figma. Include the tooltip Ask AI for some advice. Keep this entry point available in the depicted empty-editor, completed-query, and running-query states.

Assistant opening: the help actions open the right-side AI assistant panel in the current SQL editor context. General help starts the Help me with queries flow. The illustrated welcome content explains query writing/debugging assistance and offers YQL syntax documentation and Help me write a table query. Error actions open assistance for the relevant query error, consistent with #4087. Match the depicted open-panel layout while keeping the editor or zero-tabs view visible.

Editor with the assistant open, plus the toolbar button and its tooltip (Figma frame).

SQL editor with the AI assistant panel open; Help with queries toolbar button and Ask AI for some advice tooltip

2. No open tabs

In the center of the empty SQL Editor area, place two equally wide outlined actions vertically: New query, with its keyboard shortcut, then Help with queries, with the AI icon. Preserve the History, Saved, and Templates actions above.

Empty SQL Editor with New query and Help with queries actions (Figma frame).

SQL Editor with no open tabs and two centered actions: New query and Help with queries

3. Query failure

In the illustrated Query Failed state, place the AI action below An error occurred, please see the Result tab for details. The design labels the action Analise the problem; see the copy question below. Opening the assistant keeps the editor and failed-query state visible.

Query Failed state with the contextual AI action (Figma frame).

Query Failed result state with an illustration, error message, and Analise the problem AI button

4. Unable to stop a query

Add the same AI action to the inline error alert and the bottom-right error notification shown in Figma. Preserve their respective copy: Something went wrong. Unable to stop request processing and Something went wrong. Unable to stop request processing. Please wait.

Failed-stop interaction: follow the explicit canvas note: the Stop button shakes, a notification appears, and the query continues running. Keep the running status and query results visible.

Inline error alert above the running query results; the canvas note specifies the shake and notification behavior (Figma frame).

Failed query stop with an inline error alert and AI action; the query remains Running

Bottom-right error notification with the same AI action (Figma frame).

Failed query stop with a bottom-right error notification and Analise the problem button

5. Themes and branding

Themes and branding: cover both light and dark variants, including the separate Yandex-team examples. Use the corresponding purple AI icon for each variant and match the button treatment, spacing, placement, and panel layout in Figma. Query text, dates, timings, row counts, and assistant response examples are illustrative content rather than fixed runtime values.

Yandex-team variant with its distinct AI icon (Figma frame). Dark-theme references: standard and Yandex-team.

Yandex-team SQL editor and assistant panel with the outlined purple AI icon

Open questions

  • The mockups consistently use Analise the problem. Confirm whether to retain that exact copy or correct it to Analyze the problem.
  • The failed-stop examples show both an inline alert and a toast. Confirm whether these are alternative presentations or stages of the same interaction; the canvas note explicitly requires a notification but does not define the relationship between the two examples.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions