Skip to content

Controller Icons are only displayed once per controller.#2822

Merged
DocMoebiuz merged 2 commits intomainfrom
2821/fix-multiple-controller-icons
Mar 13, 2026
Merged

Controller Icons are only displayed once per controller.#2822
DocMoebiuz merged 2 commits intomainfrom
2821/fix-multiple-controller-icons

Conversation

@DocMoebiuz
Copy link
Collaborator

@DocMoebiuz DocMoebiuz commented Mar 13, 2026

With this fix the controller icon for the same controller shows only once even when the controller is used in multiple profiles.

With this fix

image

Before this fix

Image

fixes #2821

Copilot AI review requested due to automatic review settings March 13, 2026 14:19
@DocMoebiuz DocMoebiuz added the bug_beta Something isn't working in a beta version, not in a stable released version label Mar 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes #2821 by ensuring controller binding/status is only represented once per unique controller across all config files in a project (preventing duplicate “missing” icons on the project card when the same controller is referenced in multiple profiles/config files).

Changes:

  • Deduplicate controller bindings across config files using value equality (AreEqual) instead of reference equality.
  • Align auto-binding result aggregation and applied binding mapping checks to use value equality as well.
  • Add unit tests covering “same controller in multiple config files” scenarios (Match/AutoBind/Missing).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
MobiFlight/Controllers/ControllerBindingService.cs Switches de-duplication logic to value equality to avoid duplicate bindings for the same controller across config files.
MobiFlightUnitTests/MobiFlight/Controllers/ControllerBindingServiceTests.cs Adds coverage for multiple-config-file projects referencing the same controller, asserting only one binding is returned.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link

Build for this pull request:
MobiFlightConnector.zip

@github-actions
Copy link

Build for this pull request:
MobiFlightConnector.zip

@DocMoebiuz DocMoebiuz merged commit 838c71e into main Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug_beta Something isn't working in a beta version, not in a stable released version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controller Binding Status Icons show multiple times for the same controller

2 participants