fix(admin): absolute sidebar nav links so /admin URLs don't accumulate (v0.52.2)

The /admin left-rail NavLinks used relative targets (to="users", etc.). Under
the /admin/* nested route a relative link resolves against the current URL, so
each click appended a segment — Users→Allowlist→Graduation yielded
/admin/users/allowlist/graduation instead of /admin/graduation. Use absolute
targets (/admin/<tab>) + `end` for exact active matching.

Patch 0.52.1 → 0.52.2; CHANGELOG updated. Caught by the operator on PPE.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-06-08 20:07:44 -07:00
parent fbaa975b5c
commit 8e207a60e6
6 changed files with 55 additions and 9 deletions
+24
View File
@@ -103,6 +103,17 @@ put_file() {
201 "create $_repo/$_path"
}
# delete_file <repo> <path> — remove the file if it exists (no-op if absent).
delete_file() {
_repo="$1"; _path="$2"
_sha=$(file_sha "$_repo" "$_path")
[ -n "$_sha" ] || { echo "seed-ppe: $_repo/$_path absent, nothing to delete"; return 0; }
echo "seed-ppe: deleting $_repo/$_path"
mutate DELETE "$GITEA/api/v1/repos/$ORG/$_repo/contents/$_path" \
"{\"message\":\"reseed: drop sidecar $_path\",\"sha\":\"$_sha\",\"branch\":\"main\"}" \
200 "delete $_repo/$_path"
}
ensure_repo "$REGISTRY_REPO"
ensure_repo "$CONTENT_REPO"
@@ -182,4 +193,17 @@ tags: [search]
Faceted search scenario.
" "$RESEED"
# RESEED also drops any metadata sidecars (<slug>.meta.yaml) left by prior
# SLICE-4/5 edits. A sidecar takes precedence over the .md frontmatter
# (dual-read, §22.4a), so without this a re-run inherits the edited
# priorities (everything ends up P1) and the faceted preconditions drift —
# SLICE-3 expects P0 count = 2. Dropping the sidecars restores the
# frontmatter as the source of truth: checkout-guest=P0, search-facets=P0,
# checkout-returning=P1.
if [ "$RESEED" = "1" ]; then
for _slug in checkout-guest checkout-returning search-facets; do
delete_file "$CONTENT_REPO" "bdd/rfcs/$_slug.meta.yaml"
done
fi
echo "seed-ppe: done. Set REGISTRY_REPO=$REGISTRY_REPO on rfc-app-ppe and redeploy."