Implementation:Infiniflow Ragflow FeedbackDialog Component
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Frontend, UI_Components, Chat |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
Concrete modal dialog for collecting user feedback on chat responses with Zod form validation provided by the RAGFlow frontend.
Description
The FeedbackDialog component renders a modal with a text area for users to provide feedback (typically thumbs-down feedback on AI responses). It uses Zod validation to ensure feedback content meets requirements before submission.
Usage
Import this component in chat or search result views where users can provide negative feedback on AI-generated responses.
Code Reference
Source Location
- Repository: Infiniflow_Ragflow
- File: web/src/components/feedback-dialog.tsx
- Lines: 1-78
Signature
export default function FeedbackDialog({
visible, hideModal, onOk, loading,
}: IModalProps<IFeedbackRequestBody>): JSX.Element;
Import
import FeedbackDialog from '@/components/feedback-dialog';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| visible | boolean | Yes | Whether dialog is shown |
| hideModal | function | Yes | Close dialog callback |
| onOk | function | Yes | Submit feedback callback |
| loading | boolean | No | Show loading state on submit |
Outputs
| Name | Type | Description |
|---|---|---|
| onOk callback | IFeedbackRequestBody | Validated feedback content |
Usage Examples
import FeedbackDialog from '@/components/feedback-dialog';
<FeedbackDialog
visible={showFeedback}
hideModal={() => setShowFeedback(false)}
onOk={async (data) => { await submitFeedback(data); }}
loading={isSubmitting}
/>
Related Pages
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment