-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: Remove "Refining Answer" popup #4783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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
) fromAgenticMessage
andAIMessage
components - Hardcoded
isViewingInitialAnswer
to true inAgenticMessage.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; |
There was a problem hiding this comment.
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
There was a problem hiding this 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
* Clean up logic * Remove dead code * Remove "Refining Answer" prompt
* Clean up logic * Remove dead code * Remove "Refining Answer" prompt
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.