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.
This commit is contained in:
Matt Johnson 2026-07-16 17:51:17 +00:00
commit 69d3cc7659

View file

@ -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: