fix: keep retry button visible when error popup appears (#3231)
closes #1772
When an AI request fails during build, the error popup would appear and
cover the retry button at the bottom of the chat, forcing users to
manually scroll down to access it. This fix adds an auto-scroll effect
that scrolls up ~150px when an error occurs, ensuring the retry button
remains visible and accessible above the error popup. This improves the
UX for error recovery scenarios.
before:
<img width="550" height="365" alt="Capture d'écran 2026-04-18
031044"
src="https://github.com/user-attachments/assets/61b4108b-0732-469e-abae-bd6ba86ee7ab"
/>
after
<img width="583" height="439" alt="Capture d'écran 2026-04-18
030508"
src="https://github.com/user-attachments/assets/917ac306-a7eb-41ae-959c-aadf9d87b2c2"
/>
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3231"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
正在显示
请
注册
或者
登录
后发表评论