From 69d3cc765977f6f9c4f468fa8362ba6a6f744a14 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Thu, 16 Jul 2026 17:51:17 +0000 Subject: [PATCH] docs(dashboard-api): fix misleading refresh_toggles docstring The docstring claimed this endpoint was "kept for backwards-compat with the dashboard's manual ping path," but rg turns up no frontend call site for /notifications/refresh-toggles anywhere in dashboard-frontend. The auto-refresh middleware (_auto_refresh_toggle_filter, registered via register_config_routes_hooks) already refreshes the ToggleFilter on every successful notifications config PUT, covering the normal case. Endpoint is untouched -- comment only, kept for ops/debug use. --- work/meshai/dashboard/api/config_routes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/work/meshai/dashboard/api/config_routes.py b/work/meshai/dashboard/api/config_routes.py index fc183f7..8cd9d9e 100644 --- a/work/meshai/dashboard/api/config_routes.py +++ b/work/meshai/dashboard/api/config_routes.py @@ -335,8 +335,10 @@ def _refresh_mesh_context(app, new_ctx_cfg) -> bool: @router.post("/notifications/refresh-toggles") async def refresh_toggles(request: Request): - """Explicit refresh endpoint (kept for backwards-compat with the - dashboard's manual ping path).""" + """Explicit refresh endpoint. Not called by the dashboard frontend -- + the _auto_refresh_toggle_filter middleware below already refreshes the + ToggleFilter automatically on every successful notifications config PUT. + Kept for ops/debug use (manually forcing a refresh outside that path).""" bus = getattr(request.app.state, "bus", None) config = getattr(request.app.state, "config", None) if bus is None or config is None: