fix(web): docs admin route 404 + catalog link on wrong apps (BUNYIP-390) #384

Merged
nrupard merged 2 commits from fix/BUNYIP-388-docs-admin-route-and-catalog-link into main 2026-07-21 20:11:00 +02:00
Owner

Bugs (BUNYIP-388 follow-up)

  1. Admin docs manager 404. The bunyip-web admin handlers, the "Manage documentation" link, and the bunyip-api routes all shipped, but the matching bunyip-web routes were never registered in main.rs. Admin -> Applications -> Mokosh Server / Mokosh Web -> Manage documentation hit an unrouted path and rendered the 404 page.
  2. Catalog Documentation link on the wrong apps. The link lived in app_card, which renders only hosted launch-tile apps (is_hosted = true, e.g. Mokosh), so it appeared on the hosted web app that has no docs and was missing on the OCI/catalog apps that do (Mokosh Server / Web, rendered via download_only_card).

Fix

  • Register the three admin docs routes in bunyip-web main.rs: GET+POST /admin/applications/:id/docs, POST /admin/applications/:id/docs/:doc_id, POST /admin/applications/:id/docs/:doc_id/delete.
  • Move the Documentation link from app_card to download_only_card, so it renders on the pulled/downloaded apps (Mokosh Server / Web) and not the hosted tile.

Verified

Build + clippy + fmt green. Two files, +17/-4.

## Bugs (BUNYIP-388 follow-up) 1. **Admin docs manager 404.** The bunyip-web admin handlers, the "Manage documentation" link, and the bunyip-api routes all shipped, but the matching bunyip-web routes were never registered in `main.rs`. Admin -> Applications -> Mokosh Server / Mokosh Web -> Manage documentation hit an unrouted path and rendered the 404 page. 2. **Catalog Documentation link on the wrong apps.** The link lived in `app_card`, which renders only hosted launch-tile apps (`is_hosted = true`, e.g. Mokosh), so it appeared on the hosted web app that has no docs and was missing on the OCI/catalog apps that do (Mokosh Server / Web, rendered via `download_only_card`). ## Fix - Register the three admin docs routes in bunyip-web `main.rs`: GET+POST `/admin/applications/:id/docs`, POST `/admin/applications/:id/docs/:doc_id`, POST `/admin/applications/:id/docs/:doc_id/delete`. - Move the Documentation link from `app_card` to `download_only_card`, so it renders on the pulled/downloaded apps (Mokosh Server / Web) and not the hosted tile. ## Verified Build + clippy + fmt green. Two files, +17/-4.
fix(web): register admin docs routes + move catalog docs link to OCI apps (BUNYIP-390)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 32s
Check / fmt + clippy + build + tests (pull_request) Successful in 3m53s
11b4d6ee7e
Two defects from the BUNYIP-388 per-application docs feature.

The bunyip-web admin docs-manager handlers and the "Manage documentation" link existed, and the bunyip-api routes existed, but the matching bunyip-web routes were never registered in main.rs, so opening the manager from an app's admin edit page hit an unrouted path and rendered the 404 page. Register GET+POST /admin/applications/:id/docs, POST /admin/applications/:id/docs/:doc_id, and POST /admin/applications/:id/docs/:doc_id/delete alongside the other admin application routes.

The catalog "Documentation" link lived in app_card, which renders only hosted launch-tile apps (is_hosted = true, e.g. Mokosh), so it showed on the hosted web app that has no docs and was absent on the OCI/catalog distribution apps that do (Mokosh Server, Mokosh Web; is_hosted = false, rendered via download_only_card). Move the link to download_only_card so it appears on the pulled/downloaded apps and not the hosted tile.

#BUNYIP-390

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(web): gate the catalog Documentation link on a has_docs flag (BUNYIP-391)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 33s
Check / fmt + clippy + build + tests (pull_request) Successful in 3m50s
Create release / Create release from merged PR (pull_request) Has been skipped
7de67b63e1
BUNYIP-390 moved the catalog Documentation link onto download_only_card (the OCI/catalog apps) but showed it unconditionally, so an app with no pages (mokosh-api) still linked to the "Sorry. No docs for this app yet" page.

Add a has_docs boolean to the download-group data. list_all_downloads fetches the set of application ids that have docs in one query (ApplicationDocRepository::app_ids_with_docs), and build_download_group sets AppDownloadGroup.has_docs from it. bunyip-web deserializes has_docs (serde default for back-compat) and download_only_card renders the Documentation link only when it is true. Now the link shows on Mokosh Server and Mokosh Web (which have docs) and not on docless catalog apps.

#BUNYIP-391

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard deleted branch fix/BUNYIP-388-docs-admin-route-and-catalog-link 2026-07-21 20:11:01 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!384
No description provided.