FlineDev / RemafoX

Report issues, request features or ask for help for the ReMafoX app here.
30 stars 1 forks source link

[Bug] App locks up when you click 'Set up API Keys' #76

Closed ConfusedVorlon closed 1 year ago

ConfusedVorlon commented 1 year ago

Steps to Reproduce:

1) open a project (which already has API keys set up) 2) click on 'set up API keys' (under Machine Translation)

Expected Behavior:

something opens

Current Behavior:

app deadlocks - have to force quit any attempt at interaction gives the 'you have a modal active' beep - but no modal is visible

Environment

Show environment details - App Version: 1.4.0 (Build 62) - System Version: 13.0 (Build 22A380) - System CPU: Apple M1 Ultra - Tier: Free -
Jeehut commented 1 year ago

@ConfusedVorlon Thank you for reporting this issue. I can confirm that it happens sometimes (although I cannot currently reproduce) and I will provide an update as soon as possible with a possible fix.

In the meantime, here's a workaround: Instead of pressing "Setup API Keys" in the configuration window, open the app's settings through the menu bar, select "Machine Translation" there, and press "Setup API Keys" within that Settings pane: Bildschirm­foto 2023-02-13 um 08 14 06

The issue is that SwiftUI has some problems with multiple modals and it seems sometimes modals don't work if there are multiple possible modals available. To leave this "locked" state, how you call it, press "esc" on your keyboard, then it should leave the model automatically. I will inform you once the fix is available, but the above workaround should work.

Jeehut commented 1 year ago

I've just checked the code and it seems the common workaround is already applied. It's possible there was a behavior change in SwiftUI between macOS 13.0 (your current version) and macOS 13.2 (the latest version). I wonder if this would be resolved for you if you upgraded to 13.2, please let me know if you had the chance to upgrade so I know what the situation is here.

I don't currently have a 13.0 machine available to test this out, but please try the workaround through the Settings app if you can't upgrade. Let me know if that doesn't work either.

ConfusedVorlon commented 1 year ago

I don't have immediate plans to upgrade.

One approach I have used for multiple possible modals is to have a single '.presented' line which is flagged by an enum. Then use the enum value to determine the presented body.

Jeehut commented 1 year ago

@ConfusedVorlon Yeah, that's something I want to switch to long-term. But currently, my .sheet calls are distributed across separate files with separate models. I will have to refactor a few things to make this adjustment, which I plan to do in March. Currently, I'm in the middle of moving cities which is halfway done, but still roughly 2 weeks of work left where it's hard for me to work on code. But that'll be over soon and I'll be fully back to ironing out those bugs. I'm really sorry for the inconvenience and hope that the button in the app's settings works for you.

Jeehut commented 1 year ago

@ConfusedVorlon I reworked the navigation of the app (part of the migration I wrote about here) and I can't reproduce this issue anymore, so it should be fixed. The fix will be shipped with version 1.5.0 which will take a couple more days to ship.

Thank you again for reporting this issue!