Problem/Motivation

site_doctor.settings has grown to seven keys (config_workflow, dormant_account_days, disabled_checks, persist_info_findings, collection.interval, retention.resolved_findings_days, retention.run_days), and the README's answer is still "no UI yet — use drush config:set". That was fine when the module was drush-only, but the report page at /admin/reports/site-doctor created a browser audience: site administrators can now see everything and change nothing. Disabling a noisy check or tuning retention should not require CLI access.

Steps to reproduce

Visit /admin/config as an administrator: Site Doctor appears nowhere. Every setting change requires drush or a config export round-trip.

Proposed resolution

A ConfigFormBase settings form at /admin/config/development/site-doctor (developer-tooling territory, alongside modules like webprofiler), menu-linked, plus a "Settings" link on the report page for users who hold the new permission.

  • New permission administer site doctor, restrict-access flagged: disabled_checks can silence security checks, which is a privileged act. Deliberately separate from the existing view permission.
  • disabled_checks as checkboxes generated from the discovered check plugins (human labels, grouped by category) — no memorizing plugin IDs.
  • config_workflow as radios carrying the README's "ask yourself" descriptions verbatim, so the declared-vs-inferred contract is explained where it is chosen.
  • collection.interval as a preset select (hourly / every 6 hours / daily / weekly); retention and dormancy thresholds as number fields.
  • Elements wired with #config_target, so the constraints already present in the config schema do the validation.

This also fixes a latent caching bug: the report page's render cache is tagged only with the results-store tag, so a settings change (e.g. a retention horizon, which the page prints) does not refresh it. The form MR adds the settings config's cacheability to the report page build.

Remaining tasks

  • Agree placement (proposed: /admin/config/development/site-doctor) and permission split (proposed: separate restrict-flagged administer site doctor).
  • Implement form + routing + menu link + dashboard link.
  • Functional test: access control, saving each element, checkbox list reflects discovered checks.
  • README: replace the "no UI yet" wording.

User interface changes

New settings form at /admin/config/development/site-doctor; a "Settings" link on /admin/reports/site-doctor for users with the new permission.

API changes

New permission administer site doctor. No service or schema changes — the form edits existing config keys.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

amangrover90 created an issue. See original summary.

amangrover90’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

amangrover90’s picture

Assigned: amangrover90 » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.