Fix extra space share button#8896
Conversation
* fix chat image sent * 🐛 (chat-input.tsx): fix issue where files were not being cleared immediately after sending a message 📝 (chat-input.tsx): refactor code to improve readability and maintainability by extracting filesToSend logic into a separate variable * Delete diff_output_ts.txt * ♻️ (chat-input.tsx): refactor code to store and restore files when sending a message to prevent losing files if an error occurs during sending. * ✅ (fileUploadComponent.spec.ts): update timeout values for better test reliability and performance * ✅ (fileUploadComponent.spec.ts): update test assertion to check for the correct attribute value to ensure accurate testing --------- Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis update modifies file upload handling and asynchronous control flow in the chat input and related UI components. It also adjusts a CSS utility class for button spacing and increases timeouts in a file upload test. No changes were made to exported or public entity declarations except for one interface method signature. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ChatInput
participant FileState
participant sendMessage
User->>ChatInput: Trigger send
ChatInput->>FileState: Store current files
ChatInput->>FileState: Clear files state
ChatInput->>sendMessage: Send message with filesToSend
alt sendMessage fails
ChatInput->>FileState: Restore files state
end
sequenceDiagram
participant User
participant NoInputView
participant sendMessage
User->>NoInputView: Click "Run Flow" button
NoInputView->>sendMessage: Await sendMessage({ repeat: 1 })
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
|
||
| const buttonVariants = cva( | ||
| "noflow nopan nodelete nodrag inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-70 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", | ||
| "noflow nopan nodelete nodrag inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-70 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", |
There was a problem hiding this comment.
Is it safe to change this for all buttons?
| await page | ||
| .getByTestId("handle-file-shownode-raw content-right") | ||
| .first() | ||
| .click(); | ||
|
|
||
| await page | ||
| .getByTestId("handle-chatoutput-noshownode-inputs-target") | ||
| .first() | ||
| .click(); | ||
|
|
|



Decrease the gap between icon and text in the Share button for visual consistency with the Playground button.