A pending suggestion stays and Accept does nothing after suggest() drops a downgrade
Problem/motivation
Since #106 (closed), DisclosureRecorder::suggest() drops a downgrade. The source's earlier pending row stays, though, still describing the old file. Accept on it does nothing and shows no message, since the widget only acts when the suggested grade is stricter. Only Dismiss clears it. A raise by hand after a suggestion leaves the same dead row.
Reported by @Maurice1969, with the first part of the fix below.
Steps to reproduce
- A file gets a pending suggestion, for example
ai_generated_autonomous. - The editor sets the grade to
ai_deepfakeby hand, without accepting. - The file is replaced, and the new one suggests a lower grade.
- The old pending suggestion stays. Accept does nothing.
Proposed resolution
When suggest() drops a downgrade, it also deletes that source's pending row for the entity and language. Decided rows stay. On a row that would not raise the grade, Accept says so and points to Dismiss.
Remaining tasks
- Review of the merge request.
User interface changes
A message after Accept on a suggestion that changes nothing.
API changes
suggest() keeps its signature.
cc @Maurice1969
AI Compliance
🤖 Generated with the help of an LLM, reviewed and approved by me before posting.