Skip to content

FIX: [Port] [UUM-160646] Fixed duplicate entries in the binding path search - #2507

Open
josepmariapujol-unity wants to merge 2 commits into
developfrom
backport/input/isx-2252-control-picker-duplicate-search
Open

josepmariapujol-unity wants to merge 2 commits into
developfrom
backport/input/isx-2252-control-picker-duplicate-search

Conversation

@josepmariapujol-unity

@josepmariapujol-unity josepmariapujol-unity commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Port of trunk PR #137422

Description

Fixes UUM-160646: duplicate entries in the Input Actions Editor binding path search (Binding Properties > Path), for example when searching "mouse".

Some devices appear twice in the control picker tree: Mouse on its own and under Pointer, and XR Controller on its own and under Tracked Device. The nested copy is already excluded from search, but its Usages entries ignored that and stayed searchable. So every usage, for example <Mouse>/{Back} or <XRController>{LeftHand}/{Menu}, showed up twice in search with the same path.

The fix passes the device's searchable flag through BuildTreeForControlUsages to ControlUsageDropdownItem, so usage entries under a non-searchable device are non-searchable too.

Testing status & QA

  • New editor test CoreTests.Editor_InputControlPicker_SearchDoesNotContainDuplicatePaths: builds the picker tree and checks that no searchable path appears twice. In trunk it fails without the fix and passes with it.
  • Existing Editor_InputControlPicker_TouchscreenPickerContainsSingleAndMultiTouchControls still passes in trunk.

QA: open an Input Actions asset, select a binding, open the Path picker and search "mouse" or "xr". Each usage entry should appear once.

Overall Product Risks

  • Complexity: Low. Editor-only change to the control picker; a new optional parameter with a default that keeps existing behaviour.
  • Halo Effect: Low. Only affects which control picker entries are searchable; browsing the tree is unchanged.

Comments to reviewers

Search can still show two entries with the same label that are different bindings, for example "Forward [Mouse]" for both the forwardButton control and the {Forward} usage. That is out of scope here, as in the trunk PR.

The port merged into develop with no conflicts; the code change is identical to trunk.

Description written by Claude Code (Claude Opus 5.5) on behalf of the author.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

…search

Port of trunk PR #137422.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@josepmariapujol-unity josepmariapujol-unity self-assigned this Nov 11, 2026

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Harness Review

Ship it

The change consistently applies the existing searchability flag to control-usage entries. I examined the picker tree construction, search filtering, regression test, and changelog, and found no actionable issues.

Reviewed commit 573f145

🤖 Helpful? 👍/👎

@codecov-github-com

codecov-github-com Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Assets/Tests/InputSystem/CoreTests_Editor.cs 95.23% 1 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2507      +/-   ##
===========================================
+ Coverage    78.96%   79.22%   +0.25%     
===========================================
  Files          767      769       +2     
  Lines       140949   141283     +334     
===========================================
+ Hits        111305   111932     +627     
+ Misses       29644    29351     -293     
Flag Coverage Δ
inputsystem_MacOS_6000.0 5.31% <0.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.0_project 77.90% <96.00%> (+0.38%) ⬆️
inputsystem_MacOS_6000.3 5.31% <0.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.3_project 77.89% <96.00%> (+0.39%) ⬆️
inputsystem_MacOS_6000.6 5.30% <0.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.6_project 77.96% <96.00%> (+0.39%) ⬆️
inputsystem_Ubuntu_6000.0 5.31% <0.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.0_project 77.81% <96.00%> (+0.38%) ⬆️
inputsystem_Ubuntu_6000.3 5.32% <0.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.3_project 77.80% <96.00%> (+0.38%) ⬆️
inputsystem_Ubuntu_6000.6 5.30% <0.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.6_project 77.87% <96.00%> (+0.39%) ⬆️
inputsystem_Windows_6000.0 5.31% <0.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.0_project 78.00% <96.00%> (+0.36%) ⬆️
inputsystem_Windows_6000.3 5.31% <0.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.3_project 78.02% <96.00%> (+0.38%) ⬆️
inputsystem_Windows_6000.6 5.30% <0.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.6_project 78.08% <96.00%> (+0.38%) ⬆️

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

Files with missing lines Coverage Δ
...m/Editor/ControlPicker/InputControlDropdownItem.cs 98.50% <100.00%> (+13.43%) ⬆️
...Editor/ControlPicker/InputControlPickerDropdown.cs 46.77% <100.00%> (+0.09%) ⬆️
Assets/Tests/InputSystem/CoreTests_Editor.cs 97.93% <95.23%> (-0.03%) ⬇️

... and 12 files with indirect coverage changes

ℹ️ Need help interpreting these results?

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant