Skip to content

fix: add missing signal invocations in Bot.tsx#379

Open
SyncWithRaj wants to merge 2 commits intoFlowiseAI:mainfrom
SyncWithRaj:fix/missing-signal-invocations
Open

fix: add missing signal invocations in Bot.tsx#379
SyncWithRaj wants to merge 2 commits intoFlowiseAI:mainfrom
SyncWithRaj:fix/missing-signal-invocations

Conversation

@SyncWithRaj
Copy link
Copy Markdown
Contributor

Fixed logic errors in Bot.tsx where Solid.js signal accessors were being checked as function references instead of being invoked. In Solid.js, signals are functions; referencing them without () evaluates to truthy (the function itself), causing conditional guards to fail.

Key Fixes

  • Voice Recording: Fixed onRecordingCancelled to correctly invoke recordingNotSupported(). This ensures cancelAudioRecording() is called, preventing the microphone from staying active after a user cancels.
  • Drag & Drop: Fixed handleDrop to correctly invoke isFileUploadAllowed(), ensuring that file upload permissions are strictly enforced during drop events.

Impact

  • Fixes a privacy concern where the recording indicator remained active in the browser after cancellation.
  • Resolves a bypass in file upload gating for drag-and-drop interactions.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request corrects the logic in Bot.tsx by properly invoking isFileUploadAllowed and recordingNotSupported as functions. A review comment identifies a functional issue in the handleDrop handler where an early return prevents e.preventDefault() from executing, which could lead to unintended browser navigation when uploads are disabled.

Comment thread src/components/Bot.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant