Controller Icons are only displayed once per controller.#2822
Merged
DocMoebiuz merged 2 commits intomainfrom Mar 13, 2026
Merged
Controller Icons are only displayed once per controller.#2822DocMoebiuz merged 2 commits intomainfrom
DocMoebiuz merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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.
MobiFlightUnitTests/MobiFlight/Controllers/ControllerBindingServiceTests.cs
Outdated
Show resolved
Hide resolved
|
Build for this pull request: |
|
Build for this pull request: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Before this fix
fixes #2821