Skip to content
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

update to fix analysis panel freeze #938

Merged
merged 1 commit into from
Jan 13, 2025
Merged

update to fix analysis panel freeze #938

merged 1 commit into from
Jan 13, 2025

Conversation

wotey
Copy link
Contributor

@wotey wotey commented Jan 9, 2025

This pull request includes several changes to the AnalysisPanel component in app/frontend/src/components/AnalysisPanel/AnalysisPanel.tsx to improve error handling and ensure the proper handling of undefined values. The most important changes include adding error messages for undefined values and ensuring the proper execution of asynchronous functions.

Improvements to error handling:

  • Added error messages when sourceFileUrl is undefined and ensured setIsFetchingSourceFileBlob(false) is called in this case.
  • Added warnings when activeCitation is undefined and set setActiveCitationObj(undefined) accordingly.
  • Added error messages when sourceFile is undefined and threw errors when citationURL is undefined in the fetchMarkdownContent and fetchPlainTextContent functions.

Ensuring proper execution of asynchronous functions:

  • Modified the fetchSourceFileBlob function to check for undefined sourceFile and ensure proper asynchronous execution.

Other changes:

  • Updated the iframe source URL to handle pageNumber being null or undefined by using the nullish coalescing operator.

Fixes #904

@wotey wotey requested a review from dayland as a code owner January 9, 2025 21:05
@wotey wotey requested review from dayland and removed request for dayland January 9, 2025 21:05
@dayland dayland merged commit ad30f3a into main Jan 13, 2025
5 checks passed
@dayland dayland deleted the wotey-hotfix branch January 13, 2025 11:36
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.

Page Freezes on First Load when Clicking "Show Thought Process" or "Show Supporting Content"
2 participants