fix: harden desktop file picker flows#1445
Conversation
c1b37c9 to
c08cf14
Compare
|
It works successfully on macOS. Although I haven't been able to test it in a Linux environment, it is expected to function correctly. If you want to test it, you can get bundled file in here: https://github.com/SameDesu123/Risuai/actions/runs/25807800518 |
|
Hello, Thank you for finishing the task I had given up on! I ran the appimage build from Linux. For context, here are the environment that this test was conducted:
Just a few minor issues that are not necessarily have to be included to this PR:
|
|
Thanks for testing this on Linux. 1st Issue seems related to the same import path handling problem, so I’ve fixed it together in this PR. For second (EGL_BAD_PARAMETER with the bundled AppImage libraries), I think it would be better to track it separately in another PR/issue since it looks more related to AppImage packaging/runtime behavior than the file picker changes themselves. |
|
Agreed on those choices. |
PR Checklist
Summary
Refreshes the dropped file picker hardening work from #1324 by @tasoo-oos against current
main.The shared file picker helpers now use the Tauri native dialog on desktop, return consistent cancel values, and keep the DOM fallback safer for WebKit-style picker behavior.
Related Issues
Follows up on #1324.
Changes
selectSingleFileandselectMultipleFileso cancel handling is explicit and consistent.Impact
Desktop users should get native file dialogs for import and local backup flows, including Tauri builds where the DOM picker can fail. Web users keep the DOM fallback, with safer cancel handling and offscreen input styling.
Cancelling a picker should no longer crash null-unsafe import paths.
Additional Notes
Validated with
pnpm check, YAML parse check, andgit diff --check.Footnotes
Modifies the behavior of prompting, requesting, or handling responses from AI models. ↩
Over 80% of the code is AI generated. ↩