From 00191c8d7ab440be820e22e23f73449be31d7223 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Mon, 3 Aug 2026 00:03:48 +0200 Subject: [PATCH] [fix](trx-frontend-http): serve the Statistics and Bookmarks routes The server answers /, /map, /digital-modes, /recorder, /settings and /about with the application shell, but never had a route for /statistics or /bookmarks. Both fell through to the catch-all asset handler, so reloading on either one downloaded a file instead of reopening the page. Only in-app navigation worked, which is why it went unnoticed until Statistics was reachable from the Tools menu. Add the two missing shell routes. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01GdyUjuXejCEfiub675z6cz Signed-off-by: Stan Grams --- .../trx-frontend/trx-frontend-http/src/api/assets.rs | 12 ++++++++++++ .../trx-frontend/trx-frontend-http/src/api/mod.rs | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/src/api/assets.rs b/src/trx-client/trx-frontend/trx-frontend-http/src/api/assets.rs index 7f5c1c7a..2f84d383 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/src/api/assets.rs +++ b/src/trx-client/trx-frontend/trx-frontend-http/src/api/assets.rs @@ -95,6 +95,18 @@ pub(crate) async fn about_index(req: HttpRequest) -> impl Responder { static_asset_response(&req, "text/html; charset=utf-8", c) } +#[get("/statistics")] +pub(crate) async fn statistics_index(req: HttpRequest) -> impl Responder { + let c = gz_index_html(); + static_asset_response(&req, "text/html; charset=utf-8", c) +} + +#[get("/bookmarks")] +pub(crate) async fn bookmarks_index(req: HttpRequest) -> impl Responder { + let c = gz_index_html(); + static_asset_response(&req, "text/html; charset=utf-8", c) +} + // --------------------------------------------------------------------------- // Favicon & logo // --------------------------------------------------------------------------- diff --git a/src/trx-client/trx-frontend/trx-frontend-http/src/api/mod.rs b/src/trx-client/trx-frontend/trx-frontend-http/src/api/mod.rs index 528f313b..e79233e1 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/src/api/mod.rs +++ b/src/trx-client/trx-frontend/trx-frontend-http/src/api/mod.rs @@ -637,6 +637,8 @@ pub fn configure(cfg: &mut web::ServiceConfig) { .service(assets::recorder_index) .service(assets::settings_index) .service(assets::about_index) + .service(assets::statistics_index) + .service(assets::bookmarks_index) .service(assets::favicon) .service(assets::favicon_png) .service(assets::logo)