[Bug]: [Policy Hub] In-page anchor links in policy docs go to the Policy Hub home page instead of the section
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- html, typescript
- Área
- frontend
Línea de trabajo
Start with frontend/index.html, MarkdownRenderer.tsx, and TableOfContents.tsx, which the issue identifies as the sources of the two failures. Trace how fragment links are resolved with the base URL and when policy headings receive IDs after docs load. Reproduce using the llm-cost policy link, then verify both clicking an in-page link and opening a policy URL with a fragment land on the section.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Please select the area the issue is related to
Gateway
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI), Aspect/UX (User experience, flows, usability, clarity)
Description
In-page anchor links in policy docs, such as [Adding Your Own Pricing](#adding-your-own-pricing), don't work on the Policy Hub. Clicking one loads the hub's home page instead of jumping to the section. The links are standard markdown and work on GitHub.
There are two causes, both in the frontend:
<base>redirects fragment links.frontend/index.html(lines 11–25) injects<base href="/api-management/policy-hub/">. With a<base>element, the browser resolves every relative URL against the base URL, fragment-only links included. So#adding-your-own-pricingbecomes/api-management/policy-hub/#adding-your-own-pricing, which is the hub root.MarkdownRenderer.tsxpasses these links through unchanged, because itsurlTransform(line 193) only rewrites URLs that start with..- Sections can't be linked to directly. Opening
/policies/<name>#<section>leaves the page at the top. Docs are fetched after the page has loaded, and headings only getids afterwards, whenTableOfContents.tsxtags them (lines 54–59,h2/h3only). When the browser tries to jump to the fragment, the heading doesn't exist yet.
Impact:
21 of the 72 policies on the hub have these links in their latest published version, 71 links in total:
mtls-auth (14), typesafe-jev-mcp-tool-intent-verification (7), opa-policy (6), typesafe-jev-mcp-tool-result-screening (6), typesafe-jev-tool-filtering (5), aws-authentication (4), jwt-auth (4), semantic-cache (4), typesafe-jev-content-safety (4), oauth2-generator (3), backend-jwt (2), mcp-authz (2), mcp-tool-schema-validator (2), error-response-formatter (1), llm-cost (1), llm-cost-based-ratelimit (1), log-message (1), mcp-auth (1), oauth2-token-exchange (1), opaque-token-auth (1), typesafe-jev-model-routing (1).
16 of these 21 also have older versions with the same links.
Steps to Reproduce
- Open https://choreolabs.com/api-management/policy-hub/policies/llm-cost.
- In the Notes section, click Adding Your Own Pricing.
- Expected: the page scrolls to the "Adding Your Own Pricing" section.
Actual: the browser loads https://choreolabs.com/api-management/policy-hub/#adding-your-own-pricing, the hub's home page. - Open https://choreolabs.com/api-management/policy-hub/policies/llm-cost#adding-your-own-pricing directly.
Expected: the page opens at that section.
Actual: the page stays at the top.
The same happens with any in-page link on the policies above, for example the 14 links on https://choreolabs.com/api-management/policy-hub/policies/mtls-auth.
Severity Level of the Issue
Severity/Minor (Non-critical functionality. Can be fixed in future releases)
Environment Details (with versions)
- Seen in production at https://choreolabs.com/api-management/policy-hub/
- Reproduced locally with the frontend dev server (
npx vite) against the public production API fromfrontend/public/config.js, in Chrome on macOS.
- Lenguaje dominante
- Go
- Estrellas
- 85
- Forks
- 137
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 247
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wso2/api-platform
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
wso2/api-platform#4369 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy acceptsAbiertoArea/Policies Aspect/Other Severity/Trivial Type/Bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
wso2/api-platform#4355 ·
Los mantenedores suelen responder en 1 día
-
Area/Gateway Aspect/API Severity/Minor Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wso2/api-platform#4348 ·
Los mantenedores suelen responder en 1 día
-
Aspect/AI Aspect/API. Severity/Major
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
wso2/api-platform#4343 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: content-length-guardrail policy accepts a non-string streamingJsonPath at API creationAbiertoArea/Policies Aspect/Configuration Severity/Minor Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
wso2/api-platform#4330 ·
Los mantenedores suelen responder en 1 día
Todos los issues de wso2/api-platform
Issues similares
-
benchmark
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
mozilla-ai/cq#601 ·
Los mantenedores suelen responder en 1 día
-
documentation migration
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día