Skip to content

Conversation

raunakab
Copy link
Contributor

Description

The "Refining Answer" would always pop up for previous already answered queries. This PR removes that code path altogether.

Addresses: https://linear.app/danswer/issue/DAN-1886/refining-answer-disappears-then-comes-back-before-finally-disappearing.

How Has This Been Tested?

This is a pure UI change; no tests were written.

@raunakab raunakab requested a review from a team as a code owner May 28, 2025 22:20
Copy link

vercel bot commented May 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 10:20pm

@raunakab raunakab enabled auto-merge May 28, 2025 22:20
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR removes the 'Refining Answer' popup functionality to fix a UI issue where it incorrectly appeared for already answered queries.

  • Removed entire web/src/app/chat/Refinement.tsx file containing the popup components and related UI elements
  • Removed refinement-related props (isImprovement, toggleDocDisplay, selectedDocuments) from AgenticMessage and AIMessage components
  • Hardcoded isViewingInitialAnswer to true in AgenticMessage.tsx to prevent popup reappearance
  • Simplified state management by removing refinement-specific variables and imports across components

4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

}, [hasThinkingTokens]);

const [isViewingInitialAnswer, setIsViewingInitialAnswer] = useState(true);
const isViewingInitialAnswer = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: hardcoding isViewingInitialAnswer to true removes the ability to view alternative answers - verify this is intended

Copy link
Contributor

@Orbital-Web Orbital-Web left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, added a few nits

@raunakab raunakab added this pull request to the merge queue May 28, 2025
@raunakab raunakab removed this pull request from the merge queue due to a manual request May 29, 2025
@raunakab raunakab added this pull request to the merge queue May 29, 2025
Merged via the queue into main with commit edc2892 May 29, 2025
10 of 11 checks passed
@raunakab raunakab deleted the fix/refining-answer-remove branch May 29, 2025 21:04
ZhipengHe pushed a commit to ZhipengHe/onyx that referenced this pull request Jun 6, 2025
* Clean up logic

* Remove dead code

* Remove "Refining Answer" prompt
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* Clean up logic

* Remove dead code

* Remove "Refining Answer" prompt
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