miurla/morphic

[BUG] Answer Section rerenders and show loader when Related Section is streaming and showing loader

Opened this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues

Vercel Runtime Logs

  • I have checked the Vercel Runtime Logs for errors (if applicable)

Current Behavior

On the Search page when Answer Section has finished loading and the Related Section is streaming it also rerenders and show loader on Answer section.

Expected Behavior

Only the current streaming section should show the loader.

Steps To Reproduce

  1. Write a prompt, Submit and go to Search page.
  2. Wait for the Search Related section to start loading
  3. You will see the Answer Section also shows the loader.

Environment

- OS: Mac
- Browser: Chrome

Anything else?

Screenshot 2024-09-24 at 1 49 29 AM

Please let me know if anyone is facing or had faced this issue and what was the solution to it.
I already looked into the AnswerSection and SearchRelated sections component and other required components but didn't found the issue. Streaming code base Seems confusing.

miurla commented

The re-rendering issue is related to the current implementation of AI SDK RSC. We are planning a migration: #368

This issue should be resolved once the migration is completed.