Skip to content

Nest the common.ai docs sidebar and lead with features and providers - #73548

Merged
kaxil merged 1 commit into
apache:mainfrom
astronomer:commonai-sidebar-polish
Sep 22, 2026
Merged

kaxil merged 1 commit into
apache:mainfrom
astronomer:commonai-sidebar-polish

Conversation

@kaxil

@kaxil kaxil commented Sep 22, 2026

Copy link
Copy Markdown
Member

After #73523 and #73542 the common.ai sidebar lists about fifty pages flat under nine captions, and most labels are class names (LLMBranchOperator, HookToolset), so a reader has to know the API to pick a page. Every toctree also carried :maxdepth: 1, which stopped the Airflow theme from rendering nested pages at all: the sandbox configuration and backends pages, and the MCP connection and hook pages, were reachable only from inside their parent page.

This PR turns the sidebar into the shape the Pydantic AI docs use. Basics and Getting started (installation, quick start, core concepts) stay flat; below them sit seven expandable guides: What you can build, Models and providers, Operators, Toolsets, LLM and agent features, Document and RAG pipelines, and Reliability and operations. Each guide is a page that lists its children, and the theme expands the branch the reader is in, down to a third level for MCP servers and sandboxed execution under Toolsets. Labels lead with the feature ("Branch on an answer", "Airflow hooks as tools") and page titles carry both the feature and the class name, so search and the API reference still find the class.

A new supported-providers page maps each vendor to its model prefix, extra, connection type and credential location, including Snowflake Cortex, and links each vendor to an anchored example on the connection reference. The classifier models page now links TypeSafe's site and documentation.

Design rationale

The theme already supports the nested tree; the provider was suppressing it. sphinx_airflow_theme renders toctree(collapse=True) and expands the current branch with CSS, exactly as the core Airflow docs use it. Our :maxdepth: 1 capped the global tree at one level, and without :titlesonly: the sidebar would list each page's section headings as extra levels. Both are set on every toctree now. What the theme does not support is click-to-expand of inactive branches, which is why each parent page also lists its children in the body.

Core concepts is an overview under Getting started, not a container. Structured output, message history, guardrails, code mode and the two review pages are feature guides, and a reader looking for human approval would not look under "concepts". They live under "LLM and agent features", with the review pages labelled "Approve outputs" and "Review agent sessions" so the distinction is visible in the sidebar.

Sandboxed execution moved under Toolsets. It is SandboxToolset, and the Pydantic AI docs place their sandbox under tools and capabilities rather than at the top level.

Provider fallback is listed under both Models and providers and Reliability and operations. It is configured on the connection, but a reader handling a provider outage looks under operations. The page has one home in the toctree and a cross-linking bullet in the other.

Gotchas

  • No page moves or renames, so no new redirects. The three URLs the Pydantic AI durable-execution guide deep-links are unchanged.
  • The System tests and Resources toctrees are left byte-for-byte as the check-system-tests-tocs hook requires.
  • The generated supported-services page from Add a generated supported services page for the common.ai provider #72939 belongs under Models and providers when it lands; the hand-written providers page here is the how-to and can link to it.
image image
  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

The sidebar listed every page flat under nine captions, so a reader saw
about fifty entries and had to know class names to pick a page. Every
toctree also carried maxdepth 1, which stopped the Airflow theme from
rendering the nested pages it already supports.

The sidebar is now Basics, Getting started (installation, quick start,
core concepts) and seven expandable guides: What you can build, Models and
providers, Operators, Toolsets, LLM and agent features, Document and RAG
pipelines, and Reliability and operations. Each guide is a page that lists
its children, and the theme expands the branch the reader is in.

Sidebar labels lead with the feature rather than the class name, and page
titles carry both. A new supported-providers page maps each vendor to its
model prefix, extra, connection type and credentials, including Snowflake
Cortex, and links to the anchored connection examples. The classifier
models page links TypeSafe's site and documentation.
@kaxil
kaxil merged commit 002e4d0 into apache:main Sep 22, 2026
61 checks passed
@kaxil
kaxil deleted the commonai-sidebar-polish branch September 22, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants