Expose the suggestion table to Views via hook_views_data()

Problem / Motivation

Suggestions recorded through the recorder API live in the custom ai_disclosure_suggestion table, which is deliberately not a content entity. The trade-off of that design is that site builders currently cannot build Views over suggestions at all — there is no way to make, say, a "pending suggestions" review dashboard, filter by source module or status, or list suggestions per content type without custom code.

Views does not require the data to be an entity: exposing the table through hook_views_data() closes that gap without changing the storage design, and existing rows become queryable immediately. The module already ships custom Views handlers in src/Plugin/views/, so the pattern is established.

Proposed resolution

Add a hook_views_data() implementation for the ai_disclosure_suggestion table:

  • Fields: entity type ID, entity ID, langcode, grade, source, note, status, uid, created, changed.
  • Filters: status (in-operator with the known pending/accepted/dismissed options), grade, source, entity type ID, langcode.
  • Sorts: created, changed, status.
  • Relationships: uid to the users table; where practical, a relationship from entity_type_id/entity_id to the host entity so views can show the entity label/link. Since the target type is dynamic per row, this may be limited to per-entity-type relationships (one per fieldable entity type, like the existing views data registration does for the disclosure field).
  • Optionally a default view: an admin "Suggestions" listing filtered to pending, as a starting point for review workflows.

Add a kernel test asserting the views data is registered and a simple view over the table executes.

Known limitations (acceptable)

Row-level things Views derives from entities stay out of scope: no rendered-entity row style for suggestions and no per-row entity access checks — access is guarded by the view's permission, consistent with how the suggestion queue is guarded today.