Skip to content

💚 Fix: Prevent multiple progress bars when receiving Competitive Companion messages#151

Merged
Pushpavel merged 1 commit intoPushpavel:mainfrom
znzryb:fix-progress-bars-clean
Nov 30, 2025
Merged

💚 Fix: Prevent multiple progress bars when receiving Competitive Companion messages#151
Pushpavel merged 1 commit intoPushpavel:mainfrom
znzryb:fix-progress-bars-clean

Conversation

@znzryb
Copy link
Contributor

@znzryb znzryb commented Nov 30, 2025

Problem

image image

When receiving problems from Competitive Companion browser extension, multiple identical "Gathering problems..." progress bars appear simultaneously (typically 5 or more), causing UI clutter and confusion (even in situation of opening one project).

Root

I think the problem was caused by the old implementation: every time I opened the project, a new ProblemGatheringBridge instance would be created, but the old ones weren't being cleaned up. This led to multiple instances running simultaneously, each showing its own progress bar.

What Changed

I refactored ProblemGatheringBridge to be an application-level service instead of a ProjectActivity. Now there's only one instance running across all projects, which means:

  • Only one listener on one port
  • Proper cleanup when the service stops
  • Added an isRunning flag to prevent duplicate starts

Created a separate ProblemGatheringBridgeStarter class that initializes
the service when the first project opens.

Testing

After rebuilding and reinstalling the plugin with this fix, the issue is gone.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...pavel/autocp/gather/base/ProblemGatheringBridge.kt 0.00% 14 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
...pavel/autocp/gather/base/ProblemGatheringBridge.kt 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@Pushpavel Pushpavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pushpavel Pushpavel merged commit a9131d5 into Pushpavel:main Nov 30, 2025
4 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.

3 participants