-
由 Nour Zakhma 提交于
The "View Plan" button in the plan card was non-functional when: The preview panel was manually collapsed by the user Starting a new app session (preview panel is closed initially) The button only changed the preview mode to "plan" but didn't open the panel, making it invisible to users. Root Cause [isPreviewOpenAtom]was set to false when starting the app and only set back to true after streaming completes. The "View Plan" button only called [setPreviewMode("plan")] but didn't call [setIsPreviewOpen(true)], leaving the panel closed. Solution Added [setIsPreviewOpen(true)] to the "View Plan" button's onClick handler to ensure the preview panel opens when users click the button. Testing The fix can be verified by: Generating a plan in the chat Collapsing the preview panel (or having it closed on new app start) Clicking the "View Plan" button Confirm the panel opens and shows the plan view <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3073" 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 --> --------- Co-authored-by:Mohamed Aziz Mejri <mjrmohamedaziz@gmail.com>