Fix GUI progress bars with thread-safe updates and better responsiveness - #250
Fix GUI progress bars with thread-safe updates and better responsiveness#250shymega wants to merge 3 commits into
Conversation
7453f96 to
b1b8251
Compare
|
Seems good. |
Tested once, but want to do some more under different test cases. I'll do that this weekend. |
57d7c3b to
10c0e80
Compare
|
Seams good adding "test me" just in case not tested jet (to a level you want). |
|
Yeah, I haven't tested it yet on a handheld - see #249 (comment) - but on my main workstation it seems intermittently working. The GUI bars don't always appear. It's strange. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enhances the progress tracking and GUI responsiveness for file operations, including downloads, copying, zipping, and unpacking. It introduces a thread-safe status-sharing mechanism between worker threads and the GUI loop, a utility for human-readable file sizes, and a new copytree_with_progress function. The review feedback identifies a critical race condition in the update_status helper that could lead to runtime errors, suggests optimizing the GUI thread by removing redundant text updates, and recommends improving the user experience by providing feedback during the directory scanning phase.
10c0e80 to
2ea7755
Compare
2ea7755 to
b008987
Compare
- Add format_size() helper to convert bytes to KB/MB/GB/TB - Display progress as "45% (12.5 MB / 27.8 MB)" instead of raw bytes - Increase text element width to accommodate formatted sizes - Reduce update interval from 1000ms to 100ms for smoother progress - Rename update_log to update_status for clarity Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use thread-safe status list for progress updates instead of calling GUI methods directly from background threads - Move GUI updates to main event loop for reliable display - Fix swapped window titles in copy_folder_with_progress (was showing "Copying Prefix" for zip and vice versa) - Reduce update interval from 1000ms to 100ms for smoother progress - Add proper text element sizing for progress display Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add new copytree_with_progress() function in mainutils.py with thread-safe GUI progress updates - Replace shutil.copytree calls in syncwemod() with the new function - Shows "Copying WeMod Data" window with progress bar during sync - Handles destination directory creation automatically Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
b008987 to
aa114eb
Compare
|
@marvin1099 This is ready for review/merge now. |
Summary