Add AI summary feedback form via Sentry

Add a feedback form to every AI summary, sent through the Sentry User Feedback API.

  • A "Feedback" button in each AI summary box opens the form. The new <ai-feedback> component holds the form, so each per-test and per-plan summary from results.xml gets its own.
  • The form asks for a username, a 1-5 star rating (CSS-only SVG stars) and a description. An incomplete form shows an inline error. The stars are native radios, hidden visually but reachable with Tab and the arrow keys.
  • Sentry.sendFeedback() sends the feedback with the ai_feedback.rating and ai_feedback.request_id tags. The ai_feedback context adds the plan and test names. The form shows success only after Sentry accepts the feedback. A failed delivery shows an error and keeps your input for a retry.
  • The form reads every submitted value before the SDK loads, and ignores a late result once Lit reuses the element for another summary.
  • The page imports @sentry/browser@9.27.0 on the first submission only. defaultIntegrations: false keeps the SDK from reporting page errors. If the import fails, the form shows an error and you can retry.
  • localStorage keeps the AI toggle state and the feedback username.
  • The "Show passed tests" checkbox becomes a toggle slider. .warning-toggle and .ai-toggle share a .toggle/.toggle-slider base and override only font-size and the checked color.
  • The prototype notice under each AI summary goes away.

The Cypress tests stub the Sentry ingest endpoint and check the payload, so CI sends no real feedback. They cover a failed delivery followed by a successful retry. The new tmt-2-fails-ai scenario holds the SDK import while a search moves a pending form to another test.

feedback-oculus

feedback-sentry

Generated-by: Claude Code

Edited by Miroslav Vadkerti

Merge request reports

Loading
Loading