Add an AI disclosure status page under Reports, with a queue of messages
Problem/Motivation
AI Disclosure reports its state through the Drupal status report. There, its eight entries are mixed with those of the whole site in alphabetical order: on a test site one sat among the warnings between "AI" and "Configuration files", the others among the checked entries. None of them links to the page that fixes it or to the installation guide.
Things that go wrong while the module works, such as a labelled copy that fails, a file skipped because it is too long, or a language that lost its clip, leave no trace an administrator can find later.
Proposed resolution
A new page, Reports > AI disclosure status, built with core's status_report_page element so that it looks like the status report in every admin theme:
- Counters at the top, then groups: Errors found, Warnings found, Off on this site (closed by default), Checked.
- Each entry starts with its area: Images, Video and audio, Spoken disclaimer, Output.
- Each problem has two links: "Fix it" to the settings page and "How to" to its section of the Requirements page.
- The entries come from one registry that the main module and the submodules feed. The status report of Drupal reads the same registry, keeps its entries with the same links, and adds one line "AI disclosure: N problems" that links to this page.
Below, a Messages table, modelled on core's Recent log messages:
- Columns: date, area, severity, message, links to the media or file and to the fix, Dismiss.
- Filters by area and severity, and a "show dismissed" option.
- A message also closes by itself when its cause is gone, for example when the copy is made or the clip is added.
- Services write messages through a small API, not to the watchdog. Sites that log to syslog have no watchdog table, and a log line cannot be dismissed.
Remaining tasks
- Registry of checks, fed by the main module and the submodules
- Status page with core's status report element
- Status report of Drupal reads the registry, plus the summary line
- Message storage (new table with an update and an upgrade test) and its API
- Messages table with filters and Dismiss
- Messages written by the video and audio queue, the spoken disclaimer and the image derivatives
- Docs page and screenshots
Acceptance criteria
- With every tool missing, the page lists each problem once, in the right group, with a working "Fix it" link and a "How to" link to an existing anchor of the Requirements page.
- The Drupal status report shows the same entries and the summary line.
- A failed labelled copy creates one message, and making the copy closes it. Dismiss hides a message, and "show dismissed" brings it back.
- The update creates the table on a site that runs 1.0.x today, and the upgrade test passes.
- New services are autowired and no class calls
\Drupal::.
User interface changes
A new report page and a summary line in the status report.
API changes
A registry for status checks and a service to record and close messages.
Data model changes
A new table for messages, created by an update.
Part of #83 (closed).
AI Compliance
🤖 Generated with the help of an LLM, reviewed and approved by me before posting.