diff --git a/gateway/display_config.py b/gateway/display_config.py index 181ce3dbbc0..e352ea0e9d6 100644 --- a/gateway/display_config.py +++ b/gateway/display_config.py @@ -239,6 +239,10 @@ def _normalise(setting: str, value: Any) -> Any: if value is True: return "all" val = str(value).strip().lower() + if val in {"false", "0", "no"}: + return "off" + if val in {"true", "1", "yes", "on"}: + return "all" return val if val in {"off", "new", "all", "verbose", "log"} else "all" if setting in { "show_reasoning", @@ -246,6 +250,7 @@ def _normalise(setting: str, value: Any) -> Any: "interim_assistant_messages", "long_running_notifications", "busy_ack_detail", + "busy_steer_ack_enabled", "thinking_progress", }: if isinstance(value, str): diff --git a/tests/gateway/test_display_config.py b/tests/gateway/test_display_config.py index 4f2848eacdd..d05807e41a7 100644 --- a/tests/gateway/test_display_config.py +++ b/tests/gateway/test_display_config.py @@ -54,6 +54,22 @@ class TestResolveDisplaySetting: # Unknown platform, no config → global default "all" assert resolve_display_setting(config, "unknown_platform", "tool_progress") == "all" + def test_tool_progress_boolean_like_strings_normalise(self): + """Quoted YAML booleans should not unexpectedly enable progress.""" + from gateway.display_config import resolve_display_setting + + assert resolve_display_setting({"display": {"tool_progress": "false"}}, "telegram", "tool_progress") == "off" + assert resolve_display_setting({"display": {"tool_progress": "0"}}, "telegram", "tool_progress") == "off" + assert resolve_display_setting({"display": {"tool_progress": "no"}}, "telegram", "tool_progress") == "off" + assert resolve_display_setting({"display": {"tool_progress": "true"}}, "telegram", "tool_progress") == "all" + + def test_busy_steer_ack_enabled_string_false_normalises(self): + from gateway.display_config import resolve_display_setting + + config = {"display": {"platforms": {"telegram": {"busy_steer_ack_enabled": "false"}}}} + + assert resolve_display_setting(config, "telegram", "busy_steer_ack_enabled", True) is False + def test_fallback_parameter_used_last(self): """Explicit fallback is used when nothing else matches.""" from gateway.display_config import resolve_display_setting