Describe the bug
When the current git branch changes (e.g. via git switch in the terminal), Git Auto Prefix updates the commit message prefix — but the update also activates the Commit tool window and moves keyboard focus into the commit message editor. Focus is stolen from whatever the user was doing (typically the terminal).
Steps to reproduce
- Use the non-modal commit UI (default) and open a git project.
- Focus the embedded terminal.
- Switch to a branch with a different ticket, e.g.
git switch -c feature/ABC-1234-test.
Expected behavior
The commit message prefix is updated to ABC-1234: in the background. Focus stays in the terminal.
Actual behavior
The prefix is updated, but the Commit tool window is activated and grabs focus (the message text is also select-all-ed).
Root cause
CommitPrefixCheckinHandler.updateCommitMessage() calls CheckinProjectPanel.setCommitMessage(...) on every GIT_REPO_CHANGE event. In the non-modal commit UI the panel is the platform's CommitProjectPanelAdapter, whose setCommitMessage() unconditionally calls commitMessageUi.focus() — which activates the Commit tool window.
Additionally, the message bus connection created in the handler's constructor is never disposed, so stale handlers accumulate (handlers are re-created when VCS mappings change) and each one repeats the focus-stealing update.
Environment
- Plugin: Git Auto Prefix 1.4.2
- IDE: IntelliJ IDEA 2026.1.4, non-modal commit interface
Describe the bug
When the current git branch changes (e.g. via
git switchin the terminal), Git Auto Prefix updates the commit message prefix — but the update also activates the Commit tool window and moves keyboard focus into the commit message editor. Focus is stolen from whatever the user was doing (typically the terminal).Steps to reproduce
git switch -c feature/ABC-1234-test.Expected behavior
The commit message prefix is updated to
ABC-1234:in the background. Focus stays in the terminal.Actual behavior
The prefix is updated, but the Commit tool window is activated and grabs focus (the message text is also select-all-ed).
Root cause
CommitPrefixCheckinHandler.updateCommitMessage()callsCheckinProjectPanel.setCommitMessage(...)on everyGIT_REPO_CHANGEevent. In the non-modal commit UI the panel is the platform'sCommitProjectPanelAdapter, whosesetCommitMessage()unconditionally callscommitMessageUi.focus()— which activates the Commit tool window.Additionally, the message bus connection created in the handler's constructor is never disposed, so stale handlers accumulate (handlers are re-created when VCS mappings change) and each one repeats the focus-stealing update.
Environment