improve the log feedback #20744

Closed
opened 2026-02-21 20:08:46 -05:00 by yindo · 1 comment
Owner

Originally created by @hjlarry on GitHub (Dec 2, 2025).

Originally assigned to: @hjlarry on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

After incorporating admin feedback in this PR https://github.com/langgenius/dify/pull/28652, we identified several areas for improvement:

  1. The feedback button always displays next to the message.
  2. When you hover over the message, two feedback buttons appear.
  3. There are some empty circles in the user message area.
  4. It seems strange for the user to see their feedback labeled as User.
  5. The user currently cannot cancel their feedback.

Screenshots

Image Image Image

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @hjlarry on GitHub (Dec 2, 2025). Originally assigned to: @hjlarry on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. After incorporating admin feedback in this PR https://github.com/langgenius/dify/pull/28652, we identified several areas for improvement: 1. The feedback button always displays next to the message. 2. When you hover over the message, two feedback buttons appear. 3. There are some empty circles in the user message area. 4. It seems strange for the user to see their feedback labeled as `User`. 5. The user currently cannot cancel their feedback. ## Screenshots <img width="902" height="966" alt="Image" src="https://github.com/user-attachments/assets/df41fb8d-a2ec-4d12-8948-ea9f6e72c53f" /> <img width="876" height="668" alt="Image" src="https://github.com/user-attachments/assets/258c51ab-8db3-4c2b-95ab-a88ac44b6d94" /> <img width="1510" height="954" alt="Image" src="https://github.com/user-attachments/assets/08298e2b-6ced-418d-84df-cce57fa5c090" /> ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 20:08:46 -05:00
yindo closed this issue 2026-02-21 20:08:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 2, 2025):

Here’s a breakdown of actionable improvements for log feedback based on your context and the current Dify implementation:

  • The feedback UI is managed in operation.tsx. The always-visible feedback button and duplicate buttons on hover are due to how feedback controls are conditionally rendered and how the group-hover:flex CSS class is applied. To fix this, update the conditional rendering so feedback buttons only show when no feedback has been given, and ensure hover controls are hidden once feedback is submitted. For example, wrap the hover controls in a condition like !localFeedback?.rating to prevent them from appearing after feedback is set. This will also address the empty circles issue, which are likely placeholder elements rendered when feedback state is ambiguous or missing [source].

  • The "User" label is currently hardcoded. You can make this label more user-friendly by either removing it (since the user knows their own feedback) or replacing it with a more descriptive icon or tooltip. This change is also in operation.tsx [source].

  • User feedback cancellation is supported in the backend (by sending a null rating), but the UI does not expose a cancel option for users. You can add a cancel button or make the feedback icon clickable to trigger cancellation, similar to how admin feedback is handled [source].

  • For log feedback improvements: there’s ongoing work and open issues to display downvote reasons (feedback comments) directly in the logs UI, and to show which specific messages received feedback, not just counts per conversation. You can extend the logs UI to surface this information by pulling the content field from the feedback object and displaying it next to the relevant message in the logs [source].

If you want a checklist:

  1. Update feedback button rendering logic in operation.tsx to prevent duplicates and hide after feedback.
  2. Adjust or remove the "User" label for clarity.
  3. Add a user feedback cancel action in the UI.
  4. Extend the logs UI to show feedback details (including downvote reasons) per message.

Let me know if you want code snippets or more detailed guidance on any of these!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 2, 2025): <!-- Answer --> Here’s a breakdown of actionable improvements for log feedback based on your context and the current Dify implementation: - The feedback UI is managed in `operation.tsx`. The always-visible feedback button and duplicate buttons on hover are due to how feedback controls are conditionally rendered and how the `group-hover:flex` CSS class is applied. To fix this, update the conditional rendering so feedback buttons only show when no feedback has been given, and ensure hover controls are hidden once feedback is submitted. For example, wrap the hover controls in a condition like `!localFeedback?.rating` to prevent them from appearing after feedback is set. This will also address the empty circles issue, which are likely placeholder elements rendered when feedback state is ambiguous or missing [[source]](https://github.com/langgenius/dify/blob/f8b10c227213958135f35e910945500d16c339aa/web/app/components/base/chat/chat/answer/operation.tsx#L38-L284). - The "User" label is currently hardcoded. You can make this label more user-friendly by either removing it (since the user knows their own feedback) or replacing it with a more descriptive icon or tooltip. This change is also in `operation.tsx` [[source]](https://github.com/langgenius/dify/blob/f8b10c227213958135f35e910945500d16c339aa/web/app/components/base/chat/chat/answer/operation.tsx#L38-L284). - User feedback cancellation is supported in the backend (by sending a `null` rating), but the UI does not expose a cancel option for users. You can add a cancel button or make the feedback icon clickable to trigger cancellation, similar to how admin feedback is handled [[source]](https://github.com/langgenius/dify/blob/f8b10c227213958135f35e910945500d16c339aa/api/services/message_service.py#L143-L216). - For log feedback improvements: there’s ongoing work and open issues to display downvote reasons (feedback comments) directly in the logs UI, and to show which specific messages received feedback, not just counts per conversation. You can extend the logs UI to surface this information by pulling the `content` field from the feedback object and displaying it next to the relevant message in the logs [[source]](https://github.com/langgenius/dify/issues/25880). If you want a checklist: 1. Update feedback button rendering logic in `operation.tsx` to prevent duplicates and hide after feedback. 2. Adjust or remove the "User" label for clarity. 3. Add a user feedback cancel action in the UI. 4. Extend the logs UI to show feedback details (including downvote reasons) per message. Let me know if you want code snippets or more detailed guidance on any of these! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/7481741f-1e07-41b9-ac2d-9e6971689cac?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7481741f-1e07-41b9-ac2d-9e6971689cac?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7481741f-1e07-41b9-ac2d-9e6971689cac?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7481741f-1e07-41b9-ac2d-9e6971689cac?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7481741f-1e07-41b9-ac2d-9e6971689cac?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7481741f-1e07-41b9-ac2d-9e6971689cac?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7481741f-1e07-41b9-ac2d-9e6971689cac?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Here%E2%80%99s%20a%20breakdown%20of%20actionable%20improvements%20for%20log%20feedback%20based%20on%20your%20context%20and%20the%20current%20Dify%20implementation%3A%0A%0A-%20The%20feedback%20UI%20is%20managed%20in%20%60operation.tsx%60.%20The%20always-visible%20feedback%20button%20and%20duplicate%20buttons%20on%20hover%20are%20due%20to%20how%20feedback%20controls%20are%20conditionally%20rendered%20and%20how%20the%20%60group-hover%3Aflex%60%20CSS%20class%20is%20applied.%20To%20fix%20this%2C%20update%20the%20conditional%20rendering%20so%20feedback%20buttons%20only%20show%20when%20no%20feedback%20has%20been%20given%2C%20and%20ensure%20hover%20controls%20are%20hidden%20once%20feedback%20is%20submitted.%20For%20example%2C%20wrap%20the%20hover%20controls%20in%20a%20condition%20like%20%60%21localFeedback%3F.rating%60%20to%20prevent%20them%20from%20appearing%20after%20feedback%20is%20set.%20This%20will%20also%20address%20the%20empty%20circles%20issue%2C%20which%20are%20likely%20placeholder%20elements%20rendered%20when%20feedback%20state%20is%20ambiguous%20or%20missing%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify/blob/f8b10c227213958135f35e910945500d16c339aa/web/app/components/base/chat/chat/answer/operation.tsx%23L38-L284%29.%0A%0A-%20The%20%22User%22%20label%20is%20currently%20hardcoded.%20You%20can%20make%20this%20label%20more%20user-friendly%20by%20either%20removing%20it%20%28since%20the%20user%20knows%20their%20own%20feedback%29%20or%20replacing%20it%20with%20a%20more%20descriptive%20icon%20or%20tooltip.%20This%20change%20is%20also%20in%20%60operation.tsx%60%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify/blob/f8b10c227213958135f35e910945500d16c339aa/web/app/components/base/chat/chat/answer/operation.tsx%23L38-L284%29.%0A%0A-%20User%20feedback%20cancellation%20is%20supported%20in%20the%20backend%20%28by%20sending%20a%20%60null%60%20rating%29%2C%20but%20the%20UI%20does%20not%20expose%20a%20cancel%20option%20for%20users.%20You%20can%20add%20a%20cancel%20button%20or%20make%20the%20feedback%20icon%20clickable%20to%20trigger%20cancellation%2C%20similar%20to%20how%20admin%20feedback%20is%20handled%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify/blob/f8b10c227213958135f35e910945500d16c339aa/api/services/message_service.py%23L143-L216%29.%0A%0A-%20For%20log%20feedback%20improvements%3A%20there%E2%80%99s%20ongoing%20work%20and%20open%20issues%20to%20display%20downvote%20reasons%20%28feedback%20comments%29%20directly%20in%20the%20logs%20UI%2C%20and%20to%20show%20which%20specific%20messages%20received%20feedback%2C%20not%20just%20counts%20per%20conversation.%20You%20can%20extend%20the%20logs%20UI%20to%20surface%20this%20information%20by%20pulling%20the%20%60content%60%20field%20from%20the%20feedback%20object%20and%20displaying%20it%20next%20to%20the%20relevant%20message%20in%20the%20logs%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify/issues/25880%29.%0A%0AIf%20you%20want%20a%20checklist%3A%0A1.%20Update%20feedback%20button%20rendering%20logic%20in%20%60operation.tsx%60%20to%20prevent%20duplicates%20and%20hide%20after%20feedback.%0A2.%20Adjust%20or%20remove%20the%20%22User%22%20label%20for%20clarity.%0A3.%20Add%20a%20user%20feedback%20cancel%20action%20in%20the%20UI.%0A4.%20Extend%20the%20logs%20UI%20to%20show%20feedback%20details%20%28including%20downvote%20reasons%29%20per%20message.%0A%0ALet%20me%20know%20if%20you%20want%20code%20snippets%20or%20more%20detailed%20guidance%20on%20any%20of%20these%21)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29032)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20744