Skip to content

fix: clear tray icon when unpairing the last paired client#4890

Merged
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
aliefe04:fix-taskbar-icon-stuck-paused-4801
Mar 22, 2026
Merged

fix: clear tray icon when unpairing the last paired client#4890
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
aliefe04:fix-taskbar-icon-stuck-paused-4801

Conversation

@aliefe04
Copy link
Contributor

@aliefe04 aliefe04 commented Mar 22, 2026

Description

When unpairing the only remaining paired device via the Web UI, the Sunshine taskbar icon remains stuck on "Game Session Paused" instead of returning to the idle state.

The single-client unpair API (POST /api/unpair) removes the paired client record but does not terminate the running app/session state. In contrast, the existing unpair all path calls proc::proc.terminate() which clears the tray icon.

This fix calls proc::proc.terminate() when the last paired client is removed, mirroring the existing cleanup behavior in the unpair-all path.

Screenshot

N/A - backend fix

Issues Fixed or Closed

Roadmap Issues

N/A

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher
Copy link
Member

Thank you for the PR submission, but I noticed you didn't use our PR template.

Please update the PR to use the correct template. You can find it at https://github.com/LizardByte/.github/blob/master/.github/pull_request_template.md?plain=1

@aliefe04
Copy link
Contributor Author

@ReenigneArcher I updated my submission

Fixes LizardByte#4801

When unpairing the only remaining paired device, the tray icon
stayed stuck on 'Game Session Paused' instead of returning to
idle. This happened because single-client unpair removed the
client record but did not terminate the running app/session
state like 'unpair all' does.

This change calls proc::proc.terminate() when the last paired
client is removed, mirroring the existing cleanup behavior in
the unpair-all path.
@ReenigneArcher ReenigneArcher force-pushed the fix-taskbar-icon-stuck-paused-4801 branch from c16c43b to fca2b74 Compare March 22, 2026 20:25
@codecov
Copy link

codecov bot commented Mar 22, 2026

Bundle Report

Bundle size has no change ✅

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Mar 22, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.47%. Comparing base (24b66fe) to head (fca2b74).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/confighttp.cpp 0.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4890      +/-   ##
==========================================
- Coverage   18.49%   18.47%   -0.02%     
==========================================
  Files         107      107              
  Lines       22487    22490       +3     
  Branches    10004    10007       +3     
==========================================
- Hits         4159     4156       -3     
- Misses      15414    16865    +1451     
+ Partials     2914     1469    -1445     
Flag Coverage Δ
Archlinux 12.23% <0.00%> (-0.01%) ⬇️
FreeBSD-14.3-aarch64 ?
FreeBSD-14.3-amd64 14.06% <0.00%> (-0.02%) ⬇️
Homebrew-ubuntu-22.04 14.58% <0.00%> (-0.01%) ⬇️
Linux-AppImage 12.73% <0.00%> (-0.01%) ⬇️
Windows-AMD64 14.97% <0.00%> (-0.01%) ⬇️
Windows-ARM64 13.36% <0.00%> (-0.02%) ⬇️
macOS-arm64 19.08% <0.00%> (-0.02%) ⬇️
macOS-x86_64 18.46% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/confighttp.cpp 28.42% <0.00%> (-0.21%) ⬇️

... and 53 files with indirect coverage changes

@ReenigneArcher ReenigneArcher merged commit d6bc76e into LizardByte:master Mar 22, 2026
111 of 116 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Taskbar icon stuck on "Game Session Paused" when unpairing the only remaining device

2 participants