Add "Email devs" to Help menu
This adds a "Report issue by email" menu action to the Help menu. It's intended to give us something shorter to tell people on the forum than the old "Please find the log with Settings > Open Log folder, delete it, reproduce the error, and then email us the log or upload it here on your forum post".
Now we would have to tell them, "Please go to Help > Report issue by email and attach the log as described there."
What the button actually does, is open the default email client with a blueprint email that includes version, OS, active workflow and applet, as well as open the log folder. The hope being that this makes it easier for the user to provide the basic info we need. (The reason it opens the log folder instead of pre-attaching the log file, is because that's not supported in mailto: links.)
What do you think @k-dominik? Can you think of something better we can do here? Or suggestions for better phrasing of the email template?
Next step could be to add crash detection, with a prompt on the startup after a crash that offers to email the devs about the crash.
in general I like it. I see two problems though:
- If I understand correctly, the user is asked to attach the complete log file. I recently deleted mine, and it's already 3Mb. Normal users never delete it and it can grow to significant sizes. Also there could be lots of private information that is not related to the issue at all. I don't care to learn a users full directory structure by reading all file names that might get logged in ilastik
- This might be biased, but most people I know didn't configure an email client and to webmail (me included on all my private machines). So having it like this would be annoying for me :)
Alternatively, what could happen is we prepopulate the text pretty much as you've done (but maybe more according to our issue template), then add the relevant part of the project file (maybe even stripping some paths there) to it as a code block and ask users to open an issue, or post on image.sc.
With the config file we could at least find the portion since last startup (INFO YYY-MM-DD H... app ... Starting ilastik from ....).
Custom report-an-issue dialog it is then I suppose...
idk, maybe it's just me not seeing the light with the email - might be a good one to discuss at the meeting.
Custom report-an-issue dialog here we go 🎉
Codecov Report
Attention: Patch coverage is 46.93878% with 78 lines in your changes missing coverage. Please review.
Project coverage is 55.78%. Comparing base (
f0862ef) to head (2a0e083). Report is 18 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2879 +/- ##
==========================================
- Coverage 55.82% 55.78% -0.04%
==========================================
Files 539 540 +1
Lines 62582 62716 +134
Branches 8599 8615 +16
==========================================
+ Hits 34936 34988 +52
- Misses 25877 25961 +84
+ Partials 1769 1767 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
New state:
Maybe you've already discussed this possibility, but what if instead of trying to extract the last run from the log.txt, just modify logging config so that it also writes to another lastlog.txt, which is recreated every time on every session (mode="w" instead of default mode="a")?
another
lastlog.txt, which is recreated every time on every session (mode="w"instead of defaultmode="a")?
I'd be happy just in general writing one logfile per session...
open log folder probably should not be the default button:
I also found that you cannot escape keyboard focus on the textedit.
Edit: now looking at it ... and I know that's super minor and not a problem really, but the alignment of the buttons is a tiny bit unsettling. I mean it does make logical sense that the button aligns with the textedit outer edge. Still having it there, slightly off the button below, and also at a different width...
I also found that you cannot escape keyboard focus on the textedit.
Managed to fix this one
open log folder probably should not be the default button: Edit: now looking at it ... and I know that's super minor and not a problem really, but the alignment of the buttons is a tiny bit unsettling. I mean it does make logical sense that the button aligns with the textedit outer edge. Still having it there, slightly off the button below, and also at a different width...
On Win11 (edit: and on Linux) the default button doesn't get a special style, and the misalignment also doesn't exist, so I can't tell if I fixed it or not...
Also now deleting all but the last 10 session logs on startup. I wrote a test for the deleting-function, and then removed the test because creating test files etc. turned out almost more complex than the code it's testing... can push that if wanted.
Alright, feedback on session log deleting should be done. If I can get another quick check how the buttons look on Mac now (@k-dominik), I'd be happy to merge 🚀
For the record, one piece of information that I would've liked to include but couldn't find a sensible way to extract: Is the user running a "-gpu" version? This would have been auto-reported inside the "starting ilastik from..." log, but masking that file path is the right thing to do for privacy reasons. Unfortunately I couldn't find a straightforward way to get that information, but adding this should be easy if I just overlooked something.