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_checkscan silence security checks, which is a privileged act. Deliberately separate from the existing view permission. disabled_checksas checkboxes generated from the discovered check plugins (human labels, grouped by category) — no memorizing plugin IDs.config_workflowas radios carrying the README's "ask yourself" descriptions verbatim, so the declared-vs-inferred contract is explained where it is chosen.collection.intervalas 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-flaggedadminister 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.
Issue fork site_doctor-3608604
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
Comment #4
amangrover90 commentedComment #6
amangrover90 commented