Skip to content

Feature Request: Collapsible Query Details Section #120

@laresbernardo

Description

@laresbernardo

Summary

Add an option to make the Query Data section (SQL query and results) collapsible by default, showing only the AI's natural language answer with a toggle to expand/collapse the technical details.

Problem Statement

Currently, when users interact with querychat, the query details (generated SQL and raw results) are always visible and expanded. For end users who primarily care about the AI's answer rather than the technical implementation, this creates visual clutter and makes the interface less user-friendly.

Current Behavior

When a user submits a query:

  • The generated SQL query is displayed
  • The raw query results are displayed
  • The AI's natural language answer is displayed below

All sections are visible simultaneously, requiring users to scroll through technical details even when they only need the answer.

Desired Behavior

Provide an option or parameter to set the default to collapsed, showing only the AI answer, with query details collapsed.

Proposed API

querychat_init(
  data_source = my_data,
  collapse_query = TRUE,  # New parameter
  # ...other parameters
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions