fix: focus window on single-instance activation#209
Merged
ErikBjare merged 1 commit intoActivityWatch:masterfrom Feb 23, 2026
Merged
fix: focus window on single-instance activation#209ErikBjare merged 1 commit intoActivityWatch:masterfrom
ErikBjare merged 1 commit intoActivityWatch:masterfrom
Conversation
The single-instance file watcher handler called window.show() but not window.set_focus(), causing the window to appear but stay behind other windows. This matches the tray "Open Dashboard" handler which correctly does both. Fixes ActivityWatch#208
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 6afc5b1 in 16 seconds. Click for details.
- Reviewed
12lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_aLfZrU0h25ZvgBQR
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile SummaryAdds
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User as User (2nd Instance)
participant Plugin as single_instance plugin
participant Lockfile as single_instance.lock
participant Watcher as listen_for_lockfile()
participant Window as Main Window
User->>Plugin: Launch 2nd instance
Plugin->>Lockfile: Create/truncate lock file
Plugin->>Plugin: Log & quit 2nd instance
Lockfile-->>Watcher: File change detected
Watcher->>Lockfile: Remove lock file
Watcher->>Window: window.show()
Watcher->>Window: window.set_focus() ✨ NEW
Last reviewed commit: 6afc5b1 |
Contributor
Author
|
@greptileai review |
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.
Summary
window.set_focus()afterwindow.show()in the single-instance file watcher handler, matching the existing tray "Open Dashboard" handler patternFixes #208
Important
Add
window.set_focus()inlisten_for_lockfile()to focus the main window on second instance launch.window.set_focus()afterwindow.show()inlisten_for_lockfile()inlib.rsto focus the main window when a second instance is launched.This description was created by
for 6afc5b1. You can customize this summary. It will automatically update as commits are pushed.