Description
Currently, the chat message input in OpenMindWell doesn't have proper input validation or character limit warnings. This can lead to:
- Users sending empty messages
- Extremely long messages that degrade UX
- No visual feedback about message length limits
Proposed Solution
Add the following enhancements to the chat input component:
- Input Validation: Prevent sending empty or whitespace-only messages
- Character Counter: Display current character count vs. limit (suggest 500 char limit)
- Visual Warnings: Show warnings when approaching the limit (e.g., 80% full)
- Disabled State: Disable send button when input is empty
- User Feedback: Toast notification for validation errors
Implementation Details
- Update the chat input component in
frontend/src/components/
- Add client-side validation before sending to backend
- Add styling for character counter and warning indicators
- Update backend to also validate and reject invalid messages
Testing
- Test empty message rejection
- Test whitespace-only message rejection
- Test character counter accuracy
- Test visual warnings at different percentages
- Test on mobile and desktop viewports
Type
Enhancement
Description
Currently, the chat message input in OpenMindWell doesn't have proper input validation or character limit warnings. This can lead to:
Proposed Solution
Add the following enhancements to the chat input component:
Implementation Details
frontend/src/components/Testing
Type
Enhancement