goose icon indicating copy to clipboard operation
goose copied to clipboard

Bug: prevent multiple file picker dialogs on double-click

Open Lymah123 opened this issue 1 month ago • 4 comments

Summary

Add fileDialogOpen guard flag to select-file-or-directory IPC handler to prevent race condition where rapid double-clicks would spawn multiple overlapping file picker dialogs. Uses try-finally to ensure flag is always reset.

Also add .cargo/ to .gitignore to exclude local cargo config.

Type of Change

  • [ ] Feature
  • [x] Bug fix
  • [ ] Refactor / Code quality
  • [ ] Performance improvement
  • [ ] Documentation
  • [x] Tests
  • [ ] Security fix
  • [ ] Build / Release
  • [ ] Other (specify below)

AI Assistance

  • [ ] This PR was created or reviewed with AI assistance

Testing

Related Issues

Relates to #5527 Discussion: LINK (if any)

Screenshots/Demos (for UX changes)

Before:
image

After:
Screenshot (30) Screenshot (31)

Submitting a Recipe?

Email:

Lymah123 avatar Nov 08 '25 12:11 Lymah123

Hi @DOsinga! I will be waiting for your review.

Lymah123 avatar Nov 08 '25 12:11 Lymah123

Hi! Just to confirm: would you prefer we handle this by disabling the select button in ChatInput.tsx while the dialog is open, instead of managing it in the Electron main process? Want to make sure I'm taking the right approach, thanks! @DOsinga

Lymah123 avatar Nov 11 '25 13:11 Lymah123

Hi! Just to confirm: would you prefer we handle this by disabling the select button in ChatInput.tsx while the dialog is open, instead of managing it in the Electron main process? Want to make sure I'm taking the right approach, thanks! @DOsinga

yes, I think that would work better - thanks

DOsinga avatar Nov 11 '25 13:11 DOsinga

Hi! Just to confirm: would you prefer we handle this by disabling the select button in ChatInput.tsx while the dialog is open, instead of managing it in the Electron main process? Want to make sure I'm taking the right approach, thanks! @DOsinga

yes, I think that would work better - thanks

Alright. I will work on the requested changes. Thanks

Lymah123 avatar Nov 11 '25 14:11 Lymah123