Skip to content

feat(askai): Feedback notes and tags#2890

Merged
8bittitan merged 6 commits into
v5from
feat/feedback-note-collection
Jun 2, 2026
Merged

feat(askai): Feedback notes and tags#2890
8bittitan merged 6 commits into
v5from
feat/feedback-note-collection

Conversation

@8bittitan
Copy link
Copy Markdown
Contributor

@8bittitan 8bittitan commented May 29, 2026

Why

Previously, negative feedback on Ask AI answers was a single thumbs-down with no way to capture why an answer was unhelpful. That made the signal hard to act on. This PR lets users attach reason tags and a freetext note when they thumb down an answer, giving us actionable, categorized feedback to improve answer quality.

It also consolidates the duplicated feedback UI (modal AskAiScreenFooterActions + Sidepanel ConversationActions) into a single shared FeedbackActions component so both surfaces behave consistently and stay in sync going forward.

Notable changes

  • Thumbs up still submits immediately; thumbs down now opens a panel with optional reason chips + a note field (1000 char cap) before submitting.
  • Reason tags and notes are persisted to stored conversations and forwarded to the Agent Studio feedback endpoint.
  • Feedback callback signature changed to (messageId, { thumbs, tags?, notes? }) via the new OnAskAiFeedback type.

Manual testing

  • Modal - positive feedback: Ask a question, click thumbs-up → feedback submits immediately and "Thanks for your feedback!" appears.
  • Modal - negative feedback: Click thumbs-down → note panel opens; selecting reason chips toggles them on/off; typing past 1000 chars is capped; the char counter updates.
  • Modal - submit note: Select one or more reasons + add a note, submit → "Thanks" appears, no further feedback can be sent.
  • Modal - submit empty: Thumbs-down then submit with no tags/notes → still submits successfully.
  • Modal - cancel: Open the note panel, click Cancel → returns to the like/dislike actions, nothing is recorded.
  • Error handling: Force the feedback request to fail → panel stays open and shows an error message.
  • Sidepanel: Repeat the positive/negative flows in the Sidepanel; confirm the copy button is ordered first and the panel layout fits.
  • Persistence: Submit feedback, reload → the "Thanks" state is restored for that message (no duplicate submission possible).
  • Copy button: Click copy → answer is copied, icon switches to the check state, then resets.

Screenshots

Modal
Screenshot 2026-05-29 at 5 07 24 PM

Sidepanel
Screenshot 2026-05-29 at 3 58 43 PM

Dependencies

@netlify
Copy link
Copy Markdown

netlify Bot commented May 29, 2026

Deploy Preview for docsearch-demo failed.

Name Link
🔨 Latest commit e31f469
🔍 Latest deploy log https://app.netlify.com/projects/docsearch-demo/deploys/6a1df3302fb94400088978a6

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 29, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 22 complexity · -1 duplication

Metric Results
Complexity 22
Duplication -1

View in Codacy

TIP This summary will be updated as you push new changes.

Base automatically changed from feat/remove-ask-ai-transport to v5 June 1, 2026 21:00
@8bittitan 8bittitan merged commit e35349b into v5 Jun 2, 2026
7 of 11 checks passed
@8bittitan 8bittitan deleted the feat/feedback-note-collection branch June 2, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants