-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix/persist chat input #3415
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
Fix/persist chat input #3415
Conversation
- Added ChatInputContext to manage chat input state - Modified ChatInput component to use context for state persistence - Updated App component to provide ChatInputContext - This ensures that user input is preserved when navigating between views
- Add ChatInputContext for global input state management - Persist chat input text when navigating between views - Position cursor at end of restored text for better UX - Maintain bidirectional sync between context and display values - Clear context on message submission Fixes issue where chat input text was lost when navigating to settings or other views and returning to chat.
| fi | ||
|
|
||
| export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/stable}" | ||
| export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://d1abdrezunyhdp.cloudfront.net/square}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come this changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah - looks like you can roll it back - can use the public one
michaelneale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why hermit is changing as part of this?
|
FYI #3288 is about to land - so may want to hold off and then rebase it on that |
|
@qyjoan the new GUI was merged, so would love to know if this went away with that, or if it didn't, if you are interested in updating to main/rebase to get it up to speed |
|
@qyjoan you can re-open if you thing still needed (will need to apply on top of new GUI of course) - closing for now |
Summary
Adds chat input persistence across navigation to improve user experience.
Problem
When users type text in the chat input and navigate to settings or other views, their input text is lost when they return to the chat view. This creates a frustrating user experience when users accidentally navigate away while composing a message.
Solution
ChatInputContextusing React Context API for global input state managementChatInputcomponent to integrate with the context for persistenceTesting Steps
Files Changed
ui/desktop/src/components/ChatInputContext.tsx(new file)ui/desktop/src/components/ChatInput.tsx(modified)Technical Details
initialValueduring component initialization