Repository navigation
Conversation
replace_target_binary removed the backup at the start of every attempt. When the copy failed and restoring the backup failed too, the backup was the only copy of the program, and the next attempt deleted it. Drop the backup only while the target still exists, stop with an error that names the backup path when it does not, and return at once when the restore fails. Retries and delay are parameters so tests run fast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on the desktop With "Lock in taskbar" on, dropping the widget outside the taskbar re-embedded the drag popup into the taskbar. The window fell to the bottom of the z-order and disappeared behind other windows. A drop on the desktop now turns the lock off (only when it applies to the current placement) and takes the normal floating path, so the widget stays visible and the setting and menu check follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, and thank you for Claude Code Usage Monitor. I use it every day. While working on a personal fork I ran into two bugs that also exist on
main, so here are small, self-contained fixes for both. Each one is a separate commit, so they are easy to review or to take one at a time.1. Updater: a failed update can delete the only copy of the exe
Steps to reproduce
.oldbackup next to it.Cause
replace_target_binarystarts every attempt withremove_file(&backup_path). When the target is gone and the backup holds the previous version, that call deletes the last copy of the program. The restore error (rename(&backup_path, target)) was also ignored, so the loop kept going.Change (
src/updater.rs)replace_target_binary_with_retriesso tests can run without the 30-second wait.replace_target_binarykeeps the same behaviour (60 × 500 ms).How to verify
cargo test updater: two new tests:failed_replacement_never_deletes_the_only_copy_in_the_backupfailed_copy_restores_the_installed_binary2. Widget: a locked widget dragged to the desktop disappears
Steps to reproduce
Cause
In
WM_LBUTTONUP, a drop outside the taskbar takes the locked branch. That branch re-embeds the drag popup as a taskbar child and callsposition_at_taskbar. The window that was topmost during the drag ends up at the bottom of the z-order, so it is not visible.Change (
src/window.rs,src/window/message_loop.rs)release_taskbar_lock_for_desktop_drop: when the lock applies to the current placement, it turnslock_taskbaroff.I picked "the drop releases the lock" because the user has clearly moved the widget off the bar. If you would rather keep the widget pinned (and only fix the z-order), I'm happy to change the approach.
How to verify
cargo test desktop_drop_releases_taskbar_lockChecks
cargo fmt,cargo test,cargo clippy --all-targets, andcargo build --releaseall pass on this branch.Thanks again for your work on this project!
🤖 Generated with Claude Code