Loading
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 fromresults.xmlgets 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 theai_feedback.ratingandai_feedback.request_idtags. Theai_feedbackcontext 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.0on the first submission only.defaultIntegrations: falsekeeps the SDK from reporting page errors. If the import fails, the form shows an error and you can retry. localStoragekeeps the AI toggle state and the feedback username.- The "Show passed tests" checkbox becomes a toggle slider.
.warning-toggleand.ai-toggleshare a.toggle/.toggle-sliderbase 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.
Generated-by: Claude Code
Edited by Miroslav Vadkerti

