improvement(landing): insert prompt into copilot panel from landing, open panel on entry#1363
improvement(landing): insert prompt into copilot panel from landing, open panel on entry#1363waleedlatif1 merged 6 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Greptile Summary
This PR implements a seamless user onboarding flow that allows users to enter prompts on the landing page and have them automatically transferred to the copilot panel when they navigate to a workspace. The feature involves several coordinated changes across the application:
Core Implementation:
- A new
LandingPromptStorageutility class inbrowser-storage.tshandles cross-page data transfer using localStorage with SSR safety, automatic expiration (24 hours), and proper error handling - The landing page hero component now stores user prompts in localStorage before redirecting to signup
- The workspace panel system consumes stored prompts and automatically opens the copilot panel with the prompt pre-filled
Panel System Enhancements:
- Added
openCopilotPanel()method to the panel store for atomic operations that both open the panel and set the active tab to 'copilot' - Reordered panel tabs to prioritize copilot as the first tab, making it the primary interface
- Implemented a
useEffecthook inpanel.tsxthat checks for stored prompts on component mount and automatically triggers the copilot panel opening
Copilot Component Updates:
- Added
setInputValueAndFocus()method to the copilot component's ref interface, allowing external components to programmatically populate the input field - Used
useCallbackandsetTimeoutto ensure proper DOM updates and focus behavior when setting input values - Removed the Bot icon from the copilot welcome interface as part of design simplification
Integration Flow:
The feature creates a complete user journey: landing page prompt → localStorage storage → workspace navigation → automatic copilot panel opening → prompt population and input focus. This reduces friction in the user onboarding process by preserving context across page transitions and eliminating the need for users to re-enter their initial prompts.
Confidence score: 4/5
- This PR implements a well-thought-out user experience improvement with proper error handling and edge case management
- Score reflects solid implementation with good separation of concerns, though some complexity in timing-dependent operations and potential storage utility duplication
- Pay close attention to the browser storage utility and timing-dependent useEffect in panel.tsx
7 files reviewed, 1 comment
…open panel on entry (simstudioai#1363) * update infra and remove railway * improvement(landing): insert prompt into copilot panel from landing, open panel on entry * Revert "update infra and remove railway" This reverts commit abfa2f8. * fixes * remove debug logs * go back to old env
Summary
insert prompt into copilot panel from landing, open panel on entry
Type of Change
Testing
Tested manually
Checklist