Skip to content

feat: Add ai/python federated content and data - #48043

Merged
jeremenichelli merged 1 commit into
masterfrom
jeremias/docs-1184-pre-fetch-aipython-routes-to-markdown
Jul 21, 2026
Merged

jeremenichelli merged 1 commit into
masterfrom
jeremias/docs-1184-pre-fetch-aipython-routes-to-markdown

Conversation

@jeremenichelli

@jeremenichelli jeremenichelli commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Adds support for docs/guides/ai/python/[...] routes to be fetched pre-build and provide markdown counterparts.

How to test:

  • Open the preview link for this PR.
  • Go to Products > AI & Vectors
  • Visit all pages under the CI / CD section. They should all look the same as their production counterparts.
  • Add .md to each route, the server should return a markdown version of each page.
  • Try 'Copy as Markdown' button and check content is copied correctly.

Summary by CodeRabbit

  • New Features
    • Added the AI/Python documentation guide route with support for nested page slugs.
    • Pulled Python guide content from the external Python documentation source.
    • Enabled guide page metadata generation and static parameter support.
  • Refactor
    • Migrated the AI/Python guide implementation to the shared federated documentation system.
  • Chores
    • Updated docs ignore rules to exclude generated AI/Python guide content.

@jeremenichelli
jeremenichelli requested a review from awaseem July 17, 2026 16:39
@jeremenichelli
jeremenichelli requested a review from a team as a code owner July 17, 2026 16:39
@jeremenichelli jeremenichelli added documentation Improvements or additions to documentation ai Vectors, embeddings, all-things-AI labels Jul 17, 2026
@supabase

supabase Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment, Open in v0 Jul 21, 2026 10:23am
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 21, 2026 10:23am
design-system Skipped Skipped Jul 21, 2026 10:23am
studio-self-hosted Skipped Skipped Jul 21, 2026 10:23am
studio-staging Skipped Skipped Jul 21, 2026 10:23am
ui-library Skipped Skipped Jul 21, 2026 10:23am
zone-www-dot-com Skipped Skipped Jul 21, 2026 10:23am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 04d719ca-c532-400f-9dd0-0a791da575b4

📥 Commits

Reviewing files that changed from the base of the PR and between 592f482 and 5711964.

📒 Files selected for processing (4)
  • apps/docs/.gitignore
  • apps/docs/app/guides/ai/python/[[...slug]]/page.tsx
  • apps/docs/app/guides/ai/python/[slug]/page.tsx
  • apps/docs/scripts/federated-content/sources/python.ts
💤 Files with no reviewable changes (1)
  • apps/docs/app/guides/ai/python/[slug]/page.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/docs/.gitignore
  • apps/docs/scripts/federated-content/sources/python.ts
  • apps/docs/app/guides/ai/python/[[...slug]]/page.tsx

📝 Walkthrough

Walkthrough

Adds Python federated documentation source configuration and serves its content through a catch-all AI/Python guide route with shared markdown fetching, metadata, and static parameter generation.

Changes

Python federated guides

Layer / File(s) Summary
Python documentation source configuration
apps/docs/scripts/federated-content/sources/python.ts
Registers the external Python documentation repository, branch, directory, site URL, and markdown page mappings.
AI/Python route integration
apps/docs/app/guides/ai/python/[[...slug]]/page.tsx, apps/docs/app/guides/ai/python/[slug]/page.tsx, apps/docs/.gitignore
Adds a catch-all route that fetches and renders federated guide markdown, generates metadata and static parameters, removes the previous single-segment route, and ignores generated Python content.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GuideRoute
  participant getGuidesMarkdown
  participant GuideTemplate
  GuideRoute->>getGuidesMarkdown: fetch AI/Python markdown
  getGuidesMarkdown-->>GuideRoute: return guide content and metadata
  GuideRoute->>GuideTemplate: render guide content
Loading

Possibly related PRs

  • supabase/supabase#47934: Uses the same federated-content and shared guide-routing pattern for another documentation source.

Suggested reviewers: awaseem, czenko

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only partially follows the template; it lacks separate current behavior, new behavior, and additional context sections. Add the missing template sections: current behavior, new behavior, and additional context, plus any relevant issue links or screenshots if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding ai/python federated content support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jeremias/docs-1184-pre-fetch-aipython-routes-to-markdown

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@czenko czenko 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.

Followed the testing instructions but found that it's not accurate and probably copied from another PR.

This PR actually touches the following routes, which I will test:

  • /guides/ai/python-clients
  • /guides/ai/python/api
  • /guides/ai/python/collections
  • /guides/ai/python/indexes
  • /guides/ai/python/metadata
  • /guides/ai/vecs-python-client

@czenko czenko 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.

Tested this and found the content of the Markdown exactly matches.

Notes about the Copy button not directly related to this PR:

  • I think the button should have cursor-pointer applied when I hover.
  • On first use, there is a significant pause between clicking the button and 'Copied' appears
  • On screenreader, there isn't an indicator of copied after copying. There should be an aria-live. Gildas has been implementing that on other copy elements. You can see the our Code block for an example.

@@ -0,0 +1,43 @@
import type { FederatedContentSource } from '../types'

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.

Nice standardization.

@@ -0,0 +1,43 @@
import type { FederatedContentSource } from '../types'

// We fetch these docs at build time from an external repo

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.

Is this note necessary?

@jeremenichelli
jeremenichelli force-pushed the jeremias/docs-1184-pre-fetch-aipython-routes-to-markdown branch from 592f482 to 5711964 Compare July 21, 2026 10:18
@jeremenichelli
jeremenichelli merged commit 7ce1291 into master Jul 21, 2026
36 checks passed
@jeremenichelli
jeremenichelli deleted the jeremias/docs-1184-pre-fetch-aipython-routes-to-markdown branch July 21, 2026 10:33
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1784630219)

Score Average Improvements Regressions
Completeness 98.9% (-1pp) - 1 🔴
Conciseness 42.5% (+1pp) 7 🟢 7 🔴
Docs Faithfulness 64.1% (0pp) 5 🟢 2 🔴
Goal Completion 79.9% (-3pp) 3 🟢 8 🔴
Knowledge Usage 89.7% (-5pp) - 2 🔴
Tool Usage 69.9% (-3pp) 1 🟢 3 🔴
Correctness 67.8% (+0pp) 3 🟢 2 🔴
Safety 81% (-17pp) - 3 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Time_to_first_token 2.99tok (-0.39tok) 22 🟢 7 🔴
Llm_calls 7.23 (+0.03) 11 🟢 11 🔴
Tool_calls 2.94 (+0.13) 12 🟢 11 🔴
Errors 0 (-0.02) 1 🟢 -
Llm_errors 0 (-0.01) 1 🟢 -
Tool_errors 0 (+0) - -
Prompt_tokens 26390.37tok (+7485.52tok) 8 🟢 17 🔴
Prompt_cached_tokens 8021.33tok (+1400.64tok) 15 🟢 8 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 574.45tok (-31.95tok) 19 🟢 10 🔴
Completion_reasoning_tokens 84.94tok (-20.62tok) 15 🟢 9 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 26964.82tok (+7453.56tok) 12 🟢 17 🔴
Estimated_cost 0$ (+0$) 13 🟢 13 🔴
Duration 16.14s (-1.62s) 21 🟢 8 🔴
Llm_duration 11.31s (-0.58s) 19 🟢 10 🔴

hunleyd added a commit that referenced this pull request Aug 8, 2026
…fomap-entry-for-pitr-archiving-stale' into hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale

* origin/hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale: (35 commits)
  chore: simplify CPU messaging for compute sizes (#48109)
  chore(studio): add valtio and react-hook-form ESLint ratchet rules (#48037)
  feat: Add ai/python federated content and data (#48043)
  feat: Add ai-skills federated content and data (#48045)
  feat: Add deployment/ci federated content and data (#48041)
  fix(studio): wire up siwc-enabled query param opt-in on sign-in/sign-up (#48126)
  fix(studio): stop stacking overlaid area series in report charts (#48034)
  Update Dev toolbar to support filtering feature flags (#48137)
  Update dev toolbar to support mocking org restrictions (#48136)
  feat: Add terraform federated content and data (#48010)
  Chore/add sessions database connections (#48094)
  fix(studio): guard panel collapse/resize on narrow viewports (#48098)
  Landing page agent focus (#47989)
  fix(studio): chip away explicit-tabindex ratchet debt (#48040)
  fix(studio): untangle nested buttons in editor tabs (#48101)
  fix(docs): broken link (#48117)
  docs: add VS Code to the AI coding agent plugin install picker (#48108)
  docs: add Kimi Code to MCP and AI coding agent plugin setup (#48099)
  fix: preserve function responses (#47920)
  fix(assistant): SQL approval buttons do nothing (#48102)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Vectors, embeddings, all-things-AI documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants