Bug: prevent multiple file picker dialogs on double-click
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:
After:
Submitting a Recipe?
Email:
Hi @DOsinga! I will be waiting for your review.
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
Hi! Just to confirm: would you prefer we handle this by disabling the select button in
ChatInput.tsxwhile thedialogis 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
Hi! Just to confirm: would you prefer we handle this by disabling the select button in
ChatInput.tsxwhile thedialogis open, instead of managing it in the Electron main process? Want to make sure I'm taking the right approach, thanks! @DOsingayes, I think that would work better - thanks
Alright. I will work on the requested changes. Thanks