Skip to content

fix(dashboard): correct approvals.mode select options#31933

Open
Hopfensaft wants to merge 1 commit into
NousResearch:mainfrom
Hopfensaft:fix/approvals-mode-dashboard-options
Open

fix(dashboard): correct approvals.mode select options#31933
Hopfensaft wants to merge 1 commit into
NousResearch:mainfrom
Hopfensaft:fix/approvals-mode-dashboard-options

Conversation

@Hopfensaft

Copy link
Copy Markdown

Summary

The web UI CONFIG_SCHEMA in hermes_cli/web_server.py showed ['ask', 'yolo', 'deny'] as the options for approvals.mode. These are stale names that don't correspond to any real config values — and smart mode was entirely missing, making it unreachable from the dashboard.

Changes

  • hermes_cli/web_server.py: corrected approvals.mode options from ['ask', 'yolo', 'deny'] to ['manual', 'smart', 'off'] to match the values defined in hermes_cli/config.py
  • tests/hermes_cli/test_web_server.py: added test_approvals_mode_options_match_config_values to TestBuildSchemaFromConfig to pin the correct option names and guard against future drift

Testing

pytest tests/hermes_cli/test_web_server.py::TestBuildSchemaFromConfig -v
# 9 passed in 0.78s

Verified locally via the dashboard UI — all three options render correctly and selecting each writes the right config value without errors.

Closes #31925

The web UI CONFIG_SCHEMA showed ['ask', 'yolo', 'deny'] for the
approvals.mode select field. These don't match any real config values
and 'smart' mode was entirely unreachable from the dashboard.

Correct the options to ['manual', 'smart', 'off'] which match the
values defined and documented in hermes_cli/config.py.

Adds a regression test to TestBuildSchemaFromConfig to pin the correct
option names and guard against future drift.

Fixes NousResearch#31925
@hclsys

hclsys commented May 25, 2026

Copy link
Copy Markdown

Verified against the config source — this is correct. The real approvals.mode values are confirmed by:

  • hermes_cli/config.py:1440 — default is "mode": "manual" (not ask)
  • hermes_cli/tips.py:117 — "Set approvals.mode: smart to let an LLM auto-approve…" → smart is real and was indeed missing from the dropdown
  • tools/approval.py:1152 (approval_mode == "smart"), :1079/:821 (off) — the runtime branches on exactly manual/smart/off

The old ['ask', 'yolo', 'deny'] were genuinely wrong: yolo is a session toggle/flag (/yolo, HERMES_YOLO_MODE), not a mode value, and deny is the default for the separate approvals.cron_mode field (config.py:1442), not mode. So manual/smart/off is the right canonical set for the dropdown.

One optional note (not blocking): tools/approval.py:859 leniently also accepts {"approve", "off", "allow", "yes"} — but that's the cron_mode parse path and those read as tolerant aliases rather than intended UI options, so keeping the dashboard to the three canonical values is the right call. The drift-guard test is a good addition. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard UI: approvals.mode missing 'smart' option, shows stale option names

3 participants