Skip to content

feat: show the existing window when Gitify is launched again - #3646

Merged
setchy merged 1 commit into
mainfrom
fix/show-window-on-second-launch
Nov 6, 2026
Merged

setchy merged 1 commit into
mainfrom
fix/show-window-on-second-launch

Conversation

@setchy

@setchy setchy commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Make launching an already-running Gitify show its existing window, rather than silently exiting the second process. This is a usability improvement, not a restoration of ordinary-relaunch behavior lost in 8.0.0, and it does not need to block the hotfix.

Background

Gitify previously registered a second-instance listener to forward gitify:// OAuth callback URLs to the running instance. That listener did not show the window for an ordinary launch without a callback URL.

The device-flow migration in #3449 removed the obsolete callback listener. Single-instance enforcement remains in place: a second process still quits. macOS activation is also still handled by electron-menubar.

This PR adds explicit show-on-relaunch behavior, particularly for Windows/Linux, addressing #3556.

Changes

  • Handle second-instance by showing the existing menubar window rather than toggling it.
  • Register lifecycle handlers before Electron becomes ready and coalesce early relaunches until the preloaded menubar window is ready.
  • Log show failures and allow a later relaunch to retry.
  • Leave macOS activate handling with electron-menubar; do not restore obsolete OAuth protocol handling.

Fixes #3556.

Verification

  • pnpm check passed.
  • pnpm test passed: 219 files, 2,191 tests.
  • pnpm build passed.
  • Lifecycle tests cover normal startup, second-process exit, repeated relaunches, early relaunches, and failure/retry. The entrypoint test verifies registration occurs before whenReady.
  • CI lint, unit tests, visual regression, code analysis, and macOS/Windows/Linux packaging checks passed.
  • Packaged-app relaunch checks on Windows/Linux and macOS activation remain manual follow-up.

@setchy
setchy requested a review from afonsojramos as a code owner November 6, 2026 01:00
@github-actions github-actions Bot added the bug Something isn't working label Nov 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@setchy setchy changed the title fix: show the existing window when Gitify is launched again feat: show the existing window when Gitify is launched again Nov 6, 2026
@github-actions github-actions Bot added enhancement New feature or enhancement to existing functionality and removed bug Something isn't working labels Nov 6, 2026
@setchy
setchy merged commit 0ffddd2 into main Nov 6, 2026
27 checks passed
@setchy
setchy deleted the fix/show-window-on-second-launch branch November 6, 2026 12:26
@github-actions github-actions Bot added this to the Release 8.1.0 milestone Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement to existing functionality

Development

Successfully merging this pull request may close these issues.

Show window when Gitify is launched a second time

1 participant