Skip to content

feat: enable the visualize tool by default, warn instead of error without deps - #294

Merged
cpsievert merged 5 commits into
page-methodfrom
viz-default
Sep 10, 2026
Merged

cpsievert merged 5 commits into
page-methodfrom
viz-default

Conversation

@cpsievert

Copy link
Copy Markdown
Contributor

Stacked on #291.

Summary

The "visualize" tool joins the default toolset in both languages: tools = c("filter", "query", "visualize") (R) / ("filter", "query", "visualize") (py). One-liner apps and page() layouts get visualization out of the box.

When the visualization dependencies aren't installed (R: ggsql; py: the viz extra — ggsql, altair, shinywidgets, vl-convert-python), the tool is now dropped with a one-time warning instead of erroring: replaces rlang::check_installed() in R and the ImportError from normalize_tools() in py. The system prompt never advertises a tool that isn't registered, and py's preload_viz stays consistent since resolution happens at construction.

Verification

  • py: 888 unit tests pass, including new coverage for warn-and-drop and the default toolset
  • R: QueryChat suite passes, including a new check_viz_deps() test (warns once per session, drops the tool)

This comment was marked as resolved.

cpsievert and others added 5 commits September 10, 2026 13:34
…r without deps

Default tools are now (filter, query, visualize) in both languages.
When visualization dependencies are missing (R: ggsql; py: the viz
extra of ggsql/altair/shinywidgets/vl-convert-python), the visualize
tool is dropped with a one-time warning rather than raising an error
(replaces rlang::check_installed and the py ImportError in
normalize_tools), so one-liner apps and page()/app() layouts get
visualization out of the box when deps are present and degrade
gracefully when not.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@cpsievert
cpsievert added this pull request to stack #296 September 10, 2026 20:57
@cpsievert
cpsievert merged commit 493d42e into main Sep 10, 2026
18 checks passed
@cpsievert
cpsievert deleted the viz-default branch September 10, 2026 22:30
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.

2 participants