Setting up build for usage content for Workbench docs#107
Conversation
WalkthroughThis PR updates the AI Workbench documentation initiative by advancing the deployment checklist date to 06/10/2026 with a focus on usage content, and adds a DRAFT versioned docset entry in mkdocs.yml that imports the ai-dba-workbench repository from the usage_doc_updates branch. ChangesAI Workbench Documentation Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mkdocs.yml`:
- Line 656: The unversioned redirect is selecting the first nav_item.children
entry whose child.title != 'Development', which picks the "DRAFT" entry from
mkdocs.yml; update overrides/redirect.html so the ns.redirect_url logic also
ignores entries with child.title == 'DRAFT' (or that start with "DRAFT") when
scanning nav_item.children (in addition to skipping 'Development'), or
alternatively rename/move the "DRAFT" entry in mkdocs.yml so it does not appear
before stable versions; adjust the code that sets ns.redirect_url to explicitly
skip child.title values of 'DRAFT' to ensure the redirect targets the latest
stable version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: defd781f-a788-493f-91fa-5d4a49efc8f4
📒 Files selected for processing (2)
deployments.mdmkdocs.yml
| - Development: '!import https://github.com/pgEdge/pgedge-vectorizer?branch=main' | ||
|
|
||
| - AI DBA Workbench: | ||
| - DRAFT: '!import https://github.com/pgEdge/ai-dba-workbench.git?branch=usage_doc_updates' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify redirect template logic for version selection
echo "=== Checking redirect.html template for version skip logic ==="
rg -n -A5 -B5 "child.title != 'Development'" overrides/redirect.html
echo -e "\n=== Checking if DRAFT is mentioned anywhere in redirect logic ==="
rg -n -i "draft" overrides/redirect.html hooks/versioned_redirects.py
echo -e "\n=== AI DBA Workbench nav structure in mkdocs.yml ==="
rg -n -A8 "^ - AI DBA Workbench:" mkdocs.ymlRepository: pgEdge/pgedge-docs
Length of output: 1574
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Inspect overrides/redirect.html around ns.redirect_url usage ==="
# show from where ns.redirect_url is set through where it's used
nl -ba overrides/redirect.html | sed -n '1,220p' | sed -n '1,220p' > /tmp/redirect.html.full
# print key regions
rg -n "redirect_url|docset_slug|nav_item\.title|nav_title_slug" overrides/redirect.html
echo "=== Print sections containing redirect_url assignment and its final rendering ==="
# print from line 1-120 and also around "ns.redirect_url"
nl -ba overrides/redirect.html | awk 'NR>=1 && NR<=120{print}'
echo "----"
nl -ba overrides/redirect.html | awk 'NR>=120 && NR<=220{print}'
echo "----"
# locate end region with redirects
rg -n "ns\.redirect_url" overrides/redirect.html
tail -n +1 overrides/redirect.html | head -n 260
echo "=== Inspect hooks/versioned_redirects.py for how docset redirects are generated ==="
ls -la hooks | head
rg -n "redirect|docset_slug|versioned_redirects|overrides/redirect\.html|template" hooks/versioned_redirects.py
nl -ba hooks/versioned_redirects.py | sed -n '1,260p'
echo "=== Inspect mkdocs.yml for how AI DBA Workbench docset slug is derived (docset_slug usage might come from nav item title) ==="
nl -ba mkdocs.yml | sed -n '620,700p'Repository: pgEdge/pgedge-docs
Length of output: 192
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Inspect overrides/redirect.html around ns.redirect_url usage ==="
rg -n "redirect_url|docset_slug|nav_item|nav_title_slug" overrides/redirect.html
nl -ba overrides/redirect.html | sed -n '1,200p'
echo "=== Inspect hooks/versioned_redirects.py for redirect generation ==="
rg -n "redirect|docset_slug|template|overrides/redirect\.html|ns\.redirect_url" hooks/versioned_redirects.py
nl -ba hooks/versioned_redirects.py | sed -n '1,260p'
echo "=== Print AI DBA Workbench nav snippet from mkdocs.yml ==="
nl -ba mkdocs.yml | sed -n '645,670p'Repository: pgEdge/pgedge-docs
Length of output: 1598
Prevent /ai-dba-workbench/ from redirecting to DRAFT
overrides/redirect.html builds ns.redirect_url by selecting the first nav_item.children entry whose child.title != 'Development'. Since mkdocs.yml lists - DRAFT: before v1.0.0/betas (and Development last), the unversioned docset redirect is likely targeting the DRAFT docset (e.g., /ai-dba-workbench/draft/) instead of the latest stable. Move/rename DRAFT or update the template to also skip DRAFT.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@mkdocs.yml` at line 656, The unversioned redirect is selecting the first
nav_item.children entry whose child.title != 'Development', which picks the
"DRAFT" entry from mkdocs.yml; update overrides/redirect.html so the
ns.redirect_url logic also ignores entries with child.title == 'DRAFT' (or that
start with "DRAFT") when scanning nav_item.children (in addition to skipping
'Development'), or alternatively rename/move the "DRAFT" entry in mkdocs.yml so
it does not appear before stable versions; adjust the code that sets
ns.redirect_url to explicitly skip child.title values of 'DRAFT' to ensure the
redirect targets the latest stable version.
Summary by CodeRabbit
Documentation
Chores