From 343068eb10c24c7bff2a1f1e6301cac0fc6ed587 Mon Sep 17 00:00:00 2001 From: thatssoheil Date: Fri, 7 Aug 2026 18:49:43 -0400 Subject: [PATCH] fix(petdex): cover the CLI pet pane and status-line signature too Review follow-up: _pet_resolve_config (cli.py, the CLI pet pane gate) and _pet_sig (tui_gateway/server.py, the status-line 'off' signature) read display.pet.enabled with bare bool/truthiness, so a quoted 'false' still enabled the mascot on the CLI surface. Route both through is_truthy_value (default False) like the other three sites. --- cli.py | 4 +++- tui_gateway/server.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli.py b/cli.py index 8b9661f023..f807ccb76f 100644 --- a/cli.py +++ b/cli.py @@ -6115,7 +6115,9 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin, CLIBillingMixin): display = cfg.get("display", {}) if isinstance(cfg.get("display"), dict) else {} pet_cfg = display.get("pet", {}) if isinstance(display.get("pet"), dict) else {} - enabled = bool(pet_cfg.get("enabled")) + from utils import is_truthy_value + + enabled = is_truthy_value(pet_cfg.get("enabled"), default=False) slug = str(pet_cfg.get("slug", "") or "") scale = float(pet_cfg.get("scale", constants.DEFAULT_SCALE) or constants.DEFAULT_SCALE) cols = constants.resolve_cols(scale, pet_cfg.get("unicode_cols", 0)) diff --git a/tui_gateway/server.py b/tui_gateway/server.py index 9a05c1ee4f..2375c91fcc 100644 --- a/tui_gateway/server.py +++ b/tui_gateway/server.py @@ -3562,7 +3562,7 @@ def _pet_sig() -> tuple: hatch flow rebuilds a sheet, or the scale changes.""" display = _load_cfg().get("display") or {} pet_cfg = display.get("pet") if isinstance(display.get("pet"), dict) else {} - if not pet_cfg or not pet_cfg.get("enabled"): + if not pet_cfg or not is_truthy_value(pet_cfg.get("enabled"), default=False): return ("off",) try: enabled, pet, scale = _pet_active_selection()