Add additional api menu entries#255
Conversation
📝 WalkthroughWalkthroughAPI documentation navigation is expanded with new xref entries for the ChangesAPI Reference Navigation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 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)
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. Comment |
There was a problem hiding this comment.
Pull request overview
Adds new API reference navigation entries so the documentation site exposes the newly documented Budgets and Accountability API operations (as referenced in the linked decidim/decidim PRs).
Changes:
- Add Budgets API reference menu group with Budget and Project CRUD operation links.
- Add Accountability API reference menu group with Result and Milestone CRUD operation links.
Comments suppressed due to low confidence (1)
docs/en/modules/ROOT/nav.adoc:270
- The action links under Accountability are ordered Create → Delete → Update. For consistency with other action lists in this same section, consider reordering to Create → Update → Delete.
****** xref:develop:api/reference/components/accountability/create.adoc[Create Result]
****** xref:develop:api/reference/components/accountability/delete.adoc[Delete Result]
****** xref:develop:api/reference/components/accountability/update.adoc[Update Result]
****** xref:develop:api/reference/components/accountability/milestone/create.adoc[Create Milestone]
****** xref:develop:api/reference/components/accountability/milestone/update.adoc[Update Milestone]
****** xref:develop:api/reference/components/accountability/milestone/delete.adoc[Delete Milestone]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 `@docs/en/modules/ROOT/nav.adoc`:
- Around line 257-270: The new xrefs in docs/en/modules/ROOT/nav.adoc reference
non-existent pages (e.g.,
develop:api/reference/components/accountability/create.adoc,
develop:api/reference/components/accountability/milestone/create.adoc,
develop:api/reference/components/budgets/create.adoc,
develop:api/reference/components/budgets/projects/create.adoc); either change
those xref targets to the actual existing docs under admin (for example point to
admin pages like
docs/en/modules/admin/pages/components/accountability/results.adoc or
docs/en/modules/admin/pages/components/budgets/projects.adoc) or add the missing
develop:api/reference/... .adoc files so the xrefs resolve; update the lines
that list the xrefs in docs/en/modules/ROOT/nav.adoc to use the correct target
strings or ensure the matching files are created with the expected names.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7855dd46-52ca-4f82-93ac-97841eea417e
📒 Files selected for processing (1)
docs/en/modules/ROOT/nav.adoc
| ***** xref:develop:api/reference/components/accountability.adoc[Accountability] | ||
| ****** xref:develop:api/reference/components/accountability/create.adoc[Create Result] | ||
| ****** xref:develop:api/reference/components/accountability/update.adoc[Update Result] | ||
| ****** xref:develop:api/reference/components/accountability/delete.adoc[Delete Result] | ||
| ****** xref:develop:api/reference/components/accountability/milestone/create.adoc[Create Milestone] | ||
| ****** xref:develop:api/reference/components/accountability/milestone/update.adoc[Update Milestone] | ||
| ****** xref:develop:api/reference/components/accountability/milestone/delete.adoc[Delete Milestone] | ||
| ***** xref:develop:api/reference/components/budgets.adoc[Budgets] | ||
| ****** xref:develop:api/reference/components/budgets/create.adoc[Create Budget] | ||
| ****** xref:develop:api/reference/components/budgets/update.adoc[Update Budget] | ||
| ****** xref:develop:api/reference/components/budgets/delete.adoc[Delete Budget] | ||
| ****** xref:develop:api/reference/components/budgets/projects/create.adoc[Create Project] | ||
| ****** xref:develop:api/reference/components/budgets/projects/update.adoc[Update Project] | ||
| ****** xref:develop:api/reference/components/budgets/projects/delete.adoc[Delete Project] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify all new API reference files exist in the repository
# Define the base path for API reference docs
BASE_PATH="docs/en/modules/develop/pages/api/reference/components"
# Check accountability files
echo "=== Checking Accountability files ==="
fd -t f "accountability.adoc" "$BASE_PATH"
fd -t f "create.adoc" "$BASE_PATH/accountability"
fd -t f "update.adoc" "$BASE_PATH/accountability"
fd -t f "delete.adoc" "$BASE_PATH/accountability"
fd -t f "create.adoc" "$BASE_PATH/accountability/milestone"
fd -t f "update.adoc" "$BASE_PATH/accountability/milestone"
fd -t f "delete.adoc" "$BASE_PATH/accountability/milestone"
# Check budgets files
echo "=== Checking Budgets files ==="
fd -t f "budgets.adoc" "$BASE_PATH"
fd -t f "create.adoc" "$BASE_PATH/budgets"
fd -t f "update.adoc" "$BASE_PATH/budgets"
fd -t f "delete.adoc" "$BASE_PATH/budgets"
fd -t f "create.adoc" "$BASE_PATH/budgets/projects"
fd -t f "update.adoc" "$BASE_PATH/budgets/projects"
fd -t f "delete.adoc" "$BASE_PATH/budgets/projects"
# List all files to see what's actually there
echo "=== All files in components directory ==="
tree -L 4 "$BASE_PATH" || find "$BASE_PATH" -type f -name "*.adoc" | sortRepository: decidim/documentation
Length of output: 2567
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
# Filenames referenced by the new xrefs (relative to the xref "components/...")
files=(
"accountability.adoc"
"accountability/create.adoc"
"accountability/update.adoc"
"accountability/delete.adoc"
"accountability/milestone/create.adoc"
"accountability/milestone/update.adoc"
"accountability/milestone/delete.adoc"
"budgets.adoc"
"budgets/create.adoc"
"budgets/update.adoc"
"budgets/delete.adoc"
"budgets/projects/create.adoc"
"budgets/projects/update.adoc"
"budgets/projects/delete.adoc"
)
echo "=== Repo matches for each referenced filename ==="
for f in "${files[@]}"; do
name="$(basename "$f")"
echo "--- $f (looking for *$name) ---"
# Prefer exact relative match if present; otherwise show all occurrences of the basename.
# (Avoid huge output by limiting to first 50 matches per file.)
matches="$(fd -t f "$name" . --hidden --follow 2>/dev/null | head -n 50 || true)"
if [[ -z "${matches}" ]]; then
echo "MISSING: no matches for *${name}"
else
echo "$matches" | sed 's#^./##'
fi
done
echo "=== Attempt exact path matches for each xref-derived path ==="
# Try to resolve the exact xref-derived paths that the original script assumed:
# docs/en/modules/develop/pages/api/reference/components/<f>
BASE="docs/en/modules/develop/pages/api/reference/components"
for f in "${files[@]}"; do
p="$BASE/$f"
if [[ -f "$p" ]]; then
echo "OK: $p"
else
echo "MISSING: $p"
fi
doneRepository: decidim/documentation
Length of output: 3957
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
# Search for exact xref target paths used in nav.adoc
rg -n --hidden --no-ignore-vcs -S "accountability/create\.adoc|accountability/update\.adoc|accountability/delete\.adoc|accountability/milestone/(create|update|delete)\.adoc|budgets/(create|update|delete)\.adoc|budgets/projects/(create|update|delete)\.adoc" docs/en/modules/ROOT/nav.adoc . \
|| true
# Also show whether there are any files named exactly create.adoc/update.adoc/delete.adoc (anywhere)
echo "=== Any files named exactly create.adoc/update.adoc/delete.adoc ==="
fd -t f "create.adoc" . --hidden --follow || true
fd -t f "update.adoc" . --hidden --follow || true
fd -t f "delete.adoc" . --hidden --follow || trueRepository: decidim/documentation
Length of output: 3115
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
# 1) Check whether the originally assumed api reference components directory exists
echo "=== Directory existence checks ==="
for p in \
"docs/en/modules/develop/pages/api/reference" \
"docs/en/modules/develop/pages/api/reference/components" \
"docs/en/modules/develop/pages/api/reference/components/accountability" \
"docs/en/modules/develop/pages/api/reference/components/budgets" ; do
if [[ -d "$p" ]]; then
echo "OK DIR: $p"
else
echo "MISSING DIR: $p"
fi
done
# 2) Find any files under develop api reference that mention accountability/budgets
echo "=== Files under develop api reference mentioning accountability/budgets ==="
if [[ -d "docs/en/modules/develop/pages/api/reference" ]]; then
find docs/en/modules/develop/pages/api/reference -type f \( -name "*accountability*" -o -name "*budgets*" \) -maxdepth 8 | sort | sed -n '1,200p'
else
echo "SKIP: docs/en/modules/develop/pages/api/reference does not exist"
fi
# 3) Search for the exact xref targets (path-like) as strings across repo
echo "=== String search for xref targets ==="
rg -n --hidden --no-ignore-vcs "api/reference/components/accountability/create\.adoc|api/reference/components/accountability/update\.adoc|api/reference/components/accountability/delete\.adoc|api/reference/components/accountability/milestone/create\.adoc|api/reference/components/accountability/milestone/update\.adoc|api/reference/components/accountability/milestone/delete\.adoc|api/reference/components/budgets/create\.adoc|api/reference/components/budgets/update\.adoc|api/reference/components/budgets/delete\.adoc|api/reference/components/budgets/projects/create\.adoc|api/reference/components/budgets/projects/update\.adoc|api/reference/components/budgets/projects/delete\.adoc" . || true
# 4) Search for any .adoc files whose basename is create.adoc/update.adoc/delete.adoc inside api/reference
echo "=== Basename checks for create/update/delete under api/reference ==="
if [[ -d "docs/en/modules/develop/pages/api/reference" ]]; then
fd -t f "create.adoc" docs/en/modules/develop/pages/api/reference --hidden --follow | head -n 200 || true
fd -t f "update.adoc" docs/en/modules/develop/pages/api/reference --hidden --follow | head -n 200 || true
fd -t f "delete.adoc" docs/en/modules/develop/pages/api/reference --hidden --follow | head -n 200 || true
fiRepository: decidim/documentation
Length of output: 2136
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
echo "=== Case-insensitive existence of create/update/delete .adoc anywhere ==="
for pat in "create.adoc" "update.adoc" "delete.adoc"; do
echo "--- Searching for *${pat} (case-insensitive) ---"
fd -t f -i "$pat" . --hidden --follow | head -n 200 || true
done
echo "=== Inspect existing accountability directories/files (admin pages) ==="
for p in \
"docs/en/modules/admin/pages/components/accountability" \
"docs/en/modules/admin/pages/components/budgets" \
"docs/en/modules/admin/pages/components/budgets/projects" ; do
if [[ -d "$p" ]]; then
echo "=== tree: $p ==="
tree -L 6 "$p" || true
else
echo "MISSING DIR: $p"
fi
done
echo "=== Find all accountability* and budgets* paths under docs/en/modules/*/pages/components ==="
find docs/en/modules -path "*/pages/components/*" -type f \( -iname "*accountability*" -o -iname "*budgets*" \) | sort | head -n 200 || trueRepository: decidim/documentation
Length of output: 1085
Fix broken xref targets for new accountability/budgets API reference pages
docs/en/modules/ROOT/nav.adoc(lines 257-270) adds xrefs todevelop:api/reference/components/.../*.adoc, butdocs/en/modules/develop/pages/api/reference/doesn’t exist in this repo and the referenced files (e.g.,accountability/create.adoc,budgets/projects/create.adoc, etc.) are missing.- The only corresponding content found is under
docs/en/modules/admin/pages/components/(e.g.,accountability/results.adoc,budgets/budgets.adoc,budgets/projects.adoc), so these xrefs will likely 404. - Update the xref targets to the actual existing doc paths or add the missing
develop:api/reference/...pages.
🤖 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 `@docs/en/modules/ROOT/nav.adoc` around lines 257 - 270, The new xrefs in
docs/en/modules/ROOT/nav.adoc reference non-existent pages (e.g.,
develop:api/reference/components/accountability/create.adoc,
develop:api/reference/components/accountability/milestone/create.adoc,
develop:api/reference/components/budgets/create.adoc,
develop:api/reference/components/budgets/projects/create.adoc); either change
those xref targets to the actual existing docs under admin (for example point to
admin pages like
docs/en/modules/admin/pages/components/accountability/results.adoc or
docs/en/modules/admin/pages/components/budgets/projects.adoc) or add the missing
develop:api/reference/... .adoc files so the xrefs resolve; update the lines
that list the xrefs in docs/en/modules/ROOT/nav.adoc to use the correct target
strings or ensure the matching files are created with the expected names.
This PR adds the docs links for the work done in:
Summary by CodeRabbit
accountabilitycomponent documentation to the API reference, including CRUD operations and milestone management guides.budgetscomponent documentation with create, update, delete operations and nested project management documentation.