Skip to content

πŸ› fix(dashboard): controls for settings only the admin MCP could change (no_ci_ok, Let hive decide per-repo and timeout, NO_GITHUB mode) - #17560

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/dashboard-mcp-parity-controls
Nov 10, 2026

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

Andy asked for dashboard and admin MCP parity. These are the settings the admin MCP could change and the dashboard could not show or change. This PR adds the missing dashboard controls. It only changes the dashboard: no endpoint, request field or server behaviour changes. Each control saves through the endpoint the MCP operation already uses, and a save never wipes values the page did not touch.

New control Where Sets How it saves
Merge with no CI Settings β†’ Features β†’ Auto-merge β†’ Per-repository merge policy auto_merge.no_ci_ok PUT /api/config/auto-merge, the full list, only when the selection changed
Unprotected base (no effect) same block, shown only while the list is set auto_merge.allow_unprotected_base (a deprecated no-op) same; lets an owner see and clear it
Per-repository overrides table (hive-wide / on / off) Settings β†’ Features β†’ Let hive decide decisions.delegate.repos PUT /api/config/decisions/delegate, the full merged map (all saved overrides plus the edits)
Effect timeout same section decisions.delegate.effect_timeout same endpoint; checked like the server checks it (empty, or a duration above zero)
NO_GITHUB option Agent β†’ Operating Mode agents.<key>.mode unchanged; the option is listed only for an agent whose mode is already NO_GITHUB

Refs #17555 #17556

What went wrong

An audit of origin/v6 at 9850cfb compared what the admin MCP operations can change with what the dashboard can change:

  • auto_merge.no_ci_ok and allow_unprotected_base: the API GET returned them and the PUT accepted them, but no dashboard control showed or changed them. no_ci_ok matters because it lets a repository's PRs merge with no CI checks at all.
  • Let hive decide showed the per-repository overrides as read-only text ("change them in hive.yaml or with the admin MCP"). It had no control for the effect timeout, and the save never sent either one.
  • An agent set to NO_GITHUB through the API or MCP showed "use level default" in the Operating Mode select, because the select had no option for that mode.
  • A comment in adminmcp/tools_config_surface_ops.go said decisions.delegate had no dashboard write endpoint. It has one: PUT /api/config/decisions/delegate.

What changes

  • Auto-merge: two multi-selects use the same repository options as Squash only and Require current base. markDirtyAutoMergeRepoPolicy stages a list only when its own select changes. The PUT leaves an absent key alone and replaces a key that is sent, so an untouched save keeps both lists. A bare repository name in hive.yaml, such as docs instead of org/docs, now shows as that repository selected. Before, it showed as a separate extra entry.
  • Let hive decide: the table has one row per project repository, plus a row for any saved override outside project.repos. The new decisionsDelegateSaveBody builds the PUT body. Because the endpoint replaces the repos map, a table edit sends every saved override plus the edits. A row set back to hive-wide drops out. A bare key from hive.yaml is replaced, not duplicated, so the server never sees the same repository twice.
  • Operating Mode: NO_GITHUB is a legacy alias for ADVISORY (crux/agentmode). The select lists it only for an agent that already has it, and its emoji matches ADVISORY's. New agents are not offered the alias.
  • The stale adminmcp comment is corrected.

Contributor agent role, grants and requeue are not in this PR. The audit missed that the hive's /contribute page already has these controls in the Management & Operations fleet row: "Acting as", grant chips with "+ grant", and Reassign. They call the same agent-role, agent-role-grants and requeue endpoints. The one gap is that those rows only list connected contributors. Adding the controls to the main dashboard's Contributors cards can be a follow-up if wanted.

Files

  • static-src/js/config-features.js, config-helpers.js, linear-repos-save.js, config-agent.js, debug-logs.js, plus the regenerated static/index.html. Concatenating manifest.txt reproduces it byte for byte; I checked with cmp.
  • settings_parity_allowlist.txt: dropped auto_merge.no_ci_ok[] and auto_merge.allow_unprotected_base[], because the Settings page now references both.
  • Docs: hive-merge.md (per-repository merge policy), dashboard-sections/activity-monitor.md (Let hive decide settings), agent-configuration.md (mode list). Changelog: changelog.d/fixed-dashboard-mcp-parity-controls.md.

Tests

dashboard_mcp_parity_controls_test.go runs the shipped JavaScript in node. It uses stub objects and does not regex-match markup:

  • TestDashboardParityAutoMergeNoCIAndUnprotectedBaseStageFullLists: the controls render, an unrelated edit stages neither key, and an edit stages the full selection. Fails on the tip because the Features renderer has no am-no-ci-ok control.
  • TestDashboardParityDelegateSaveSendsFullReposMapAndEffectTimeout: checks the table rows, that an untouched save sends no repos, that a row edit sends the full merged map, that hive-wide drops a row and a bare key is replaced, and that the timeout is checked. Fails on the tip because markDirtyDecisionsDelegateRepo and decisionsDelegateSaveBody do not exist there.
  • TestDashboardParityOperatingModeShowsNoGitHub: an agent with NO_GITHUB gets that option selected, and the alias is not offered to an ADVISORY agent. Fails on the tip because the select has no NO_GITHUB option, so "use level default" is selected.

Merge note

Sibling PR #17559 also edits static-src (config-sentinel.js, config-state.js), settings_parity_allowlist.txt and static/index.html. It touches different lines, but whichever PR merges second needs a v6 merge and a regenerated static/index.html (concatenate manifest.txt, then cmp).

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

The admin MCP could change these settings, but the dashboard could not show
or change them:

- Settings β†’ Features β†’ Auto-merge β†’ Per-repository merge policy gets
  "Merge with no CI" (auto_merge.no_ci_ok) and, only while it is set, the
  deprecated auto_merge.allow_unprotected_base list, marked as having no
  effect so an owner can clear it. Both stage the full selection only when
  changed; an untouched save still omits them, so the server keeps them.
  A bare repository name from hive.yaml now selects that repository.
- Settings β†’ Features β†’ Let hive decide gets a per-repository
  on / off / hive-wide table (decisions.delegate.repos) and an Effect
  timeout (decisions.delegate.effect_timeout). The PUT replaces the repos
  map whole, so a table edit sends every saved override plus the edits.
  The timeout is checked like the server checks it before sending.
- Agent β†’ Operating Mode lists NO_GITHUB (a legacy alias for ADVISORY)
  for an agent that has it, instead of showing "use level default".
- Fix the adminmcp comment that said decisions.delegate had no dashboard
  write endpoint.

No endpoint or server behaviour changes. static/index.html regenerated by
the manifest concatenation (cmp-identical).

Refs hivecommons#17555 hivecommons#17556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 10, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#17506 🌱 Top up v6 with v5 (durable hosted hive.yaml, shared-CI deferral naming and 118 more) same files src/docs/agent-configuration.md
src/docs/dashboard-sections/activity-monitor.md
src/docs/hive-merge.md
src/pkg/dashboard/static/index.html

Brings in hivecommons#17559 (write-back kind table). Clean merge; static/index.html
still equals the manifest concatenation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read this against v6 with the server handlers open rather than the diff alone; the "dashboard only, no endpoint change" claim holds and the wiring is correct. Looks correct to me.

What I verified:

  • Auto-merge lists. PUT /api/config/auto-merge already accepts both keys and leaves an absent one alone (api_config_automerge.go:407-412), and the GET already returns them (:604-605). linear-repos-save.js:968-975 sends _configState.dirty['auto-merge'] as-is, so the two new markDirty calls in config-helpers.js:441-442 reach the server exactly like squash_only does. Staging only on the select's own this.id means an untouched save keeps both lists, as the body says.
  • Let hive decide. The JS contract matches the server: decisionsDelegateRepos (api_config_decisions_delegate.go:274-313) treats repos as the FULL map, qualifies bare names with project.org, and refuses the same repo twice. decisionsDelegateReposBody deletes any saved key matching via decisionsDelegateSameRepo before re-adding, so a bare docs key plus a staged org/docs row never reaches the duplicate check. effect_timeout validation mirrors :255-264 (empty, or a positive Go duration).
  • NO_GITHUB. api_agent_config.go:679 already accepts it on PUT, so the select offering it only when g.mode === 'NO_GITHUB' cannot produce a value the server rejects, and new agents are not offered the alias.
  • static/index.html hunks match static-src byte-for-byte for the lines changed; verify PR contents is green.

One cosmetic thing, low:

  • config-features.js:620 (and the same line in index.html:67099): <code>auto_merge.allow_unprotected_base[]</code>,<code>… is missing the space after the comma, so the rendered YAML-keys help line runs two keys together. Optional to fix here.

Merge note in the body is accurate: #17559 touches settings_parity_allowlist.txt and index.html on different lines; whichever lands second will need a regenerated index.html.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 51963ab into hivecommons:v6 Nov 10, 2026
70 of 71 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#175600aa1403` sha256:4bf38f173e4140cecf2e05b444ff366c6ee852bbd9dc685e0aee13338e9a7168 β€” download from the dashboard or `hivectl review evidence #17560`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at 0aa1403.

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant