diff --git a/routes/umbrella.py b/routes/umbrella.py index 90c473b..2dda0d6 100644 --- a/routes/umbrella.py +++ b/routes/umbrella.py @@ -26,12 +26,18 @@ def _repo_root() -> Path: def register(api): - """Wire umbrella panel + APIs.""" + """Wire umbrella panel + APIs. + + Note: the panel HTML lives at /plugins/svrnty/umbrella.html (served via + register_static). The /umbrella top-level route would require a non-/api/ + handler, which the plugin loader doesn't allow (see SVRNTY-PLUGIN-PROTOCOL + §5.1 — register_route only accepts /api/*). Frontend nav links directly to + /plugins/svrnty/umbrella.html. + """ log = api.logger("svrnty.routes.umbrella") - api.register_route("/umbrella", "GET", _handle_panel_html) api.register_route("/api/umbrella", "GET", _handle_graph_json) api.register_route("/api/umbrella/doc", "GET", _handle_doc_body) - log.info("umbrella panel + APIs registered") + log.info("umbrella APIs registered") def _send(handler, status: int, body: bytes, content_type: str) -> None: @@ -101,11 +107,3 @@ def _handle_doc_body(handler, parsed) -> bool: }).encode("utf-8") _send(handler, 200, body, "application/json; charset=utf-8") return True - - -def _handle_panel_html(handler, parsed) -> bool: - """Serve the static umbrella.html via Location redirect (assets live in static/).""" - handler.send_response(302) - handler.send_header("Location", "/plugins/svrnty/umbrella.html") - handler.end_headers() - return True